diff options
author | Stephane Grosjean <s.grosjean@peak-system.com> | 2021-09-29 16:21:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-27 09:32:39 +0200 |
commit | 87e08065b1a8317cdf750c9206b1f3ae2beb88f7 (patch) | |
tree | 7178790f7728d6b14d849f169edc90cf4b1c3847 | |
parent | 70cf33bb9012ffc64523a59849940b27e34f6f82 (diff) | |
download | linux-stable-87e08065b1a8317cdf750c9206b1f3ae2beb88f7.tar.gz linux-stable-87e08065b1a8317cdf750c9206b1f3ae2beb88f7.tar.bz2 linux-stable-87e08065b1a8317cdf750c9206b1f3ae2beb88f7.zip |
can: peak_usb: pcan_usb_fd_decode_status(): fix back to ERROR_ACTIVE state notification
commit 3d031abc7e7249573148871180c28ecedb5e27df upstream.
This corrects the lack of notification of a return to ERROR_ACTIVE
state for USB - CANFD devices from PEAK-System.
Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEAK new CANFD USB adapters")
Link: https://lore.kernel.org/all/20210929142111.55757-1-s.grosjean@peak-system.com
Cc: stable@vger.kernel.org
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.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/usb/peak_usb/pcan_usb_fd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c index 2e62cdc7ec7a..1c3f95a63940 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c @@ -559,11 +559,10 @@ static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if, } else if (sm->channel_p_w_b & PUCAN_BUS_WARNING) { new_state = CAN_STATE_ERROR_WARNING; } else { - /* no error bit (so, no error skb, back to active state) */ - dev->can.state = CAN_STATE_ERROR_ACTIVE; + /* back to (or still in) ERROR_ACTIVE state */ + new_state = CAN_STATE_ERROR_ACTIVE; pdev->bec.txerr = 0; pdev->bec.rxerr = 0; - return 0; } /* state hasn't changed */ |