tg3: Allow screaming interrupt detection
authorMatt Carlson <mcarlson@broadcom.com>
Mon, 20 Apr 2009 06:55:01 +0000 (06:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Apr 2009 08:41:00 +0000 (01:41 -0700)
commit624f8e5082efd0348ccf7e3d3f4bfc41efead26c
treebd6bfc88f62b49fc377101b4f268b0b00b101ea7
parente5e9743bb7429f53c83ad69b432f7b661e74c3f0
tg3: Allow screaming interrupt detection

The tg3 driver's ISR is coded to accept interrupts as its own if the
status block tag does not equal the last tag the driver has seen.  The
last_tag field is updated from tg3_poll.  In a screaming interrupt
situation from another device sharing tg3's IRQ, tg3_poll does not get
a chance to be called, so the last_tag will always be out of sync with
the status block tag.  Consequently, the driver will continually
declare the screaming interrupts as its own, thus thwarting the
screaming interrupt detection logic.

This patch solves the problem by creating a new last_irq_tag member and
recording the status block tag in the ISR.  The ISR then checks the
last_irq_tag for interrupt ownership.

Many thanks to John Marvin for the detailed bug report and analysis and
Michael Chan for the bugfix.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Tested-by: John Marvin <jsm@fc.hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c
drivers/net/tg3.h