svn commit: r226484 - user/adrian/if_ath_tx/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Mon Oct 17 23:36:30 UTC 2011


Author: adrian
Date: Mon Oct 17 23:36:29 2011
New Revision: 226484
URL: http://svn.freebsd.org/changeset/base/226484

Log:
  Now that I've fixed the issues that I was seeing when the PCU was being
  kicked, remove all the extra code/comments left over.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Mon Oct 17 22:23:27 2011	(r226483)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Mon Oct 17 23:36:29 2011	(r226484)
@@ -4139,38 +4139,11 @@ rx_next:
 	 * need to be handled, kick the PCU if there's
 	 * been an RXEOL condition.
 	 */
-	/*
-	 * XXX TODO!
-	 * It is very likely that we're unfortunately
-	 * racing with other places where ath_hal_intrset()
-	 * may be called. It may be that we do need to
-	 * add some more locking (eg the pcu lock from ath9k/
-	 * reference), or introduce some other way to cope
-	 * with this.
-	 */
 	if (resched && sc->sc_kickpcu) {
 		CTR0(ATH_KTR_ERR, "ath_rx_proc: kickpcu");
 		device_printf(sc->sc_dev, "%s: kickpcu; handled %d packets\n",
 		    __func__, npkts);
 
-#if 0
-		/*
-		 * This re-links all of the descriptors together.
-		 * (Is it possible that somehow, some state/issue
-		 * is leaving us with badly linked descriptors?)
-		 * Is it possible that we're receiving another RXEOL
-		 * _during_ this function?
-		 */
-		if (ath_startrecv(sc) != 0) {
-			if_printf(ifp,
-			    "%s: couldn't restart RX after RXEOL; resetting\n",
-			    __func__);
-			ath_reset(ifp);
-			sc->sc_kickpcu = 0;
-			return;
-		}
-#endif
-
 		/* XXX rxslink? */
 		bf = TAILQ_FIRST(&sc->sc_rxbuf);
 		ath_hal_putrxbuf(ah, bf->bf_daddr);
@@ -4178,10 +4151,9 @@ rx_next:
 		ath_mode_init(sc);		/* set filters, etc. */
 		ath_hal_startpcurecv(ah);	/* re-enable PCU/DMA engine */
 
-		ATH_LOCK(sc);
+		ATH_LOCK_ASSERT(sc);
 		ath_hal_intrset(ah, sc->sc_imask);
 		sc->sc_kickpcu = 0;
-		ATH_UNLOCK(sc);
 	}
 
 	if (resched && (ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) {


More information about the svn-src-user mailing list