On Fri, 12 Jun 2009, Julie Zhu wrote: > Hello, all, > > We found this on a PowerPC embedded platform using an FPGA-based USB > host controller. The Linux kernel is 2.6.29. > > When disconnect the device during an interrupt transfer, we found that > periodic schedule is disabled, but quickly enabled again. It is later > disabled again. The bogus enable happens in ehci_urb_dequeue(): > > /* reschedule QH iff another request is queued */ > if (!list_empty (&qh->qtd_list) > && HC_IS_RUNNING (hcd->state)) { > printk(KERN_INFO "qh_schedule in urb_dequeue %x\n", > hcd->state); > > rc = qh_schedule(ehci, qh); > > The qh_schedule() then calls qh_link_periodic(), which calls > enable_periodic(). > > It is unclear how qh->qtd_list should be updated properly for the > disconnect, although ep->urb_list is cleared. How can ep->urb_list be cleared without qh->qtd_list also getting cleared? > Is this a bug? Probably not. The periodic schedule should be enabled as long as any periodic URBs are queued. The fact that they are addressed to a device which has been unplugged doesn't matter -- usb_disconnect() will unlink the remaining URBs for the unplugged device quickly enough. 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