From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrey Konovalov <andreyknvl@gmail.com>,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
USB list <linux-usb@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: dwc3: unusual handling of setup requests with wLength == 0
Date: Fri, 18 Aug 2023 20:46:14 +0000 [thread overview]
Message-ID: <20230818204610.byxapbhaqxxnvqvm@synopsys.com> (raw)
In-Reply-To: <20230818194922.ys26zrqc4pocqq7q@synopsys.com>
On Fri, Aug 18, 2023, Thinh Nguyen wrote:
> >
> > Right. The difficulty doesn't involve the communication between the HCD
> > and the UDC hardware; it involves the communication between the UDC
> > driver and the gadget driver. Somehow they need to synchronize so that
> > when the gadget driver queues a usb_request, the UDC driver can tell
> > whether the request was meant for the earlier aborted control transfer
> > or the new active one. This can matter if the gadget driver has a
> > separate control thread (a work routine or a kthread, for example) that
> > could be queuing requests while the ->setup() callback is running.
> >
>
> Perhaps this can be improved and enforced from the core. At the moment,
> it should not be a problem for gadget driver with dwc3 driver (with a
> minor fix due to missing check).
>
Perhaps I'm too quick to respond to overlook what you've said. I've only
thinking about the UDC driver sequence and not the gadget driver
handling the givebacks. Yes if the gadget driver has a separate control
thread, that may be problematic.
BR,
Thinh
next prev parent reply other threads:[~2023-08-18 20:47 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 0:15 dwc3: unusual handling of setup requests with wLength == 0 Andrey Konovalov
2023-08-18 1:08 ` Thinh Nguyen
2023-08-18 2:37 ` Alan Stern
2023-08-18 3:10 ` Thinh Nguyen
2023-08-18 3:26 ` Thinh Nguyen
2023-08-18 3:42 ` Alan Stern
2023-08-18 19:49 ` Thinh Nguyen
2023-08-18 20:46 ` Thinh Nguyen [this message]
2023-08-18 23:06 ` Alan Stern
2023-08-19 0:06 ` Thinh Nguyen
2023-08-19 1:54 ` Andrey Konovalov
2023-08-20 14:20 ` Alan Stern
2023-08-21 16:13 ` Andrey Konovalov
2023-08-21 17:25 ` Alan Stern
2023-08-23 2:05 ` Thinh Nguyen
2023-08-23 2:30 ` Andrey Konovalov
2023-08-23 15:48 ` Alan Stern
2023-08-23 17:18 ` Thinh Nguyen
2023-08-25 1:36 ` Andrey Konovalov
2023-08-25 2:08 ` Alan Stern
2023-08-23 2:14 ` Thinh Nguyen
2023-08-23 15:17 ` Alan Stern
2023-08-23 17:59 ` Thinh Nguyen
2023-08-23 19:19 ` Alan Stern
2023-08-23 22:22 ` Thinh Nguyen
2023-08-24 2:21 ` Alan Stern
2023-08-26 1:20 ` Thinh Nguyen
2023-08-26 3:10 ` Alan Stern
2023-08-30 1:32 ` Thinh Nguyen
2023-08-30 14:48 ` Alan Stern
2023-08-31 2:43 ` Thinh Nguyen
2023-08-31 15:40 ` Alan Stern
2023-09-01 1:27 ` Thinh Nguyen
2023-09-01 17:37 ` Alan Stern
2023-09-01 21:14 ` Thinh Nguyen
2023-09-02 15:15 ` Alan Stern
2023-09-05 22:53 ` Thinh Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230818204610.byxapbhaqxxnvqvm@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=andreyknvl@gmail.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox