summaryrefslogtreecommitdiffstats
path: root/sys/isa/sio.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-11-18 10:29:06 +0000
committerpeter <peter@FreeBSD.org>1999-11-18 10:29:06 +0000
commitc9973ec034f06110ff15503361ec38868a20f5aa (patch)
tree6ddaaf2bb37b798b874f76d7ba7d34337313d09d /sys/isa/sio.c
parent162eda38602424e4e5964983b2738bf6c6202c85 (diff)
downloadFreeBSD-src-c9973ec034f06110ff15503361ec38868a20f5aa.zip
FreeBSD-src-c9973ec034f06110ff15503361ec38868a20f5aa.tar.gz
Argh, don't turn the IIR test on unless it's a pccard. These tests mess
up the subsequent probes.
Diffstat (limited to 'sys/isa/sio.c')
-rw-r--r--sys/isa/sio.c44
1 files changed, 20 insertions, 24 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 456af42..fe8244e 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -749,32 +749,28 @@ sioprobe(dev)
* Some pcmcia cards have the "TXRDY bug", so we check everyone
* for IIR_TXRDY implementation ( Palido 321s, DC-1S... )
*/
-#if 1
- /* Reading IIR register twice */
- for (fn = 0; fn < 2; fn ++) {
- DELAY(10000);
- failures[6] = inb(iobase + com_iir);
- }
- /* Check IIR_TXRDY clear ? */
- result = 0;
- if (failures[6] & IIR_TXRDY) {
- /* Nop, Double check with clearing IER */
- outb(iobase + com_ier, 0);
- if (inb(iobase + com_iir) & IIR_NOPEND) {
- /* Ok. we're familia this gang */
- SET_FLAG(dev, COM_C_IIR_TXRDYBUG);
+ if (COM_NOPROBE(flags)) {
+ /* Reading IIR register twice */
+ for (fn = 0; fn < 2; fn ++) {
+ DELAY(10000);
+ failures[6] = inb(iobase + com_iir);
+ }
+ /* Check IIR_TXRDY clear ? */
+ result = 0;
+ if (failures[6] & IIR_TXRDY) {
+ /* Nop, Double check with clearing IER */
+ outb(iobase + com_ier, 0);
+ if (inb(iobase + com_iir) & IIR_NOPEND) {
+ /* Ok. we're familia this gang */
+ SET_FLAG(dev, COM_C_IIR_TXRDYBUG);
+ } else {
+ /* Unknown, Just omit this chip.. XXX */
+ result = ENXIO;
+ }
} else {
- /* Unknown, Just omit this chip.. XXX */
- result = ENXIO;
+ /* OK. this is well-known guys */
+ CLR_FLAG(dev, COM_C_IIR_TXRDYBUG);
}
- } else {
- /* OK. this is well-known guys */
- CLR_FLAG(dev, COM_C_IIR_TXRDYBUG);
- }
-#else
- result = 0;
-#endif
- if (COM_NOPROBE(flags)) {
outb(iobase + com_cfcr, CFCR_8BITS);
enable_intr();
bus_release_resource(dev, SYS_RES_IOPORT, rid, port);
OpenPOWER on IntegriCloud