summaryrefslogtreecommitdiffstats
path: root/sys/dev/cs/if_cs.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2008-06-03 05:47:28 +0000
committerimp <imp@FreeBSD.org>2008-06-03 05:47:28 +0000
commit0c8fb59ce849c8159b7b8f836fccfb5e3c59366a (patch)
tree3cd79a0af5d036c51a9ecadbfa5604b9bdd5b12c /sys/dev/cs/if_cs.c
parent31ed4092c5f9782ec0ace4025bc1793c613942bf (diff)
downloadFreeBSD-src-0c8fb59ce849c8159b7b8f836fccfb5e3c59366a.zip
FreeBSD-src-0c8fb59ce849c8159b7b8f836fccfb5e3c59366a.tar.gz
Correct logic error that would prevent cs pccards from working on
systems where the CardBus bridge was connected to a APIC. The case where the probe routine is told to not setup the IRQ was mishandled but the error was masked in the case where the IRQ was a valid one for the card. MFC after: 1 week
Diffstat (limited to 'sys/dev/cs/if_cs.c')
-rw-r--r--sys/dev/cs/if_cs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c
index 7c6ac93..4f17756 100644
--- a/sys/dev/cs/if_cs.c
+++ b/sys/dev/cs/if_cs.c
@@ -453,23 +453,23 @@ cs_cs89x0_probe(device_t dev)
irq = 2;
break;
default:
- error=EINVAL;
+ error = EINVAL;
+ break;
}
} else {
- if (irq > CS8920_NO_INTS) {
+ if (irq > CS8920_NO_INTS && !(sc->flags & CS_NO_IRQ))
error = EINVAL;
- }
}
}
- if (!error) {
- if (!(sc->flags & CS_NO_IRQ))
- cs_writereg(sc, pp_isaint, irq);
- } else {
+ if (error) {
device_printf(dev, "Unknown or invalid irq\n");
- return (ENXIO);
+ return (error);
}
+ if (!(sc->flags & CS_NO_IRQ))
+ cs_writereg(sc, pp_isaint, irq);
+
/*
* Temporary disabled
*
OpenPOWER on IntegriCloud