[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35836b8f8b2d8e08679fa719a0f7902928fdc1d3.camel@esd.eu>
Date: Fri, 15 Aug 2025 15:29:21 +0000
From: Stefan Mätje <stefan.maetje@....eu>
To: "mkl@...gutronix.de" <mkl@...gutronix.de>
CC: "mailhol@...nel.org" <mailhol@...nel.org>, "socketcan@...tkopp.net"
<socketcan@...tkopp.net>, "linux-can@...r.kernel.org"
<linux-can@...r.kernel.org>, socketcan <socketcan@....eu>, Frank Jungclaus
<frank.jungclaus@....eu>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"horms@...nel.org" <horms@...nel.org>, "olivier@...rie.be"
<olivier@...rie.be>
Subject: Re: [PATCH 3/6] can: esd_usb: Fix handling of TX context objects
Am Mittwoch, dem 13.08.2025 um 10:14 +0200 schrieb Marc Kleine-Budde:
> On 11.08.2025 23:06:08, Stefan Mätje wrote:
> > For each TX CAN frame submitted to the USB device the driver saves the
> > echo skb index in struct esd_tx_urb_context context objects. If the
> > driver runs out of free context objects CAN transmission stops.
> >
> > This patch fixes some spots where such context objects are not freed
> > correctly.
> >
> > In esd_usb_tx_done_msg() the check for netif_device_present() is moved
> > after the identification and release of TX context and the release of
> > the echo skb. This is allowed even if netif_device_present() would
> > return false because the mentioned operations don't touch the device
> > itself but only free local acquired resources. This keeps the context
> > handling with the acknowledged TX jobs in sync.
> >
> > In esd_usb_start_xmit() a check is performed to see whether a context
> > object could be allocated. Added a netif_stop_queue() there before the
> > function is aborted. This makes sure the network queue is stopped and
> > avoids getting tons of log messages in a situation without free TX
> > objects. The adjacent log message now also prints the active jobs
> > counter making a cross check between active jobs and "no free context"
> > condition possible.
> >
> > In esd_usb_start_xmit() the error handling of usb_submit_urb() missed to
> > free the context object together with the echo skb and decreasing the
> > job count.
> >
> > Signed-off-by: Stefan Mätje <stefan.maetje@....eu>
>
> Please add a Fixes tag.
>
> Marc
I've looked it up. This code was already this way in the initial release.
I'll add then:
Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device")
Powered by blists - more mailing lists