aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authorPyun YongHyeon <yongari@FreeBSD.org>2009-11-04 18:18:09 +0000
committerPyun YongHyeon <yongari@FreeBSD.org>2009-11-04 18:18:09 +0000
commit4e5820a7eb68e535bab334e256de254bf93aff5f (patch)
tree90777c468b5262bdcc2c70416e4a98b2ede246be /sys/dev/fxp
parent9126ab386a31a169c7fc676f23e2800ae7735a41 (diff)
Notes
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index bb46b0cbad14..a3007d8ffeb4 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -993,7 +993,6 @@ fxp_detach(device_t dev)
#endif
FXP_LOCK(sc);
- sc->suspended = 1; /* Do same thing as we do for suspend */
/*
* Stop DMA and drop transmit queue, but disable interrupts first.
*/
@@ -1320,6 +1319,10 @@ fxp_start_body(struct ifnet *ifp)
if (sc->need_mcsetup)
return;
+ if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
+ IFF_DRV_RUNNING)
+ return;
+
if (sc->tx_queued > FXP_NTXCB_HIWAT)
fxp_txeof(sc);
/*
@@ -1726,7 +1729,8 @@ fxp_intr(void *xsc)
* First ACK all the interrupts in this pass.
*/
CSR_WRITE_1(sc, FXP_CSR_SCB_STATACK, statack);
- fxp_intr_body(sc, ifp, statack, -1);
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+ fxp_intr_body(sc, ifp, statack, -1);
}
FXP_UNLOCK(sc);
}
@@ -1982,6 +1986,8 @@ fxp_intr_body(struct fxp_softc *sc, struct ifnet *ifp, uint8_t statack,
FXP_UNLOCK(sc);
(*ifp->if_input)(ifp, m);
FXP_LOCK(sc);
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+ return;
} else {
/* Reuse RFA and loaded DMA map. */
ifp->if_iqdrops++;
@@ -2064,7 +2070,8 @@ fxp_tick(void *xsc)
*/
if (sc->rx_idle_secs > FXP_MAX_RX_IDLE) {
sc->rx_idle_secs = 0;
- fxp_mc_setup(sc);
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+ fxp_mc_setup(sc);
}
/*
* If there is no pending command, start another stats