From: Felipe Balbi <balbi@kernel.org>
To: Peter Chen <peter.chen@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>
Cc: USB mailing list <linux-usb@vger.kernel.org>
Subject: Re: Disconnect race in Gadget core
Date: Mon, 17 May 2021 08:33:57 +0300 [thread overview]
Message-ID: <87wnrx6i0q.fsf@kernel.org> (raw)
In-Reply-To: <20210517020010.GA28030@nchen>
[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]
Hi,
Peter Chen <peter.chen@kernel.org> writes:
> On 21-05-16 10:51:51, Alan Stern wrote:
>> On Sun, May 16, 2021 at 12:43:58PM +0300, Felipe Balbi wrote:
>> >
>> > Hi,
>> >
>> > Alan Stern <stern@rowland.harvard.edu> writes:
>> > >
>> > > If it's okay to call those functions in interrupt context then the
>> > > kerneldoc definitely should be updated. However, I don't see why you
>> > > would want to make DELAYED_STATUS mandatory. If all the necessary work
>> > > can be done in the set_alt handler, why not return the status
>> > > immediately?
>> >
>> > because we avoid a special case. Instead of having magic return value to
>> > mean "Don't do anything until I enqueue a request" we can just make that
>> > an assumption, i.e. gadget driver *must* enqueue requests for data and
>> > status stages.
>>
>> Okay. But that would require auditing every gadget/function driver to
>> ensure that they _do_ enqueue status stage requests
>
> CDNS3 UDC doesn't enqueue status stage by SW, instead, SW tells HW to do
> it by setting registers.
That's a peculiarity of this particular UDC. Gadget driver will still
call usb_ep_queue() in some situations.
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
next prev parent reply other threads:[~2021-05-17 5:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 15:24 Disconnect race in Gadget core Alan Stern
2021-05-10 16:43 ` Felipe Balbi
2021-05-10 19:38 ` Alan Stern
2021-05-11 2:53 ` Peter Chen
2021-05-11 19:15 ` Alan Stern
2021-05-12 9:37 ` Peter Chen
2021-05-12 9:41 ` Felipe Balbi
2021-05-12 19:33 ` Alan Stern
2021-05-11 8:22 ` Felipe Balbi
2021-05-11 21:26 ` Alan Stern
2021-05-12 7:00 ` Felipe Balbi
2021-05-12 15:33 ` Alan Stern
2021-05-14 7:35 ` Felipe Balbi
2021-05-14 16:58 ` Alan Stern
2021-05-15 6:41 ` Felipe Balbi
2021-05-15 15:31 ` Alan Stern
2021-05-16 9:43 ` Felipe Balbi
2021-05-16 14:51 ` Alan Stern
2021-05-17 2:00 ` Peter Chen
2021-05-17 5:33 ` Felipe Balbi [this message]
2021-05-17 5:35 ` Felipe Balbi
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=87wnrx6i0q.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@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;
as well as URLs for NNTP newsgroup(s).