From a9fe9149a89411da72e426ccac0782043d82715a Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Tue, 22 Nov 2005 12:46:15 +0000 Subject: [PATCH] Check IFF_DRV_RUNNING in the re_intr() loop. It can disappear, since re_rxeof() drops the lock for some time. Reported & tested by: XueFeng Deng --- sys/dev/re/if_re.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 7a3f060ddeae..28f9c2ae06df 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1852,13 +1852,15 @@ re_intr(arg) if ((status & RL_INTRS_CPLUS) == 0) break; - if ((status & RL_ISR_RX_OK) || - (status & RL_ISR_RX_ERR)) + if (((status & RL_ISR_RX_OK) || + (status & RL_ISR_RX_ERR)) && + ifp->if_drv_flags & IFF_DRV_RUNNING) re_rxeof(sc); - if ((status & RL_ISR_TIMEOUT_EXPIRED) || + if (((status & RL_ISR_TIMEOUT_EXPIRED) || (status & RL_ISR_TX_ERR) || - (status & RL_ISR_TX_DESC_UNAVAIL)) + (status & RL_ISR_TX_DESC_UNAVAIL)) && + ifp->if_drv_flags & IFF_DRV_RUNNING) re_txeof(sc); if (status & RL_ISR_SYSTEM_ERR) {