Skip to content

Commit 120ef1a

Browse files
jassarssongregkh
authored andcommitted
can: kvaser_usb: Ignore CMD_FLUSH_QUEUE_REPLY messages
commit e1d2d1329a5722dbecc9c278303fcc4aa01f8790 upstream. 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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c1b0921 commit 120ef1a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/net/can/usb/kvaser_usb.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ static inline bool kvaser_is_usbcan(const struct usb_device_id *id)
134134
#define CMD_RESET_ERROR_COUNTER 49
135135
#define CMD_TX_ACKNOWLEDGE 50
136136
#define CMD_CAN_ERROR_EVENT 51
137+
#define CMD_FLUSH_QUEUE_REPLY 68
137138

138139
#define CMD_LEAF_USB_THROTTLE 77
139140
#define CMD_LEAF_LOG_MESSAGE 106
@@ -1297,6 +1298,11 @@ static void kvaser_usb_handle_message(const struct kvaser_usb *dev,
12971298
goto warn;
12981299
break;
12991300

1301+
case CMD_FLUSH_QUEUE_REPLY:
1302+
if (dev->family != KVASER_LEAF)
1303+
goto warn;
1304+
break;
1305+
13001306
default:
13011307
warn: dev_warn(dev->udev->dev.parent,
13021308
"Unhandled message (%d)\n", msg->id);

0 commit comments

Comments
 (0)