David et al--
I've been working on a problem where devices plugged into a USB 2.0 hub
(which is plugged into an EHCI controller) aren't seen until there is some
other activity in the USB subsystem. To reproduce this, I booted up a
system with a USB2.0 hub connected to my EHCI controller, and, after the
system was up, I tried plugging a device into the hub. Linux did not see
the device. If I then plugged a device directly into the EHCI controller,
Linux would see both of the devices that I plugged in.
I've found, in the EHCI driver, that queue heads set up for an interrupt
pipe (such as the one set up to check for connection changes on the USB2.0
hub) are set up correctly, but the "halt" (QTD_STS_HALT) bit in the hw_token
in the overlay area is never cleared after the QH and QTDs are set up and
scheduled. With this halt bit set, the HC will ignore the QH, so it doesn't
get executed. If the hw_token in the overlay is cleared to 0, the HC will
advance the queue (copy the first QTD into the overlay area) and do the
transaction.
The bit eventually gets cleared if there is other activity on the
bus--scan_periodic will see the halt bit set, and, among other things, clear
the bit. However, if there is no other activity in the EHCI controller,
scan_periodic never gets called.
(For async transactions, this bit is cleared in qh_link_async after the QH
is set up.)
Attached is a patch. It just modifies intr_submit (in ehci-sched.c) to
clear qh->hw_token to 0 after all of the TDs are added to the QH.
I believe this patch is applicable to both the 2.4 and 2.6 kernels.
Thanks
Stuart Hayes
[EMAIL PROTECTED]
--- ehci-sched.c.orig 2004-01-26 16:10:14.000000000 -0500
+++ ehci-sched.c 2004-01-26 14:02:45.000000000 -0500
@@ -483,6 +483,10 @@
/* ... update usbfs periodic stats */
hcd_to_bus (&ehci->hcd)->bandwidth_int_reqs++;
+ /* clear token in overlay so HC will advance queue and */
+ /* execute QH (QTD_STS_HALT is set when QH is created) */
+ qh->hw_token = 0;
+
done:
spin_unlock_irqrestore (&ehci->lock, flags);
if (status)
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel