diff options
author | Jimmy Assarsson <jimmyassarsson@gmail.com> | 2017-10-24 12:23:29 +0200 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-11-05 23:54:38 -0500 |
commit | 3da77feabb846d4bc357c3a2944aa20f07e0a880 (patch) | |
tree | 2fed14ea49806d5f64a8a2849e910d8bcfe453f2 | |
parent | a8bd849fd6ec8c7a8215877ee890e9b66f13c76d (diff) |
can: kvaser_usb: Ignore CMD_FLUSH_QUEUE_REPLY messages
[ Upstream commit e1d2d1329a5722dbecc9c278303fcc4aa01f8790 ]
To avoid kernel warning "Unhandled message (68)", ignore the
CMD_FLUSH_QUEUE_REPLY message for now.
As of Leaf v2 firmware version v4.1.844 (2017-02-15), flush tx queue is
synchronous. There is a capability bit indicating whether flushing tx
queue is synchronous or asynchronous.
A proper solution would be to query the device for capabilities. If the
synchronous tx flush capability bit is set, we should wait for
CMD_FLUSH_QUEUE_REPLY message, while flushing the tx queue.
Signed-off-by: Jimmy Assarsson <jimmyassarsson@gmail.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r-- | drivers/net/can/usb/kvaser_usb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index 4700485c2782..dc77225227c7 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b/drivers/net/can/usb/kvaser_usb.c @@ -134,6 +134,7 @@ static inline bool kvaser_is_usbcan(const struct usb_device_id *id) #define CMD_RESET_ERROR_COUNTER 49 #define CMD_TX_ACKNOWLEDGE 50 #define CMD_CAN_ERROR_EVENT 51 +#define CMD_FLUSH_QUEUE_REPLY 68 #define CMD_LEAF_USB_THROTTLE 77 #define CMD_LEAF_LOG_MESSAGE 106 @@ -1298,6 +1299,11 @@ static void kvaser_usb_handle_message(const struct kvaser_usb *dev, goto warn; break; + case CMD_FLUSH_QUEUE_REPLY: + if (dev->family != KVASER_LEAF) + goto warn; + break; + default: warn: dev_warn(dev->udev->dev.parent, "Unhandled message (%d)\n", msg->id); |