]> git.baikalelectronics.ru Git - kernel.git/commit
can: c_can: Do basic c_can configuration _before_ enabling the interrupts
authorJan Altenberg <jan@linutronix.de>
Tue, 22 Mar 2011 01:19:26 +0000 (18:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Mar 2011 01:19:26 +0000 (18:19 -0700)
commit55ceecc77a84ed9923f16bf808a115a8ce34753a
treee6ef8a3050e4a893e9e58c789dfe9289867ee9aa
parente45e1055e0d77cc7c5847413e0712394a4dd3f42
can: c_can: Do basic c_can configuration _before_ enabling the interrupts

I ran into some trouble while testing the SocketCAN driver for the BOSCH
C_CAN controller. The interface is not correctly initialized, if I put
some CAN traffic on the line, _while_ the interface is being started
(which means: the interface doesn't come up correcty, if there's some RX
traffic while doing 'ifconfig can0 up').

The current implementation enables the controller interrupts _before_
doing the basic c_can configuration. I think, this should be done the
other way round.

The patch below fixes things for me.

Signed-off-by: Jan Altenberg <jan@linutronix.de>
Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/c_can/c_can.c