freebsd-nq/sys
Adrian Chadd 6f5fe81e02 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
..
amd64 Make pmap_invalidate_cache_range() available for consumption on amd64. 2011-04-18 21:24:42 +00:00
arm Call init_param1() much earlier, so that msgbufsize is non-zero when we want 2011-04-19 15:05:12 +00:00
boot Remove all object files during 'make clean'. 2011-04-21 14:17:36 +00:00
bsm
cam Add basic support for DMA-capable ATA disks on DMA-incapable controller. 2011-04-20 13:27:50 +00:00
cddl Partially fix ZFS compat code for sparc64. 2011-04-08 11:08:26 +00:00
compat Regen. 2011-04-18 16:32:47 +00:00
conf Add g_eli_key_cache.c to GELI. 2011-04-21 21:15:11 +00:00
contrib Add firmware images for the 6000 series g2a and g2b adapters. 2011-04-20 17:34:09 +00:00
crypto
ddb Extend the DDB command "watchdog" with the ability to specify a timeout 2011-04-05 14:15:58 +00:00
dev Fix a corner-case of interrupt handling which resulted in potentially 2011-04-23 06:37:09 +00:00
fs Remove the nm_mtx mutex locking from the test for 2011-04-21 19:56:06 +00:00
gdb
geom If number of keys for the given provider doesn't exceed the limit, 2011-04-21 13:35:20 +00:00
gnu
i386 Do not invoke resume event handlers if suspend was successful. 2011-04-19 16:30:17 +00:00
ia64 Use the new arch_loadaddr I/F to align ELF objects to PBVM page 2011-04-03 23:49:20 +00:00
isa - Enable an extra debugging bootverbose printf when probing ISA PNP cards 2011-03-29 12:38:13 +00:00
kern Utilize vfs_sanitizeopts() in vfs_mergeopts() to merge options. Because 2011-04-22 07:26:09 +00:00
kgssapi
libkern
mips We don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCI 2011-04-12 07:49:11 +00:00
modules Instead of allocating memory for all the keys at device attach, 2011-04-21 13:31:43 +00:00
net When removing ifnets, we should first remove the reference to ifnet 2011-04-04 07:45:08 +00:00
net80211 Revert r220907 and r220915. 2011-04-22 00:44:27 +00:00
netatalk
netgraph LibAliasInit() should allocate memory with M_WAITOK flag. Modify it 2011-04-18 20:07:08 +00:00
netinet Use size_t for sopt_valsize. 2011-04-21 08:18:55 +00:00
netinet6 MFp4 CH=191760,191770: 2011-04-20 08:05:23 +00:00
netipsec Do not allow recursive RFC3173 IPComp payload. 2011-04-01 14:13:49 +00:00
netipx
netnatm
netncp
netsmb
nfs
nfsclient - Fixed nfs_printf() to use vprintf(). 2011-04-13 12:46:25 +00:00
nfsserver
nlm
ofed Even though this block is not compiled currently, properly assign 2011-04-12 01:19:23 +00:00
opencrypto After the r219999 is merged to stable/8, rename fallocf(9) to falloc(9) 2011-04-01 13:28:34 +00:00
pc98 Reinstate cpu_est_clockrate() support for P-state invariant TSC if APERF and 2011-04-12 23:04:01 +00:00
pci
powerpc Add leading zeros when printing the physical memory chunks on __powerpc64__. 2011-04-19 07:49:58 +00:00
rpc Fix a couple of mbuf leaks introduced by r217242. I do 2011-04-13 00:03:49 +00:00
security
sparc64 Correct spelling in comments. 2011-04-22 09:31:40 +00:00
sun4v Correct spelling in comments. 2011-04-22 12:42:41 +00:00
sys Regen. 2011-04-18 16:32:47 +00:00
teken
tools GNU awk does not output escaped newlines in multi-line printc statements. This 2011-03-31 21:33:33 +00:00
ufs - Refactor softdep_setup_freeblocks() into a set of functions to prepare 2011-04-11 01:43:59 +00:00
vm Fix several places to ignore processes that are not yet fully constructed. 2011-04-06 17:47:22 +00:00
x86 Use newly added rdtsc32() for DELAY(9) as well. 2011-04-14 19:11:45 +00:00
xdr
xen
Makefile