diff options
author | ache <ache@FreeBSD.org> | 1994-02-06 11:59:35 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-02-06 11:59:35 +0000 |
commit | 4194a396a12dd6e7b454e654ae0c52cb7ba10f96 (patch) | |
tree | a69ac47292f2cccfbe43704531a9fd2a6c8abe46 /sys/isa | |
parent | d6b9f70ffa6cf5e811efaf334af91e6c7ba71db5 (diff) | |
download | FreeBSD-src-4194a396a12dd6e7b454e654ae0c52cb7ba10f96.zip FreeBSD-src-4194a396a12dd6e7b454e654ae0c52cb7ba10f96.tar.gz |
1) Proper fix for suspended output in multiport case
2) IIR_NOPEND is really *one* bit, we don't need to check whole MASK
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/sio.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c index fdb91f9..59af0ff 100644 --- a/sys/isa/sio.c +++ b/sys/isa/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; } |