summaryrefslogtreecommitdiffstats
path: root/sys/dev/tsec
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2009-02-17 15:59:27 +0000
committerraj <raj@FreeBSD.org>2009-02-17 15:59:27 +0000
commitbcfd84f1528b9e96925de6f9e2b36c19bdb4ad13 (patch)
tree2ad5da829fa8b6d0f50a87905ea4e6d7f9b3703b /sys/dev/tsec
parent1166819402f80a20b7cae70f3086a2a7cba4c688 (diff)
downloadFreeBSD-src-bcfd84f1528b9e96925de6f9e2b36c19bdb4ad13.zip
FreeBSD-src-bcfd84f1528b9e96925de6f9e2b36c19bdb4ad13.tar.gz
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
Diffstat (limited to 'sys/dev/tsec')
-rw-r--r--sys/dev/tsec/if_tsec.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/tsec/if_tsec.c b/sys/dev/tsec/if_tsec.c
index f16a1d3..eed6004 100644
--- a/sys/dev/tsec/if_tsec.c
+++ b/sys/dev/tsec/if_tsec.c
@@ -1363,6 +1363,16 @@ tsec_receive_intr_locked(struct tsec_softc *sc, int count)
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 *sc, int count)
/* 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)
OpenPOWER on IntegriCloud