]> git.baikalelectronics.ru Git - kernel.git/commit
can: c_can: Make bus off interrupt disable logic work
authorThomas Gleixner <tglx@linutronix.de>
Fri, 11 Apr 2014 08:13:11 +0000 (08:13 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Apr 2014 20:08:55 +0000 (22:08 +0200)
commit151eff488ac1a6b0f3fe6b55042302045a98b46b
tree7c85a445c90d79bd972fc10dc644cccc1b363b16
parent95b0978fa4e75ad417d4a6a8d2c3f17a61dde605
can: c_can: Make bus off interrupt disable logic work

The state change handler is called with device interrupts disabled
already. So no point in disabling them again when we enter bus off
state.

But what's worse is that we reenable the interrupts at the end of NAPI
poll unconditionally. So c_can_start() which is called from the
restart timer can trigger interrupts which confuse the hell out of the
half reinitialized driver/hw.

Remove the pointless device interrupt disable in the BUS_OFF handler
and prevent reenabling the device interrupts at the end of the poll
routine when the current state is BUS_OFF.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c