- if (!scb)
- return;
-
- port = &ports[scb->fd];
-
- if (port->refcnt-- > 1)
- return;
-
- if (!(intrupt = port->intrupt))
- return;
-
- /* disable interrupts, fifo, flow control */
- disable ();
- port->intrupt = 0;
- intrupt->port = 0;
- outb(port, com_fifo, 0);
- outb(port, com_ier, 0);
- enable ();
-
- /* unhook handler, and disable interrupt gate */
- dos_unhookirq (intrupt);
- outb(port, com_mcr, 0);
-
- /* Check for overflow errors */
- if (port->oflo)
- {
- fprintf_unfiltered (gdb_stderr,
- "Serial input overruns occurred.\n");
- fprintf_unfiltered (gdb_stderr, "This system %s handle %d baud.\n",
- port->fifo ? "cannot" : "needs a 16550 to",
- port->baudrate);
- }
-}