Re: [PATCH] USB: remove CONFIG_USB_PERSIST from Documentation

From: Alan Stern
Date: Wed Jul 02 2014 - 10:35:26 EST


On Wed, 2 Jul 2014, Paul Bolle wrote:

> On Tue, 2014-06-24 at 13:19 -0400, Alan Stern wrote:
> > On Tue, 24 Jun 2014, Paul Bolle wrote:
> > > On Tue, 2014-06-24 at 10:25 -0400, Alan Stern wrote:
> > > > Also, that "Later kernels" thing has already arrived. I believe it was
> > > > implemented in 2.6.35.
> > >
> > > How does the kernel currently call the disconnect method? I can't yet
> > > say for sure, and it seems silly to send a v2 dropping those lines
> > > without actually knowing why they can be dropped.
> >
> > In drivers/usb/core/driver.c:usb_resume_complete(), which is called
> > during the final "complete" phase of system suspend, interfaces that
> > were marked for rebinding (because their drivers didn't have proper PM
> > support) get rebound.
> >
> > Is that what you wanted to know?
>
> I haven't yet discovered what the link is between rebinding and the
> "disconnect" method. I'll have to study that. This is far from urgent,
> so that might take me quite some time.

Rebinding means unbinding followed by binding. The disconnect method
gets called during unbinding. The detailed call chain is:

usb_resume_complete ->
rebind_marked_interfaces ->
usb_rebind_intf ->
usb_forced_unbind_intf ->
usb_driver_release_interface ->
device_release_driver ->
__device_release_driver ->
usb_unbind_interface ->
disconnect.

Alan Stern

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