can: isotp: fix support for transmission of SF without flow control
authorOliver Hartkopp <socketcan@hartkopp.net>
Mon, 21 Aug 2023 14:45:46 +0000 (16:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:11:03 +0000 (16:11 +0200)
commit39d43b9cdfe8b02d9dc28994ddd578b9e5f34a7e
treeb6aaccb09d5f6e40989f0e12ac00099d9e74ae3e
parentf41781b9d8a4af2b1ede0e1045b62359cf6b66b4
can: isotp: fix support for transmission of SF without flow control

[ Upstream commit 0bfe71159230bab79ee230225ae12ffecbb69f3e ]

The original implementation had a very simple handling for single frame
transmissions as it just sent the single frame without a timeout handling.

With the new echo frame handling the echo frame was also introduced for
single frames but the former exception ('simple without timers') has been
maintained by accident. This leads to a 1 second timeout when closing the
socket and to an -ECOMM error when CAN_ISOTP_WAIT_TX_DONE is selected.

As the echo handling is always active (also for single frames) remove the
wrong extra condition for single frames.

Fixes: 9f39d36530e5 ("can: isotp: add support for transmission without flow control")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/r/20230821144547.6658-2-socketcan@hartkopp.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/can/isotp.c