All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jimmy Assarsson <extja@kvaser.com>
To: linux-can@vger.kernel.org
Cc: Jimmy Assarsson <jimmyassarsson@gmail.com>,
	stable@vger.kernel.org, Jimmy Assarsson <extja@kvaser.com>
Subject: [PATCH 2/6] can: kvaser_pciefd: Clear listen-only bit if not explicitly requested
Date: Tue, 16 May 2023 15:43:14 +0200	[thread overview]
Message-ID: <20230516134318.104279-3-extja@kvaser.com> (raw)
In-Reply-To: <20230516134318.104279-1-extja@kvaser.com>

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>
---
 drivers/net/can/kvaser_pciefd.c | 2 ++
 1 file changed, 2 insertions(+)

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;
-- 
2.40.0


  parent reply	other threads:[~2023-05-16 13:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 13:43 [PATCH 0/6] can: kvaser_pciefd: Bug fixes Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 1/6] can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop() Jimmy Assarsson
2023-05-16 13:43 ` Jimmy Assarsson [this message]
2023-05-16 13:43 ` [PATCH 3/6] can: kvaser_pciefd: Call request_irq() before enabling interrupts Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 4/6] can: kvaser_pciefd: Empty SRB buffer in probe Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 5/6] can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 6/6] can: kvaser_pciefd: Disable interrupts in probe error path Jimmy Assarsson
2023-05-17  7:03 ` [PATCH 0/6] can: kvaser_pciefd: Bug fixes Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230516134318.104279-3-extja@kvaser.com \
    --to=extja@kvaser.com \
    --cc=jimmyassarsson@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.