From 1166819402f80a20b7cae70f3086a2a7cba4c688 Mon Sep 17 00:00:00 2001 From: raj Date: Tue, 17 Feb 2009 15:47:13 +0000 Subject: [PATCH] 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 --- sys/dev/tsec/if_tsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c index d6d5eddc6c4..f16a1d38565 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); -- 2.45.2