r8169: avoid losing MSI interrupts
authorDavid Dillow <dave@thedillows.org>
Wed, 22 Jul 2009 16:17:06 +0000 (09:17 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 30 Jul 2009 23:06:14 +0000 (16:06 -0700)
commit2fe2c6bb0303064bde3b8ca0fd90c4367868486e
tree89ba8600e24a224a4913223c0fe1ab9104f7dbf4
parent4afc4dd4a332ebb48fde7cd30822ab5c5cd80d2d
r8169: avoid losing MSI interrupts

[ Upstream commit f11a377b3f4e897d11f0e8d1fc688667e2f19708 ]

The 8169 chip only generates MSI interrupts when all enabled event
sources are quiescent and one or more sources transition to active. If
not all of the active events are acknowledged, or a new event becomes
active while the existing ones are cleared in the handler, we will not
see a new interrupt.

The current interrupt handler masks off the Rx and Tx events once the
NAPI handler has been scheduled, which opens a race window in which we
can get another Rx or Tx event and never ACK'ing it, stopping all
activity until the link is reset (ifconfig down/up). Fix this by always
ACK'ing all event sources, and loop in the handler until we have all
sources quiescent.

Signed-off-by: David Dillow <dave@thedillows.org>
Tested-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/r8169.c