Re: [PATCH] Revert "usb: dwc3: Support EBC feature of DWC_usb31"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 17, 2024, Manan Aurora wrote:
> On Thu, Apr 11, 2024 at 5:52 AM Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx> wrote:
> >
> >
> > On Wed, Apr 10, 2024, Manan Aurora wrote:
> > > Hi Thinh,
> > >
> > > I'm working on a patch to bring EBC support back, I had a doubt
> > > regarding some of the required corrections though (inlined)
> > >
> > > Please take a look and advise, I'll proceed accordingly.
> > >
> >
> > >
> > > On Fri, Feb 9, 2024 at 6:55 AM Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx> wrote:
> > > >
> > > > This reverts commit 398aa9a7e77cf23c2a6f882ddd3dcd96f21771dc.
> > > >
> > > > The update to the gadget API to support EBC feature is incomplete. It's
> > > > missing at least the following:
> > > >  * New usage documentation
> > > I will address this
> > > >  * Gadget capability check
> > > >  * Condition for the user to check how many and which endpoints can be
> > > >    used as "fifo_mode"
> >
> > > The easiest option seems to be to add a new function that lets users
> > > specifically request
> > > fifo_mode endpoints eg: usb_fifo_mode_ep_autoconfig_ss
> > > This function will cover ensuring that the device supports
> > > fifo_endpoints and returning a suitable
> > > endpoint (if available) and NULL otherwise. This can be indicated by
> > > adding a new bit to
> > > the existing ep_caps  structure.
> > > Does this seem like an acceptable solution?
> >
> > That sounds fine to me. For the naming, perhaps just name it as EBC for
> > External Buffer Control and provide proper description in documentation.
> > "fifo_mode" may not be clear.
> >
> > Maybe usb_ep_autoconfig_ss_with_ebc()?
> >
> > How are you planning to implement the above function? Are you going to
> > apply the DWC_usb3x specific requirements directly or implement
> > gadget_ops->match_ep() to properly return the right endpoint base on the
> > endpoint desc? As you're aware, EBC is only applicable to non-streams
> > bulk only. Also it doesn't apply to full-speed.

> The issue with implementing match_ep is that the API doesn't let us
> specify that

But I thought you'd add a new bit to ep_caps or the equivalent? The
gadget driver can check that. Just make sure that the dwc3 driver gets
that info somewhere to prepare the ep_caps (perhaps through device tree
binding property?).

> an EBC endpoint is desired. What about adding a new function to usb_gadget_ops?
> Then we could apply IP-specific restrictions in one place.
> 
> Speed can be enforced when we attempt to configure the EP
> (config_ep_by_speed etc)
> 

Sounds good.

Thanks,
Thinh




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux