summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2007-09-17 20:43:19 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2007-09-17 20:43:19 +0000
commit7a3efd9bfaf8248fb1e9f131aec3870b64089ded (patch)
tree02c6064d03a95060b372a396733ae63f38890df6
parentd648bbdba206e2e1a9caba95b664e4ca733aff93 (diff)
If device is down, don't handle any interrupts. Even don't read the
interrupt status register instead return directly. This fixes the machine freeze on amd64 and let me receive proper interrupts if device is up. This bit was originaly in the DragonFly code, and must have sneaked out while porting ...
-rw-r--r--sys/dev/ic/bwi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c
index be2bfa14e9f..ac95dea2feb 100644
--- a/sys/dev/ic/bwi.c
+++ b/sys/dev/ic/bwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwi.c,v 1.37 2007/09/17 14:26:51 mglocker Exp $ */
+/* $OpenBSD: bwi.c,v 1.38 2007/09/17 20:43:18 mglocker Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@@ -506,12 +506,16 @@ int
bwi_intr(void *xsc)
{
struct bwi_softc *sc = xsc;
+ struct ifnet *ifp = &sc->sc_ic.ic_if;
uint32_t intr_status;
uint32_t txrx_intr_status[BWI_TXRX_NRING];
int i, txrx_error;
DPRINTF(2, "%s\n", __func__);
+ if ((ifp->if_flags & IFF_RUNNING) == 0)
+ return (0);
+
/*
* Get interrupt status
*/