David Brownell <[EMAIL PROTECTED]> said:

> On Wednesday 02 February 2005 5:35 am, [EMAIL PROTECTED] wrote:
> > 
> > Hi,
> >  It seems that under some conditions when a usb device is physically
> > disconnected and there are some pending urbs ehci_endpoint_disable
> > can loop forever in state QH_STATE_UNLINK. 
> 
> Hmm, that might explain some rare and intermittent problem reports.
> 

I am now running 2.6.11-rc3 with debugging enabled and I trigger the
BUG() at line 994 of ehci-q.c in start_unlink_async. The attached patch
fixes the problem, checking for ehci->reclaim before calling
start_unlink_async in qh_completions.

--- drivers/usb/host/ehci-q.c   2005-02-08 11:07:30.000000000 +0100
+++ ../linux-2.6.11-rc3.orig/drivers/usb/host/ehci-q.c  2005-02-07
17:49:38.000000000 +0100
@@ -429,12 +429,8 @@
                        if (qh->period) {
                                intr_deschedule (ehci, qh);
                                (void) qh_schedule (ehci, qh);
-                       } else {
-                               if (!ehci->reclaim)
-                                       start_unlink_async (ehci, qh);
-                               else
-                                       printk(KERN_CRIT "unlink already
started\n");
-                       }
+                       } else
+                               start_unlink_async (ehci, qh);
                        break;
                /* otherwise, unlink already started */
                }


(It was critical for me ;-))

BTW it's not so good that the register dump and traceback don't fit on 
a 80x25 terminal any more. It took some time and hacking in traps.c
to just print out the first lines of the panic message.

/Brian

Attachment: ehci-q.patch
Description: Binary data

Reply via email to