summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2001-06-04 22:01:44 +0000
committerjlemon <jlemon@FreeBSD.org>2001-06-04 22:01:44 +0000
commita3f3e575341697240a4f1809a50bbe0941160615 (patch)
treecd6afe16d06f8fed5cb6aea6962e8600ae6c2347 /sys/dev/fxp
parente90cb846c6e34aa755627f149b273268b667d6fc (diff)
downloadFreeBSD-src-a3f3e575341697240a4f1809a50bbe0941160615.zip
FreeBSD-src-a3f3e575341697240a4f1809a50bbe0941160615.tar.gz
While in the interrupt loop, check for a bogus interrupt value of 0xff.
This may be returned if the underlying hardware is a pc-card which has been ejected. Reviewed by: warner
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 5af7911..f89ee7b 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -1011,6 +1011,15 @@ fxp_intr(void *xsc)
while ((statack = CSR_READ_1(sc, FXP_CSR_SCB_STATACK)) != 0) {
/*
+ * It should not be possible to have all bits set; the
+ * FXP_SCB_INTR_SWI bit always returns 0 on a read. If
+ * all bits are set, this may indicate that the card has
+ * been physically ejected, so ignore it.
+ */
+ if (statack == 0xff)
+ return;
+
+ /*
* First ACK all the interrupts in this pass.
*/
CSR_WRITE_1(sc, FXP_CSR_SCB_STATACK, statack);
OpenPOWER on IntegriCloud