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. 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? BR, -- 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