summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-02-16 19:11:57 +0000
committeradrian <adrian@FreeBSD.org>2013-02-16 19:11:57 +0000
commit1c8066ed1e89fef7ba988aec95043a4c778c3c63 (patch)
tree901168f6997fff79dc7d30fdda93b241f98280b8
parent14a3096b0ed2a943ad439e15527d1bf0dfb58c60 (diff)
downloadFreeBSD-src-1c8066ed1e89fef7ba988aec95043a4c778c3c63.zip
FreeBSD-src-1c8066ed1e89fef7ba988aec95043a4c778c3c63.tar.gz
* Reduce the PCU lock overhead a little by only re-acquiring it if we
actually do have to reinitialise the RX side of things after an RX descriptor EOL error. * Revert a change of mine from quite a while ago - don't shortcut the RX initialisation path. There's a RX FIFO bug in the earlier chips (I'm not sure when it was fixed in this series, but it's fixed with the AR9380 and later) which causes the same RX descriptor to be written to over and over. This causes the descriptor to be marked as "done", and this ends up causing the whole RX path to go very strange. This should fixed the "kickpcu; handled X packets" message spam where "X" is consistently small.
-rw-r--r--sys/dev/ath/if_ath_rx.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c
index c8d9536..139e894 100644
--- a/sys/dev/ath/if_ath_rx.c
+++ b/sys/dev/ath/if_ath_rx.c
@@ -954,17 +954,32 @@ rx_proc_next:
* need to be handled, kick the PCU if there's
* been an RXEOL condition.
*/
- ATH_PCU_LOCK(sc);
- if (resched && sc->sc_kickpcu) {
+ if (resched && kickpcu) {
+ ATH_PCU_LOCK(sc);
ATH_KTR(sc, ATH_KTR_ERROR, 0, "ath_rx_proc: kickpcu");
device_printf(sc->sc_dev, "%s: kickpcu; handled %d packets\n",
__func__, npkts);
- /* XXX rxslink? */
-#if 0
+ /*
+ * Go through the process of fully tearing down
+ * the RX buffers and reinitialising them.
+ *
+ * There's a hardware bug that causes the RX FIFO
+ * to get confused under certain conditions and
+ * constantly write over the same frame, leading
+ * the RX driver code here to get heavily confused.
+ */
+#if 1
ath_startrecv(sc);
#else
/*
+ * Disabled for now - it'd be nice to be able to do
+ * this in order to limit the amount of CPU time spent
+ * reinitialising the RX side (and thus minimise RX
+ * drops) however there's a hardware issue that
+ * causes things to get too far out of whack.
+ */
+ /*
* XXX can we hold the PCU lock here?
* Are there any net80211 buffer calls involved?
*/
@@ -977,8 +992,8 @@ rx_proc_next:
ath_hal_intrset(ah, sc->sc_imask);
sc->sc_kickpcu = 0;
+ ATH_PCU_UNLOCK(sc);
}
- ATH_PCU_UNLOCK(sc);
/* XXX check this inside of IF_LOCK? */
if (resched && (ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) {
OpenPOWER on IntegriCloud