diff options
author | Jimmy Assarsson | 2023-05-16 15:43:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-05-24 17:32:49 +0100 |
commit | 24bdfcb09947da429bcead9eda475227307c9961 (patch) | |
tree | 9588e9295e5e22f873231247462e2c0455e02d27 | |
parent | 9cd1025b1a46713eb644935b7de6d4751257d43f (diff) |
can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop()
commit aed0e6ca7dbb8fbea9bc69c9ac663d5533c8c5d8 upstream.
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>
Link: https://lore.kernel.org/r/20230516134318.104279-2-extja@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/net/can/kvaser_pciefd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c index bcad11709bc9..589a4b044492 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; |