diff options
author | glebius <glebius@FreeBSD.org> | 2005-11-22 12:46:15 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-11-22 12:46:15 +0000 |
commit | 8e5d7af2ff149e2c15389cc2941f38e15c3574c8 (patch) | |
tree | e385062cff3eb3263d4b0e9c1f5a0bf6a421ee2d /sys | |
parent | a1506d0e42181017d0d535d426cb97e82e44fee8 (diff) | |
download | FreeBSD-src-8e5d7af2ff149e2c15389cc2941f38e15c3574c8.zip FreeBSD-src-8e5d7af2ff149e2c15389cc2941f38e15c3574c8.tar.gz |
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>
Diffstat (limited to 'sys')
-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 7a3f060..28f9c2a 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) { |