Re: f_mass_storage vs drivers/target

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

 



On Thu, 2019-08-22 at 10:10 +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2019-08-21 at 10:25 -0400, Alan Stern wrote:
> > On Wed, 21 Aug 2019, Benjamin Herrenschmidt wrote:
> > 
> > > Hi folks !
> > > 
> > > It seems that f_mass_storage duplicates (well maybe predates too..)
> > 
> > a
> > > lot of what's in drivers/target.
> > > 
> > > Anybody working on implementing a new version of f_mass_storage
> > 
> > that
> > > is layered upon drivers/target instead ? That would bring quite a
> > 
> > lot
> > > of additional functionality.
> > 
> > That's what f_tcm does.
> > 
> > Alan Stern
> 
> Haha nice, I never noticed it :-)

Ah lovely ... the 338x fails in EP autoconf with f_tcm, digging...

While digging I found this gem:

	/* USB3380: use same address for usb and hardware endpoints */
	snprintf(name, sizeof(name), "ep%d%s", usb_endpoint_num(desc),
			usb_endpoint_dir_in(desc) ? "in" : "out");
	ep = gadget_find_ep_by_name(_gadget, name);
	if (ep && usb_gadget_ep_match_desc(_gadget, ep, desc, ep_comp))
		return ep;

Any idea what's that supposed to achieve ?

When ep_match is called, usb_endpoint_num() hasn't been set yet so
it's always 0 and always fails... or am I missing something ?

Cheers,
Ben.




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

  Powered by Linux