Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jul 2011 16:16:25 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224550 - head/sys/dev/ath
Message-ID:  <201107311616.p6VGGPHI053909@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Jul 31 16:16:25 2011
New Revision: 224550
URL: http://svn.freebsd.org/changeset/base/224550

Log:
  Disable the RXORN/RXEOL interrupts if RXEOL occurs, preventing an
  interrupt storm.
  
  This is easily triggered by flipping on and off tcpdump -y IEEE802_11_RADIO
  w/ witness enabled. This causes a whole lot of console IO and when you're
  attached to a serial console (eg on my AR7161 embedded board), the RX
  interrupt doesn't get called quickly enough and the RX queue fills up.
  
  This wasn't a problem in the past because of the self-linked RX descriptor
  trick - the RX would never hit the "end" of the RX descriptor list.
  However this isn't possible for 802.11n (see previous commit history for
  why.)
  
  Both Linux ath9k and the Atheros reference driver code do this; I'm just
  looking now for where they then restart the PCU receive. Right now the RX
  will just stop until the interface is reset.
  
  Obtained from:	Linux, Atheros
  Approved by:	re (kib)

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

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Sun Jul 31 16:08:29 2011	(r224549)
+++ head/sys/dev/ath/if_ath.c	Sun Jul 31 16:16:25 2011	(r224550)
@@ -1395,6 +1395,12 @@ ath_intr(void *arg)
 			 *     least on older hardware revs.
 			 */
 			sc->sc_stats.ast_rxeol++;
+			/*
+			 * Disable RXEOL/RXORN - prevent an interrupt
+			 * storm until the PCU logic can be reset.
+			 */
+			sc->sc_imask &= ~(HAL_INT_RXEOL | HAL_INT_RXORN);
+			ath_hal_intrset(ah, sc->sc_imask);
 			sc->sc_rxlink = NULL;
 		}
 		if (status & HAL_INT_TXURN) {



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