You should explain what you're trying to achieve by these changes. The EHCI changes look like trouble, as does the usb-storage one.
The hub changes might be better, but I didn't look at them. I know there are at least refcounting problems though that code path.
Seems like what may have happened is that you ran into some problem that triggered the usb-storage fault handling code, which we know can be troublesome in 2.4 ... your device worked fine until part way through usb-storage setup. So maybe your device needs some quirk entries for usb-storage.
- Dave
/* stop scanning when we reach qtds the hc is using */
} else if (likely (!stopped
- && HCD_IS_RUNNING (ehci->hcd.state))) {
+ || HCD_IS_RUNNING (ehci->hcd.state))) {
break;
Net result: when the HCD is running (typical), skip the next branch (cleanup) *whether or not* the QH is in use by the HC? That's caused _lots_ of trouble; this just reverts a bugfix.
- /* init as live, toggle clear, advance to dummy */
+ /* init as halted, toggle clear, advance to dummy */
qh->qh_state = QH_STATE_IDLE;
qh->hw_info1 = cpu_to_le32 (info1);
qh->hw_info2 = cpu_to_le32 (info2);
qh_update (ehci, qh, qh->dummy);
+ qh->hw_token = cpu_to_le32 (QTD_STS_HALT);
Net result: the first request on every QH won't work until some other code un-halts it. That causes more subtle trouble.
--- linux-2.4.22-pre2/drivers/usb/hub.c 2003-06-30 17:34:14.000000000 +0900
+++ linux-2.4.22-pre2-usb/drivers/usb/hub.c 2003-07-03
10:41:50.000000000 +0900
@@ -715,6 +715,8 @@
err("couldn't allocate usb_device");
break;
}
+
+ hub->children[port] = dev;
/* Reset the device */
if (usb_hub_port_reset(hub, port, dev, delay)) {
@@ -759,10 +761,8 @@
dev->bus->bus_name, dev->devpath, dev->devnum);
/* Run it through the hoops (find a driver, etc) */
- if (!usb_new_device(dev)) {
- hub->children[port] = dev;
+ if (!usb_new_device(dev))
goto done;
- }
/* Free the configuration if there was an error */
usb_free_dev(dev);
@@ -771,6 +771,7 @@
delay = HUB_LONG_RESET_TIME;
}
+ hub->children[port] = NULL;
usb_hub_port_disable(hub, port);
done:
up(&usb_address0_sem);
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
