iwlwifi: fix PCI-E transport "inta" race
commit5e86a6c85ff0221f6125f0ffeec90e702ca91857
authorJohannes Berg <johannes.berg@intel.com>
Thu, 19 Jan 2012 16:20:57 +0000 (19 08:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2012 17:22:07 +0000 (3 09:22 -0800)
treef2702ae590340dc1df0ddd585424b7e48bca46c4
parent103e53a3d8d66aa7e7bc2521d705718325630946
iwlwifi: fix PCI-E transport "inta" race

commit b49ba04a3a0382e7314d990707c21094c410425a upstream.

When an interrupt comes in, we read the reason
bits and collect them into "trans_pcie->inta".
This happens with the spinlock held. However,
there's a bug resetting this variable -- that
happens after the spinlock has been released.
This means that it is possible for interrupts
to be missed if the reset happens after some
other interrupt reasons were already added to
the variable.

I found this by code inspection, looking for a
reason that we sometimes see random commands
time out. It seems possible that this causes
such behaviour, but I can't say for sure right
now since it happens extremely infrequently on
my test systems.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c