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 1/6] can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop()
Date: Tue, 16 May 2023 15:43:13 +0200	[thread overview]
Message-ID: <20230516134318.104279-2-extja@kvaser.com> (raw)
In-Reply-To: <20230516134318.104279-1-extja@kvaser.com>

Set can.state to CAN_STATE_STOPPED in kvaser_pciefd_stop().
Without this fix, wrong CAN state was repported after the interface was
brought down.

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index 53e8a914c88b..867b421b9506 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -719,6 +719,7 @@ static int kvaser_pciefd_stop(struct net_device *netdev)
 		iowrite32(0, can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
 		del_timer(&can->bec_poll_timer);
 	}
+	can->can.state = CAN_STATE_STOPPED;
 	close_candev(netdev);
 
 	return ret;
-- 
2.40.0


  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 ` Jimmy Assarsson [this message]
2023-05-16 13:43 ` [PATCH 2/6] can: kvaser_pciefd: Clear listen-only bit if not explicitly requested Jimmy Assarsson
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-2-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.