]> git.baikalelectronics.ru Git - kernel.git/commit
rt2x00: Fix PCI interrupt processing race on SMP systems
authorHelmut Schaa <helmut.schaa@googlemail.com>
Sat, 6 Aug 2011 11:13:48 +0000 (13:13 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 9 Aug 2011 19:52:08 +0000 (15:52 -0400)
commit50cbd32ef4f1f0a3d1ba62dc1d53c3bab7471776
tree88b11da5cdec1a7a10ff7a388d29b94902c69653
parentbd073f8352369c1e17ecd8fb11743e6654a822d5
rt2x00: Fix PCI interrupt processing race on SMP systems

When toggle_irq is called for PCI devices to disable device interrupts
it used tasklet_disable to wait for a possibly running tasklet to finish.
However, on SMP systems the tasklet might still be scheduled on another CPU.
Instead, use tasklet_kill to ensure that all scheduled tasklets are finished
before returning from toggle_irq.

Furthermore, it was possible that a tasklet reenabled its interrupt even
though interrupts have been disabled already. Fix this by checking the
DEVICE_STATE_ENABLED_RADIO flag before reenabling single interrupts
during tasklet processing.

While at it also enable/kill the TBTT and PRETBTT tasklets in the
toggle_irq callback and only use tasklet_kill in stop_queue to wait
for a currently scheduled beacon update before returning.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2400pci.c
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rt2x00/rt61pci.c