summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2024-05-28 10:06:48 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2024-06-21 11:50:17 +0300
commit9ad1da14ab3bf23087ae45fe399d84a109ddb81a (patch)
treef8e6dbf0fde5deba667e3ece0a3a3cb97400db9d
parentb7cdf1dd5d2a2d8200efd98d1893684db48fe134 (diff)
downloadlinux-9ad1da14ab3bf23087ae45fe399d84a109ddb81a.tar.xz
net: can: j1939: recover socket queue on CAN bus error during BAM transmission
Addresses an issue where a CAN bus error during a BAM transmission could stall the socket queue, preventing further transmissions even after the bus error is resolved. The fix activates the next queued session after the error recovery, allowing communication to continue. Fixes: 9d71dd0c70099 ("can: add support of SAE J1939 protocol") Cc: stable@vger.kernel.org Reported-by: Alexander Hölzl <alexander.hoelzl@gmx.net> Tested-by: Alexander Hölzl <alexander.hoelzl@gmx.net> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/all/20240528070648.1947203-1-o.rempel@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--net/can/j1939/transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index c6569f98d251..4be73de5033c 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -1696,6 +1696,8 @@ static int j1939_xtp_rx_rts_session_active(struct j1939_session *session,
j1939_session_timers_cancel(session);
j1939_session_cancel(session, J1939_XTP_ABORT_BUSY);
+ if (session->transmission)
+ j1939_session_deactivate_activate_next(session);
return -EBUSY;
}