can: flexcan: fix shutdown: first disable chip, then all interrupts
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 19 Feb 2014 11:00:51 +0000 (12:00 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 1 Apr 2014 23:58:57 +0000 (00:58 +0100)
commit5fdcc8da46cec9fc4f240dbd7ec1e70713d464cc
tree202bbc2cb6b5787fd887fcd336e1aaeb88592696
parent955f8acb2df06b1e28c88dc653293f51b42eb8f0
can: flexcan: fix shutdown: first disable chip, then all interrupts

commit 5be93bdda64e85450598c6e97f79fb8f6acf30e0 upstream.

When shutting down the CAN interface (ifconfig canX down) during high CAN bus
loads, the CAN core might hang and freeze the whole CPU.

This patch fixes the shutdown sequence by first disabling the CAN core then
disabling all interrupts.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/can/flexcan.c