From: Olivier Sobrie Date: Thu, 10 Apr 2014 19:44:21 +0000 (+0200) Subject: can: kvaser_usb: add retries/timeout to kvaser_usb_wait_msg() X-Git-Tag: omap-for-v3.16/fixes-against-rc1~36^2~320^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e59e36e7333702d1d835113ced85243bb7f30f99;p=pandora-kernel.git 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 Signed-off-by: Marc Kleine-Budde --- Reading git-diff-tree failed