svn commit: r188715 - head/sys/dev/tsec

Rafal Jaworowski raj at FreeBSD.org
Tue Feb 17 07:47:19 PST 2009


Author: raj
Date: Tue Feb 17 15:47:13 2009
New Revision: 188715
URL: http://svn.freebsd.org/changeset/base/188715

Log:
  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

Modified:
  head/sys/dev/tsec/if_tsec.c

Modified: head/sys/dev/tsec/if_tsec.c
==============================================================================
--- head/sys/dev/tsec/if_tsec.c	Tue Feb 17 15:41:41 2009	(r188714)
+++ head/sys/dev/tsec/if_tsec.c	Tue Feb 17 15:47:13 2009	(r188715)
@@ -870,11 +870,11 @@ tsec_poll(struct ifnet *ifp, enum poll_c
 	}
 
 	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);


More information about the svn-src-all mailing list