linux_dsm_epyc7002/drivers/net/can/usb
Olivier Sobrie e59e36e733 can: kvaser_usb: add retries/timeout to kvaser_usb_wait_msg()
On some Kvaser hardware, the firmware returns extra messages after the
request for card info. For instance on a Leaf Light v2:
  --> CMD_GET_CARD_INFO
  <-- CMD_USB_THROTTLE
  <-- CMD_GET_CARD_INFO2
  <-- CMD_GET_CARD_INFO_REQ
When it happens, the probing function fails because we only read
the first usb message.

To overcome this issue, we add a mechanism of retries to the
kvaser_usb_wait_msg() function.

I tested this patch with the following hardware:
 - Kvaser Leaf Light
 - Kvaser Leaf Light v2
 - Kvaser USBCan R

This patch is necessary for the Leaf Light v2 hardware.

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-04-24 22:54:16 +02:00
..
peak_usb can: populate netdev::dev_id for udev discrimination 2014-03-17 09:20:16 +01:00
ems_usb.c can: Unify MTU settings for CAN interfaces 2014-03-17 09:20:16 +01:00
esd_usb2.c can: populate netdev::dev_id for udev discrimination 2014-03-17 09:20:16 +01:00
Kconfig can: usb_8dev: Add support for USB2CAN interface from 8 devices 2013-01-26 16:58:58 +01:00
kvaser_usb.c can: kvaser_usb: add retries/timeout to kvaser_usb_wait_msg() 2014-04-24 22:54:16 +02:00
Makefile can: usb_8dev: Add support for USB2CAN interface from 8 devices 2013-01-26 16:58:58 +01:00
usb_8dev.c linux-can-fixes-for-3.15-20140401 2014-04-01 17:49:50 -04:00