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

Rafal Jaworowski raj at FreeBSD.org
Tue Feb 17 07:59:29 PST 2009


Author: raj
Date: Tue Feb 17 15:59:27 2009
New Revision: 188718
URL: http://svn.freebsd.org/changeset/base/188718

Log:
  tsec(4): Always try to resume the receiver.
  
  This helps recover from RX stall under heavy loads.
  
  Submitted by:	Piotr Ziecik kosmo ! semihalf dot com

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:58:42 2009	(r188717)
+++ head/sys/dev/tsec/if_tsec.c	Tue Feb 17 15:59:27 2009	(r188718)
@@ -1363,6 +1363,16 @@ tsec_receive_intr_locked(struct tsec_sof
 
 	bus_dmamap_sync(sc->tsec_rx_dtag, sc->tsec_rx_dmap,
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+
+	/*
+	 * Make sure TSEC receiver is not halted.
+	 *
+	 * Various conditions can stop the TSEC receiver, but not all are
+	 * signaled and handled by error interrupt, so make sure the receiver
+	 * is running. Writing to TSEC_REG_RSTAT restarts the receiver when
+	 * halted, and is harmless if already running.
+	 */
+	TSEC_WRITE(sc, TSEC_REG_RSTAT, TSEC_RSTAT_QHLT);
 }
 
 void
@@ -1507,9 +1517,6 @@ tsec_error_intr_locked(struct tsec_softc
 
 		/* Get data from RX buffers */
 		tsec_receive_intr_locked(sc, count);
-
-		/* Make receiver again active */
-		TSEC_WRITE(sc, TSEC_REG_RSTAT, TSEC_RSTAT_QHLT);
 	}
 
 	if (ifp->if_flags & IFF_DEBUG)


More information about the svn-src-head mailing list