]> git.openfabrics.org - ~emulex/infiniband.git/commit
can: c_can: Fix startup logic
authorThomas Gleixner <tglx@linutronix.de>
Fri, 11 Apr 2014 08:13:10 +0000 (08:13 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Apr 2014 20:08:55 +0000 (22:08 +0200)
commitbed11db3d4095e5f818f5e8bf7f43ef2beb36d4e
tree71b380c8e8ef583fccf8217787d905cedb0b0e38
parent129eef2184218f4603f406945552ff4e58b05cf1
can: c_can: Fix startup logic

c_can_start() enables interrupts way too early. The first enabling
happens when setting the control mode in c_can_chip_config() and then
again at the end of the function.

But that happens before napi_enable() and that means that an interrupt
which comes in will disable interrupts again and call napi_schedule,
which ignores the request and the later napi_enable() is not making
thinks work either. So the interface is up with all device interrupts
disabled.

Move the device interrupt after napi_enable() and add it to the other
callsites of c_can_start() in c_can_set_mode() and c_can_power_up()

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