Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Feb 2009 15:59:27 +0000 (UTC)
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188718 - head/sys/dev/tsec
Message-ID:  <200902171559.n1HFxRvo020124@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902171559.n1HFxRvo020124>