[PATCH v3 0/3] can: esd_usb: Fixes
From: Stefan Mätje <stefan.maetje@esd.eu>
Date: 2025-09-24 17:30:41
Also in:
linux-can
This was originally a patch series of 5 patches that is split into two series, removing the forth and fifth patch. I keep increasing the reroll count from the original series. The first patch fixes a condition where the esd_usb CAN driver may not detect connected CAN-USB devices correctly after a reboot. This patch was already presented on the list before starting this series and changes due to that feedback are integrated. References: https://lore.kernel.org/linux-can/d7fd564775351ea8a60a6ada83a0368a99ea6b19.camel@esd.eu/ (local) The second patch fixes situations where the the handling of TX context objects for each sent CAN frame could go out of sync with the acknowledged or erroneous TX jobs and then lose free TX context objects. This could lead to the driver incapable of sending frames. The third patch adds TX FIFO watermark to eliminate occasional error messages and significantly reduce the number of calls to netif_start_queue() and netif_stop_queue(). Previous versions: v1: https://lore.kernel.org/linux-can/20250811210611.3233202-1-stefan.maetje@esd.eu/ (local) v2: https://lore.kernel.org/linux-can/20250821143422.3567029-1-stefan.maetje@esd.eu/ (local) Changes in v3: - Split the patch series of 5 patches in two keeping only the first three with fixes in this series. - Rebased to linux-can. - Take the patches from the pull request "can 2025-09-22" to preserve reworded commit messages. References: https://lore.kernel.org/linux-can/20250922100913.392916-1-mkl@pengutronix.de/ (local) - In the second patch use net_ratelimit() to rate limit a changed netdev_warn() message. Changes in v2: - Withdraw "can: esd_usb: Fix possible calls to kfree() with NULL". - Reworked now first patch: - Functions esd_usb_req_version() and esd_usb_recv_version() now allocate their own transfer buffers. - Check whether the announced message size fits into received data block. - Second patch: Added a Fixes tag - Third patch: Added a Fixes tag - Forth patch: - Convert all occurrences of error status prints to use "ERR_PTR(err)" instead of printing the decimal value of "err". - Rename retval to err in esd_usb_read_bulk_callback() to make the naming of error status variables consistent with all other functions. Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu> --- Stefan Mätje (3): can: esd_usb: Fix not detecting version reply in probe routine can: esd_usb: Fix handling of TX context objects can: esd_usb: Add watermark handling for TX jobs drivers/net/can/usb/esd_usb.c | 175 +++++++++++++++++++++++++--------- 1 file changed, 129 insertions(+), 46 deletions(-) base-commit: c443be70aaee42c2d1d251e0329e0a69dd96ae54 -- 2.34.1