linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] can: isotp: isotp_sendmsg(): return error on FC timeout on TX path
@ 2021-05-06 13:36 Marc Kleine-Budde
  2021-05-06 17:36 ` Oliver Hartkopp
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2021-05-06 13:36 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde, Oliver Hartkopp, Sottas Guillaume

Link: https://github.com/hartkopp/can-isotp/pull/43
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Sottas Guillaume (LMB) <Guillaume.Sottas@liebherr.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
Hey Sottas,

can you check if this fixes your problem and that normal operation
still works.

regards,
Marc

 net/can/isotp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/can/isotp.c b/net/can/isotp.c
index 9f94ad3caee9..823f047a28ad 100644
--- a/net/can/isotp.c
+++ b/net/can/isotp.c
@@ -954,6 +954,9 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
 	if (wait_tx_done) {
 		/* wait for complete transmission of current pdu */
 		wait_event_interruptible(so->wait, so->tx.state == ISOTP_IDLE);
+
+		if (sk->sk_err)
+			return sk->sk_err;
 	}
 
 	return size;
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Re: [PATCH RFC] can: isotp: isotp_sendmsg(): return error on FC timeout on TX path
@ 2021-05-07 12:29 Sottas Guillaume (LMB)
  2021-05-07 12:50 ` Marc Kleine-Budde
  0 siblings, 1 reply; 8+ messages in thread
From: Sottas Guillaume (LMB) @ 2021-05-07 12:29 UTC (permalink / raw)
  To: mkl; +Cc: Sottas Guillaume (LMB), linux-can, socketcan

Hello Marc,

Indeed the first version (with positive value) does not work, but I just tested the V2 of the patch, and work like a charm.
Let me know if I can help to get it integrated

Best regards,

Guillaume 



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-19  7:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 13:36 [PATCH RFC] can: isotp: isotp_sendmsg(): return error on FC timeout on TX path Marc Kleine-Budde
2021-05-06 17:36 ` Oliver Hartkopp
2021-05-07 10:00   ` Marc Kleine-Budde
2021-05-07 12:29 Sottas Guillaume (LMB)
2021-05-07 12:50 ` Marc Kleine-Budde
2021-05-07 14:12   ` Oliver Hartkopp
2021-05-07 14:18     ` Marc Kleine-Budde
     [not found]       ` <b3efce9895784f8ab6f5dee8ae03c604@liebherr.com>
2021-10-19  7:05         ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).