can: sja1000: fix isr hang when hw is unplugged under load
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 15 Feb 2012 16:51:56 +0000 (17:51 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 20 Feb 2012 10:36:56 +0000 (11:36 +0100)
commita7762b10c12a70c5dbf2253142764b728ac88c3a
treedd2dba7c245118fee835fb72935ff885e7fddda8
parent64f0a836f600e9c31ffd511713ab5d328aa96ac8
can: sja1000: fix isr hang when hw is unplugged under load

In the case of hotplug enabled devices (PCMCIA/PCIeC) the removal of the
hardware can cause an infinite loop in the common sja1000 isr.

Use the already retrieved status register to indicate a possible hardware
removal and double check by reading the mode register in sja1000_is_absent.

Cc: stable@kernel.org [3.2+]
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/sja1000/sja1000.c