All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>,
	Andrey Konovalov <andreyknvl@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	USB list <linux-usb@vger.kernel.org>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: Re: Testing endpoint halt support for raw-gadget
Date: Tue, 05 May 2020 09:34:05 +0300	[thread overview]
Message-ID: <87a72mc2le.fsf@kernel.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.2005041114130.11213-100000@netrider.rowland.org>

[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]


Hi,

Alan Stern <stern@rowland.harvard.edu> writes:
> On Mon, 4 May 2020, Andrey Konovalov wrote:
>
>> On Mon, May 4, 2020 at 4:24 PM Alan Stern <stern@rowland.harvard.edu> wrote:
>> >
>> > On Mon, 4 May 2020, Andrey Konovalov wrote:
>> >
>> > > One more question (sorry for so many :).
>> > >
>> > > Looking at other fields of usb_request struct I see frame_number.
>> > > AFAIU it's filled in by the UDC driver for ISO transfers. Does it make
>> > > sense to expose it to userspace? I don't see any composite/legacy
>> > > gadgets use that field at all.
>> >
>> > Do any of those gadget drivers use isochronous endpoints?
>> 
>> Yes, there are audio/uvc function/legacy drivers that use those.
>> 
>> > In fact, it also looks like none of the drivers in gadget/udc/ touch
>> > the frame_number field.  Maybe we should just get rid of it, since it
>> > isn't being used.
>> 
>> It is used by dwc2/3 gadget drivers (which are not in gadget/udc/).
>
> Well, if Felipe thinks we ought to keep the field then you might as 
> well export it to userspace.  Drivers are free to ignore it.  :-)

dwc3 has its own private frame_number as part of its own endpoint
structure. We simply copy that to the request. That's is currently
telling the gadget driver which frame the request completed. It could be
used by the function to decide when to queue more requests. It can also
be used to predict if we're in sync with the frames or will we diverge
and miss frames in the future.

If nobody has implemented any of that so far, I don't mind removing
it. We need strong evidence that this will never be used, though :-)

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2020-05-05  6:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 16:48 Testing endpoint halt support for raw-gadget Andrey Konovalov
2020-04-10  0:29 ` Alan Stern
2020-04-10 15:13   ` Andrey Konovalov
2020-04-10 15:53     ` Alan Stern
2020-04-27  1:26       ` Peter Chen
2020-04-27 14:29         ` Alan Stern
2020-04-29  2:20       ` Andrey Konovalov
2020-04-29 14:06         ` Alan Stern
2020-05-04 14:16           ` Andrey Konovalov
2020-05-04 14:24             ` Alan Stern
2020-05-04 15:11               ` Andrey Konovalov
2020-05-04 15:15                 ` Alan Stern
2020-05-05  6:34                   ` Felipe Balbi [this message]
2020-05-05 12:13                     ` Andrey Konovalov
2020-05-05 16:42                       ` Thinh Nguyen
2020-05-05  6:30               ` Felipe Balbi
2020-04-24 19:36   ` Andrey Konovalov
2020-04-24 19:56     ` Andrey Konovalov
2020-04-25  1:53       ` Alan Stern
2020-04-25 14:49         ` Andrey Konovalov
2020-04-25 15:02           ` Alan Stern
2020-04-27 19:51     ` Andrey Konovalov
2020-04-27 20:47       ` Andrey Konovalov
2020-04-28  0:50         ` Andrey Konovalov
2020-04-28  1:32           ` Andrey Konovalov
2020-04-28 13:27             ` Alan Stern
2020-05-13 17:07               ` Andrey Konovalov
2020-05-13 18:14                 ` Alan Stern
2020-05-13 18:31                   ` Andrey Konovalov
2020-05-13 19:09                     ` Alan Stern
2020-05-13 19:38                       ` Andrey Konovalov

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=87a72mc2le.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=andreyknvl@google.com \
    --cc=dvyukov@google.com \
    --cc=gregkh@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.