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
This commit is contained in:
Rafal Jaworowski 2009-02-17 15:47:13 +00:00
parent ab160495d3
commit 0390701af8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188715

View File

@ -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);