From: Helmut Schaa Date: Sat, 6 Aug 2011 11:13:48 +0000 (+0200) Subject: rt2x00: Fix PCI interrupt processing race on SMP systems X-Git-Tag: v3.2-rc1~129^2~422^2^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abc11994112bf7441519e35f51c29ff5de5b0d4d;p=pandora-kernel.git 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 Signed-off-by: Ivo van Doorn Signed-off-by: John W. Linville --- Reading git-diff-tree failed