Author: adrian
Date: Sun Jan 13 22:41:58 2013
New Revision: 245396
URL: http://svnweb.freebsd.org/changeset/base/245396

Log:
  If we're doing a kickpcu, make sure we flush the whole RX list rather than
  stopping after 128 frames.
  
  Whilst here, add in some code that lets me optionally flip back to the
  original behaviour of calling ath_startrecv().

Modified:
  head/sys/dev/ath/if_ath_rx.c

Modified: head/sys/dev/ath/if_ath_rx.c
==============================================================================
--- head/sys/dev/ath/if_ath_rx.c        Sun Jan 13 22:41:44 2013        
(r245395)
+++ head/sys/dev/ath/if_ath_rx.c        Sun Jan 13 22:41:58 2013        
(r245396)
@@ -845,6 +845,7 @@ ath_rx_proc(struct ath_softc *sc, int re
        int16_t nf;
        u_int64_t tsf;
        int npkts = 0;
+       int kickpcu = 0;
 
        /* XXX we must not hold the ATH_LOCK here */
        ATH_UNLOCK_ASSERT(sc);
@@ -852,6 +853,7 @@ ath_rx_proc(struct ath_softc *sc, int re
 
        ATH_PCU_LOCK(sc);
        sc->sc_rxproc_cnt++;
+       kickpcu = sc->sc_kickpcu;
        ATH_PCU_UNLOCK(sc);
 
        DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: called\n", __func__);
@@ -866,7 +868,7 @@ ath_rx_proc(struct ath_softc *sc, int re
                 * latency can jump by quite a bit, causing throughput
                 * degredation.
                 */
-               if (npkts >= ATH_RX_MAX)
+               if (!kickpcu && npkts >= ATH_RX_MAX)
                        break;
 
                bf = TAILQ_FIRST(&sc->sc_rxbuf);
@@ -961,6 +963,9 @@ rx_proc_next:
                    __func__, npkts);
 
                /* XXX rxslink? */
+#if 0
+               ath_startrecv(sc);
+#else
                /*
                 * XXX can we hold the PCU lock here?
                 * Are there any net80211 buffer calls involved?
@@ -970,6 +975,7 @@ rx_proc_next:
                ath_hal_rxena(ah);              /* enable recv descriptors */
                ath_mode_init(sc);              /* set filters, etc. */
                ath_hal_startpcurecv(ah);       /* re-enable PCU/DMA engine */
+#endif
 
                ath_hal_intrset(ah, sc->sc_imask);
                sc->sc_kickpcu = 0;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to