aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fxp/if_fxp.c
diff options
context:
space:
mode:
authorJonathan Lemon <jlemon@FreeBSD.org>2001-06-04 22:01:44 +0000
committerJonathan Lemon <jlemon@FreeBSD.org>2001-06-04 22:01:44 +0000
commit11457bbf08e696605e2e2d979975b3aaddcc2698 (patch)
treefc06f0486e91277d803baad05ef28e68c0487e27 /sys/dev/fxp/if_fxp.c
parentd316920f0c147010746e8e7232462e66b5e3de6a (diff)
downloadsrc-11457bbf08e696605e2e2d979975b3aaddcc2698.tar.gz
src-11457bbf08e696605e2e2d979975b3aaddcc2698.zip
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
Notes
Notes: svn path=/head/; revision=77731
Diffstat (limited to 'sys/dev/fxp/if_fxp.c')
-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 5af791193b9d..f89ee7b08907 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);