summaryrefslogtreecommitdiff
path: root/drivers/net/can/kvaser_pciefd.c
diff options
context:
space:
mode:
authorJimmy Assarsson <extja@kvaser.com>2023-05-16 16:43:14 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2023-05-17 10:02:40 +0300
commitbf7ac55e991ca177f1ac16be51152f1ef291a4df (patch)
tree8acc4778a9b3c9b220090ecc2253e8f60ef32ddc /drivers/net/can/kvaser_pciefd.c
parentaed0e6ca7dbb8fbea9bc69c9ac663d5533c8c5d8 (diff)
downloadlinux-bf7ac55e991ca177f1ac16be51152f1ef291a4df.tar.xz
can: kvaser_pciefd: Clear listen-only bit if not explicitly requested
The listen-only bit was never cleared, causing the controller to always use listen-only mode, if previously set. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: stable@vger.kernel.org Signed-off-by: Jimmy Assarsson <extja@kvaser.com> Link: https://lore.kernel.org/r/20230516134318.104279-3-extja@kvaser.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/kvaser_pciefd.c')
-rw-r--r--drivers/net/can/kvaser_pciefd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index 867b421b9506..cdc894d12885 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -554,6 +554,8 @@ static void kvaser_pciefd_setup_controller(struct kvaser_pciefd_can *can)
if (can->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
mode |= KVASER_PCIEFD_KCAN_MODE_LOM;
+ else
+ mode &= ~KVASER_PCIEFD_KCAN_MODE_LOM;
mode |= KVASER_PCIEFD_KCAN_MODE_EEN;
mode |= KVASER_PCIEFD_KCAN_MODE_EPEN;