can: kvaser_usb: Don't send a RESET_CHIP for non-existing channels
authorAhmed S. Darwish <ahmed.darwish@valeo.com>
Mon, 5 Jan 2015 17:57:13 +0000 (12:57 -0500)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 Jan 2015 14:44:42 +0000 (15:44 +0100)
commit014ff2c59685cb8045247dea39a10e93855d4293
tree59b42489e169bb0a168a0a11e12c59444a7e4dd8
parent3a74797d57cb89da1940a2bbb989d14fc40713e3
can: kvaser_usb: Don't send a RESET_CHIP for non-existing channels

commit 5e7e6e0c9b47a45576c38b4a72d67927a5e049f7 upstream.

Recent Leaf firmware versions (>= 3.1.557) do not allow to send
commands for non-existing channels.  If a command is sent for a
non-existing channel, the firmware crashes.

Reported-by: Christopher Storah <Christopher.Storah@invetech.com.au>
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/can/usb/kvaser_usb.c