Re: periodic schedule enabled during usb_disconnect

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

 



On Wed, 5 Oct 2011, loody wrote:

> hi:
> 
> 2009/6/13 Julie Zhu <julie.zhu@xxxxxxxxxx>:
> > Thank you for your time to guide me through.
> >
> > Julie.
> >
> >> -----Original Message-----
> >> From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx]
> >> Sent: Friday, June 12, 2009 12:25 PM
> >> To: Julie Zhu
> >> Cc: USB list
> >> Subject: RE: periodic schedule enabled during usb_disconnect
> >>
> >> On Fri, 12 Jun 2009, Julie Zhu wrote:
> >>
> >> > Hi, Alan,
> >> >
> >> > I am sorry, I do not see why qh_completions() has anything to do
> > with
> >> > usb_disconnect().
> >>
> >> It's a subtle connection.
> >>
> >> usb_disconnect() calls usb_disable_device(), which calls
> >> usb_disable_endpoint() for every possible endpoint in the device.
> >>
> >> That routine calls usb_hcd_flush_endpoint(), which calls unlink1(),
> >> which calls hcd->driver->urb_dequeue() -- which in this case is
> >> ehci_urb_dequeue().
> >>
> >> For interrupt endpoints, that routine calls intr_deschedule() followed
> >> by qh_completions(). �Voila!
> sorry for interrupting your discussion.

What on earth makes you think you can interrupt a conversation that 
ended more than two years ago?

You know, when you post a message to the linux-usb mailing list, it
doesn't have to be a reply (and it _especially_ doesn't have to be a
reply to something that was posted years ago).  You can simply send
your own message, all by itself, with a brand-new Subject: line.  
Nobody will object.

> when the usb device structure will be free after calling usb_disconnect?
> The usb device structure will be allocate through usb_alloc_dev, and
> it should be free if device disconnect, right?

Yes.  It will be deallocated when the last reference to it is dropped
by a call to usb_put_dev(udev), or equivalently, by a call to
put_device(&udev->dev).  When this happens, usb_release_dev() will be
called.

Alan Stern

--
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