]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Fix crash in legacy onterrupt handler during ring reallocation
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 7 Dec 2010 19:24:45 +0000 (19:24 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 7 Dec 2010 19:30:19 +0000 (19:30 +0000)
commitf77481fb11ceeb0824c65412ccb77691684518a8
tree3911c0883429411e27f22db1e34436d75fbb937b
parent552b284290be4185e14179d375cc2936018aa292
sfc: Fix crash in legacy onterrupt handler during ring reallocation

If we are using a legacy interrupt, our IRQ may be shared and our
interrupt handler may be called even though interrupts are disabled on
the NIC. When we change ring sizes, we reallocate the event queue and
the interrupt handler may use an invalid pointer when called for
another device's interrupt.

Maintain a legacy_irq_enabled flag and test that at the top of the
interrupt handler.  Note that this problem results from the need to
work around broken INT_ISR0 reads, and does not affect the legacy
interrupt handler for Falcon A1.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/sfc/efx.c
drivers/net/sfc/net_driver.h
drivers/net/sfc/nic.c