Skip to content

Commit

Permalink
can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop()
Browse files Browse the repository at this point in the history
commit aed0e6c 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: 26ad340 ("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>
  • Loading branch information
Jimmy Assarsson authored and gregkh committed May 24, 2023
1 parent 9cd1025 commit 24bdfcb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/can/kvaser_pciefd.c
Expand Up @@ -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;
Expand Down

0 comments on commit 24bdfcb

Please sign in to comment.