]> git.baikalelectronics.ru Git - kernel.git/commit
can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device
authorJimmy Assarsson <extja@kvaser.com>
Mon, 10 Oct 2022 18:52:28 +0000 (20:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:00 +0000 (11:41 +0100)
commitc1e177e7a200b370e4695a57d080eb5ba88a51b6
tree1844f884a00f12e5a33a387eb58a6ff25e50bab3
parentef08ccd62ace9ccde4dfe9e829dcb16b501c18bc
can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device

[ Upstream commit 35364f5b41a4917fe94a3f393d149b63ec583297 ]

Use the CMD_GET_CAPABILITIES_REQ command to query the device for certain
capabilities. We are only interested in LISTENONLY mode and wither the
device reports CAN error counters.

Fixes: d9f21bf91c45 ("can: kvaser_usb: Add support for Kvaser CAN/USB devices")
Reported-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Tested-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
Link: https://lore.kernel.org/all/20221010185237.319219-3-extja@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c