linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3]  can: esd_usb: Fixes
@ 2025-09-24 17:30 Stefan Mätje
  2025-09-24 17:30 ` [PATCH v3 1/3] can: esd_usb: Fix not detecting version reply in probe routine Stefan Mätje
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stefan Mätje @ 2025-09-24 17:30 UTC (permalink / raw)
  To: Frank Jungclaus, Marc Kleine-Budde, Vincent Mailhol, linux-can,
	socketcan
  Cc: David S . Miller, Jakub Kicinski, Oliver Hartkopp, Simon Horman,
	Wolfgang Grandegger, netdev

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/

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/
 v2: https://lore.kernel.org/linux-can/20250821143422.3567029-1-stefan.maetje@esd.eu/

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/
  - 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


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

end of thread, other threads:[~2025-09-26 19:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24 17:30 [PATCH v3 0/3] can: esd_usb: Fixes Stefan Mätje
2025-09-24 17:30 ` [PATCH v3 1/3] can: esd_usb: Fix not detecting version reply in probe routine Stefan Mätje
2025-09-24 17:30 ` [PATCH v3 2/3] can: esd_usb: Fix handling of TX context objects Stefan Mätje
2025-09-24 17:30 ` [PATCH v3 3/3] can: esd_usb: Add watermark handling for TX jobs Stefan Mätje
2025-09-25  0:27   ` Jakub Kicinski
2025-09-26  1:35     ` Stefan Mätje
2025-09-26 19:50       ` Jakub Kicinski

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).