diff options
author | raj <raj@FreeBSD.org> | 2009-02-17 15:47:13 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2009-02-17 15:47:13 +0000 |
commit | 1166819402f80a20b7cae70f3086a2a7cba4c688 (patch) | |
tree | cb6b55ef036505af290c6c39aeae2c10beb71917 /sys | |
parent | 3fe0ff5e6c57f42cb5b0400f2ce2ba42d4e251f7 (diff) | |
download | FreeBSD-src-1166819402f80a20b7cae70f3086a2a7cba4c688.zip FreeBSD-src-1166819402f80a20b7cae70f3086a2a7cba4c688.tar.gz |
tsec(4): do not clear interrupt events register before use.
Prior to this fix, IEVENT register was always cleared before calling
tsec_error_intr_locked(), which prevented error recovery actions from
happening with polling enabled (and could lead to serious problems, including
controller hang).
Submitted by: Marcin Ligenza marcinl ! pacomp dot com dot pl
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/tsec/if_tsec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c index d6d5edd..f16a1d3 100644 --- a/sys/dev/tsec/if_tsec.c +++ b/sys/dev/tsec/if_tsec.c @@ -870,11 +870,11 @@ tsec_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) } if (cmd == POLL_AND_CHECK_STATUS) { - ie = TSEC_READ(sc, TSEC_REG_IEVENT); + tsec_error_intr_locked(sc, count); /* Clear all events reported */ + ie = TSEC_READ(sc, TSEC_REG_IEVENT); TSEC_WRITE(sc, TSEC_REG_IEVENT, ie); - tsec_error_intr_locked(sc, count); } tsec_transmit_intr_locked(sc); |