Re: [RFC PATCH 0/7] usb: gadget: add reset API at usb_gadget_driver

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

 



On Tue, 2 Sep 2014, Felipe Balbi wrote:

> On Tue, Sep 02, 2014 at 11:32:52AM -0400, Alan Stern wrote:
> > On Fri, 29 Aug 2014, Felipe Balbi wrote:
> > 
> > > > I still have some old patch files lying around, adding reset callback
> > > > support to dummy-hcd, net2280, and net2272.  Would you like me to post
> > > > them?
> > > 
> > > Please do :-) let's get all of that sorted out soon.
> > 
> > Patches coming up.  These were written about two years ago, and
> > although they have been forward-ported, I haven't tested them since
> > they were written.  They are based on a patch you posted on August 16, 
> > 2012 (usb: gadget: add reset method to struct usb_gadget_driver).
> 
> alright, I still have my branch with that patch together with musb and
> dwc3 implementation. The problem I see, though, is that all three of
> your patches and my dwc3 and musb implementation conditionally calls
> ->disconnect() if the gadget driver doesn't driver doesn't implement
> ->reset(). If we're talking about usb_gadget_disconnect() from
> ->disconnect(), than all 5 patches will cause regressions.

That needn't be a problem.  If Peter updates the four gadget drivers,
adding reset callbacks, then we can remove the parts of our patches
that invoke the disconnect callback if there is no reset callback.  In 
other words, we can make reset callbacks mandatory for gadget drivers.

Alan Stern

PS: I also have an old patch that adds a reset callback to
g-mass-storage.  Peter asked for this around the same time the other
work was done.  The idea was that disconnect must flush the buffers to
the backing storage device, whereas a reset could avoid flushing
anything -- Peter found that the flushing was taking so long, the
gadget might not be able to carry out a reset quickly enough if it used 
the disconnect callback.

The version I have of this patch is incomplete; it requires a reset
callback to be added to the composite driver.  Peter, do you still want 
to make this change to g-mass-storage?

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux