]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Mar 2012 00:31:21 +0000 (16:31 -0800)
commit9bda01cc81b40639565e63223d7c5413bb15b99a
tree75c55a4f81d57d052e9f8f09faff747dc718765b
parentc3d65b135f856651b2fa8606a7799a9f33d8f113
can: sja1000: fix isr hang when hw is unplugged under load

commit a7762b10c12a70c5dbf2253142764b728ac88c3a upstream.

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.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/sja1000/sja1000.c