]> bbs.cooldavid.org Git - net-next-2.6.git/commit - drivers/net/tg3.c
[TG3]: Exit irq handler during chip reset.
authorMichael Chan <mchan@broadcom.com>
Sun, 25 Mar 2007 03:57:11 +0000 (20:57 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 26 Mar 2007 01:48:08 +0000 (18:48 -0700)
commitd18edcb212d7dc864a59e6aa9b6b9826299e0210
tree341955faabd7db53af392f4bdbd856dcbe6f8d11
parent1c46ae05d96f77f349ae60c799acb6ac6ddf07a8
[TG3]: Exit irq handler during chip reset.

On most tg3 chips, the memory enable bit in the PCI command register
gets cleared during chip reset and must be restored before accessing
PCI registers using memory cycles.  The chip does not generate
interrupt during chip reset, but the irq handler can still be called
because of irq sharing or irqpoll.  Reading a register in the irq
handler can cause a master abort in this scenario and may result in a
crash on some architectures.

Use the TG3_FLAG_CHIP_RESETTING flag to tell the irq handler to exit
without touching any registers.  The checking of the flag is in the
"slow" path of the irq handler and will not affect normal performance.
The msi handler is not shared and therefore does not require checking
the flag.

Thanks to Bernhard Walle <bwalle@suse.de> for reporting the problem.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c
drivers/net/tg3.h