freebsd-skq/sys/dev/ath
adrian a7ea422c21 Fix a corner-case of interrupt handling which resulted in potentially
spurious (and fatal) interrupt errors.

One user reported seeing this:

Apr 22 18:04:24 ceres kernel: ar5416GetPendingInterrupts: fatal error,
  ISR_RAC 0x0 SYNC_CAUSE 0x2000

SYNC_CAUSE of 0x2000 is AR_INTR_SYNC_LOCAL_TIMEOUT which is a bus timeout;
this shouldn't cause HAL_INT_FATAL to be set.

After checking out ath9k, ath9k_ar9002_hw_get_isr() clears (*masked)
before continuing, regardless of whether any bits in the ISR registers
are set. So if AR_INTR_SYNC_CAUSE is set to something that isn't
treated as fatal, and AR_ISR isn't read or is read and is 0, then
(*masked) wouldn't be cleared. Thus any of the existing bits set
that were passed in would be preserved in the output.

The caller in if_ath - ath_intr() - wasn't setting the masked value
to 0 before calling ath_hal_getisr(), so anything that was present
in that uninitialised variable would be preserved in the case above
of AR_ISR=0, AR_INTR_SYNC_CAUSE != 0; and if the HAL_INT_FATAL bit
was set, a fatal condition would be interpreted and the chip was
reset.

This patch does the following:

* ath_intr() - set masked to 0 before calling ath_hal_getisr();
* ar5416GetPendingInterrupts() - clear (*masked) before processing
  continues; so if the interrupt source is AR_INTR_SYNC_CAUSE
  and it isn't fatal, the hardware isn't reset via returning
  HAL_INT_FATAL.

This doesn't fix any underlying errors which trigger
AR_INTR_SYNC_LOCAL_TIMEOUT - which is a bus timeout of some
sort - so that likely should be further investigated.
2011-04-23 06:37:09 +00:00
..
ath_hal Fix a corner-case of interrupt handling which resulted in potentially 2011-04-23 06:37:09 +00:00
ath_rate After discussing with Bernhard, the "right" way in net80211 to check 2011-03-25 10:55:25 +00:00
ah_osdep.c Make the alq log path tunable 2011-04-05 16:14:54 +00:00
ah_osdep.h Fix AR5416 and later parts when building with AH_DEBUG or similar defined: 2009-07-06 20:51:54 +00:00
if_ath_ahb.c Break out the ath PCI logic into a separate device/module. 2011-03-31 08:07:13 +00:00
if_ath_debug.c Break out the debug macros from if_ath.c into if_ath_debug.[ch] . 2011-01-29 05:08:21 +00:00
if_ath_debug.h Break out the debug macros from if_ath.c into if_ath_debug.[ch] . 2011-01-29 05:08:21 +00:00
if_ath_keycache.c Break the keycache management functions out into if_ath_keycache.c . 2011-03-02 17:19:54 +00:00
if_ath_keycache.h Break the keycache management functions out into if_ath_keycache.c . 2011-03-02 17:19:54 +00:00
if_ath_misc.h Migrate the sysctl related routines (statistics, debugging, etc) out of 2011-03-02 16:03:19 +00:00
if_ath_pci.c Break out the ath PCI logic into a separate device/module. 2011-03-31 08:07:13 +00:00
if_ath_sysctl.c Add TX carrier sense timeout statistics. 2011-04-18 14:06:18 +00:00
if_ath_sysctl.h Migrate the sysctl related routines (statistics, debugging, etc) out of 2011-03-02 16:03:19 +00:00
if_ath_tx_ht.c After discussing with Bernhard, the "right" way in net80211 to check 2011-03-25 10:55:25 +00:00
if_ath_tx_ht.h The current code used the fields in ath_set11nratescenario() . Use them 2011-02-12 02:14:19 +00:00
if_ath_tx.c Add in HT protection but disable it by default. 2011-03-28 11:48:49 +00:00
if_ath_tx.h Migrate the TX path code out of if_ath and into a separate source file. 2011-01-29 11:35:23 +00:00
if_ath.c Fix a corner-case of interrupt handling which resulted in potentially 2011-04-23 06:37:09 +00:00
if_athioctl.h Add TX carrier sense timeout statistics. 2011-04-18 14:06:18 +00:00
if_athrate.h Add a new method to the rate control modules which extract out the 2011-02-01 08:10:18 +00:00
if_athvar.h Add global TX timeout handling. 2011-04-18 12:15:43 +00:00