]> git.karo-electronics.de Git - mv-sheeva.git/commit
mwl8k: keep TX_DONE interrupt masked while transmit reclaim is running
authorLennert Buytenhek <buytenh@wantstofly.org>
Fri, 8 Jan 2010 17:32:01 +0000 (18:32 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 12 Jan 2010 19:02:10 +0000 (14:02 -0500)
commit1e9f9de3b17db3aa358f39d6932662324178350d
tree433f956956d7745fc996eacc4771999badd5de2c
parentefb7c49a68cf206f35793d7799608e1d69a209f9
mwl8k: keep TX_DONE interrupt masked while transmit reclaim is running

By making use of the CLEAR_SEL feature of the mwl8k host interface
interrupt controller, we can keep the TX_DONE interrupt source masked
while the transmit reclaim tasklet is running (NAPI style) without
having to touch the interrupt controller's interrupt mask register
when entering or exiting polling mode, and without having to do any
more register reads/writes than we do now.

When CLEAR_SEL is enabled on the TX_DONE interrupt source, reading
the interrupt status register will clear the TX_DONE status bit if
it was set, allowing it to be set again if a new TX_DONE event arrives
while we are running the TX reclaim tasklet, but such a new event will
then not trigger another PCI interrupt until a zero is written to the
TX_DONE interrupt status register bit.

I.e., if we write a zero to the TX_DONE interrupt source bit in the
interrupt status register when the TX reclaim tasklet thinks it's
done, a PCI interrupt will be triggered if a new TX_DONE event arrived
from the hardware between us deciding that there is no more work to do
and re-enabling the TX_DONE interrupt source, thereby avoiding the
classic NAPI poll mode exit race that would otherwise occur.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c