From 4194a396a12dd6e7b454e654ae0c52cb7ba10f96 Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 6 Feb 1994 11:59:35 +0000 Subject: 1) Proper fix for suspended output in multiport case 2) IIR_NOPEND is really *one* bit, we don't need to check whole MASK --- sys/dev/sio/sio.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sys/dev/sio/sio.c') diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index fdb91f9..59af0ff 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -369,7 +369,7 @@ sioprobe(dev) #endif || (inb(iobase + com_iir) & IIR_IMASK) != IIR_TXRDY || isa_irq_pending(dev) - || (inb(iobase + com_iir) & IIR_IMASK) != IIR_NOPEND) + || !(inb(iobase + com_iir) & IIR_NOPEND)) result = 0; /* @@ -384,7 +384,7 @@ sioprobe(dev) outb(iobase + com_mcr, MCR_IENABLE); /* dummy to avoid bus echo */ if ( inb(iobase + com_ier) != 0 || isa_irq_pending(dev) - || (inb(iobase + com_iir) & IIR_IMASK) != IIR_NOPEND) + || !(inb(iobase + com_iir) & IIR_NOPEND)) result = 0; if (result == 0) outb(iobase + com_mcr, 0); @@ -861,6 +861,8 @@ siointr(unit) #else /* COM_MULTIPORT */ bool_t possibly_more_intrs; + com = com_addr(unit); + comintr1(com); /* * Loop until there is no activity on any port. This is necessary * to get an interrupt edge more than to avoid another interrupt. @@ -872,15 +874,15 @@ siointr(unit) possibly_more_intrs = FALSE; for (unit = 0; unit < NSIO; ++unit) { com = com_addr(unit); - if (com != NULL) { + if (com != NULL + && !(inb(com->int_id_port) & IIR_NOPEND)) { /* * XXX call comintr1() instead of here from * comwakeup(). The interrupt edge problem * only exists for real interrupts. */ comintr1(com); - if ((inb(com->int_id_port) & IIR_IMASK) != IIR_NOPEND) - possibly_more_intrs = TRUE; + possibly_more_intrs = TRUE; } } } while (possibly_more_intrs); @@ -999,7 +1001,7 @@ if (com->iptr - com->ibuf == 8) /* finished? */ #ifndef COM_MULTIPORT - if ((inb(com->int_id_port) & IIR_IMASK) == IIR_NOPEND) + if (inb(com->int_id_port) & IIR_NOPEND) #endif /* COM_MULTIPORT */ return; } -- cgit v1.1