diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-11-22 12:46:15 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2005-11-22 12:46:15 +0000 |
commit | a9fe9149a89411da72e426ccac0782043d82715a (patch) | |
tree | e385062cff3eb3263d4b0e9c1f5a0bf6a421ee2d | |
parent | 0da07b29c3845896835e84d546f14077a8de3503 (diff) | |
download | src-a9fe9149a89411da72e426ccac0782043d82715a.tar.gz src-a9fe9149a89411da72e426ccac0782043d82715a.zip |
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 <dsnofe yahoo.com.cn>
Notes
Notes:
svn path=/head/; revision=152681
-rw-r--r-- | sys/dev/re/if_re.c | 10 |
1 files 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) { |