freebsd-dev/sys/dev/ath/ath_hal
Adrian Chadd 62f62f4f4a Various interrupt handling and RX interrupt mitigation fixes.
* The AR_ISR_RAC interrupt processing method has a subtle bug in all
  the MAC revisions (including pre-11n NICs) until AR9300v2.
  If you're unlucky, the clear phase clears an update to one of the
  secondary registers, which includes TX status.

  This shows up as a "watchdog timeout" if you're doing very low levels
  of TX traffic. If you're doing a lot of non-11n TX traffic, you'll
  end up receiving a TX interrupt from some later traffic anyway.

  But when TX'ing 11n aggregation session traffic (which -HEAD isn't yet
  doing), you may find that you're only able to TX one frame (due to
  BAW restrictions) and this may end up hitting this race condition.

  The only solution is to not use RAC and instead use AR_ISR and the
  AR_ISR_Sx registers. The bit in AR_ISR which represents the secondary
  registers are not cleared; only the AR_ISR_Sx bits are. This way
  any updates which occur between the read and subsequent write will
  stay asserted and (correctly) trigger a subsequent interrupt.

  I've tested this on the AR5416, AR9160, AR9280. I will soon test
  the AR9285 and AR9287.

* The AR_ISR TX and RX bits (and all others!) are set regardless of
  whether the contents of the AR_IMR register. So if RX mitigation is
  enabled, RXOK is going to be set in AR_ISR and it would normally set
  HAL_INT_RX.

  Fix the code to not set HAL_INT_RX when RXOK is set and RX mitigation
  is compiled in. That way the RX path isn't prematurely called.

  I would see:

  * An interrupt would come in (eg a beacon, or TX completion) where
    RXOK was set but RXINTM/RXMINT wasn't;
  * ath_rx_proc() be called - completing RX frames;
  * RXINTM/RXMINT would then fire;
  * ath_rx_proc() would then be called again but find no frames in the
    queue.

  This fixes the RX mitigation behaviour to not overly call ath_rx_proc().

* Start to flesh out more correct timer interrupt handling - it isn't
  kite/merlin specific. It's actually based on whether autosleep support
  is enabled or not.

This is sourced from my 11n TX branch and has been tested for a few weeks.

Finally, the interrupt handling change should likely be implemented
for AR5210, AR5211 and AR5212.
2011-10-02 14:08:56 +00:00
..
ah_regdomain These two are ath_hal regulatory domain updates from the Atheros 2011-07-20 12:46:58 +00:00
ar5210 Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ar5211 Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ar5212 Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ar5312 Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ar5416 Various interrupt handling and RX interrupt mitigation fixes. 2011-10-02 14:08:56 +00:00
ar9001 Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ar9002 Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ah_debug.h Add a new flag - HAL_DEBUG_UNMASKABLE - which always logs a debug message 2011-05-11 13:22:41 +00:00
ah_decode.h Add some more OS_MARK probes to the RX DMA setup/teardown code path. 2011-04-07 13:14:51 +00:00
ah_desc.h Add some more phyerr bits. 2011-07-31 03:33:02 +00:00
ah_devid.h Merlin -> Kiwi 2011-05-26 09:16:09 +00:00
ah_diagcodes.h Reserve a new diagnostic code for the channel survey code I'll add soon. 2011-03-19 14:37:13 +00:00
ah_eeprom_9287.c Prepare for embedded use of the AR9285/AR9287. 2011-07-30 13:37:38 +00:00
ah_eeprom_9287.h Make sure the extended regdomain word is initialised. 2011-06-28 00:01:55 +00:00
ah_eeprom_v1.c Fix the eeprom set API method to return HAL_STATUS. 2011-05-14 15:12:02 +00:00
ah_eeprom_v1.h Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ah_eeprom_v3.c Fix the eeprom set API method to return HAL_STATUS. 2011-05-14 15:12:02 +00:00
ah_eeprom_v3.h Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ah_eeprom_v4k.c Remove the EEPROM minor >= 19 check for txgaintype; that's only needed for 2011-08-03 06:51:14 +00:00
ah_eeprom_v4k.h Bring over a pdadc calibration fix from ath9k - unused power detector 2011-04-22 10:57:46 +00:00
ah_eeprom_v14.c Introduce the FRAC_5G EEPROM parameter. 2011-07-30 13:45:12 +00:00
ah_eeprom_v14.h Introduce the FRAC_5G EEPROM parameter. 2011-07-30 13:45:12 +00:00
ah_eeprom.h Introduce the FRAC_5G EEPROM parameter. 2011-07-30 13:45:12 +00:00
ah_internal.h Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ah_regdomain.c Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ah_regdomain.h Migrate the regulatory database definitions into separate header files 2011-03-10 03:13:56 +00:00
ah_soc.h Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ah.c Update the TSF and next-TBTT methods to work for the AR5416 and later NICs. 2011-09-08 01:23:05 +00:00
ah.h Update the TSF and next-TBTT methods to work for the AR5416 and later NICs. 2011-09-08 01:23:05 +00:00