On Thu, 29 Dec 2011, loody wrote: > Hi all: > 1. if we don't call any unlink functions, such as usb_unlink_urb, > the state of qh will keep QH_STATE_LINKED and linked after ehci->async. No. The qh will be unlinked a short time after its last URB completes. An URB may complete because usb_unlink_urb was called, or it may complete normally. > 2. if #1 is true, after calling usb_control_msg, the qh of ep0 will > leave in ehci->async, right? No, it will be removed shortly after the URB completes. See the code in the last few lines of qh_completions(), and see what scan_async() does when qh->needs_rescan is set after qh_completions() returns. > Since I don't see any complete function of usb_control_msg try to > unlink qh, except we call usb_ep0_reinit. > The complete of usb_control_msg just wake up the sleeping task for finishing. 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