On Thu, Mar 31, 2011 at 09:53:00PM -0400, Alan Stern wrote: > On Thu, 31 Mar 2011, Don Zickus wrote: > See what they think of the patch below. Note: Totally untested. I > haven't tried running it myself. Hi Alan, I cc'd Dan above. He said he tested your patch with success. He also said it was alright to add a Reported-and-Tested-by: Dan Duval <dan.duval@xxxxxxxxxxx> line to the patch. Thanks for the quick turn around on the patch Alan! Cheers, Don > > Alan Stern > > > > Index: usb-2.6/drivers/usb/host/ehci-q.c > =================================================================== > --- usb-2.6.orig/drivers/usb/host/ehci-q.c > +++ usb-2.6/drivers/usb/host/ehci-q.c > @@ -1257,24 +1257,27 @@ static void start_unlink_async (struct e > > static void scan_async (struct ehci_hcd *ehci) > { > + bool stopped; > struct ehci_qh *qh; > enum ehci_timer_action action = TIMER_IO_WATCHDOG; > > ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index); > timer_action_done (ehci, TIMER_ASYNC_SHRINK); > rescan: > + stopped = !HC_IS_RUNNING(ehci_to_hcd(ehci)->state); > qh = ehci->async->qh_next.qh; > if (likely (qh != NULL)) { > do { > /* clean any finished work for this qh */ > - if (!list_empty (&qh->qtd_list) > - && qh->stamp != ehci->stamp) { > + if (!list_empty(&qh->qtd_list) && (stopped || > + qh->stamp != ehci->stamp)) { > int temp; > > /* unlinks could happen here; completion > * reporting drops the lock. rescan using > * the latest schedule, but don't rescan > - * qhs we already finished (no looping). > + * qhs we already finished (no looping) > + * unless the controller is stopped. > */ > qh = qh_get (qh); > qh->stamp = ehci->stamp; > @@ -1295,9 +1298,9 @@ rescan: > */ > if (list_empty(&qh->qtd_list) > && qh->qh_state == QH_STATE_LINKED) { > - if (!ehci->reclaim > - && ((ehci->stamp - qh->stamp) & 0x1fff) > - >= (EHCI_SHRINK_FRAMES * 8)) > + if (!ehci->reclaim && (stopped || > + ((ehci->stamp - qh->stamp) & 0x1fff) > + >= EHCI_SHRINK_FRAMES * 8)) > start_unlink_async(ehci, qh); > else > action = TIMER_ASYNC_SHRINK; > > -- > 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 -- 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