Hi, All:
I noticed a small problem today. If I pull a _power_ cable
on my hub, it becomes disabled with the following message:
hub.c: error resetting hub 3 - disconnecting
It comes back to life if I pull and reinsert its upstream USB
cable (also may trigger an unrelated khubd lockup that I discussed
in other mail today).
It turned out that the following code cannot work:
usb_hub_reset(struct usb_hub *hub) {
.....
usb_unlink_urb(hub->urb);
usb_reset_device(hub->dev);
usb_submit_urb(hub->urb);
}
The usb_unlink_urb clears urb->dev and calls usb_dec_dev_use;
but usb_submit_urb insists on having urb->dev there before it
can call usb_inc_dev_use. In other words, URB cannot be reused.
Something like the following patch fixes the particular problem,
but I am not sure if this is right. Please spare a few cycles
on the problem.
--- linux-2.4.3/drivers/usb/hub.c Sun Mar 25 18:14:21 2001
+++ linux-2.4.3-nfs/drivers/usb/hub.c Thu Apr 12 19:37:38 2001
@@ -406,6 +414,9 @@
if (usb_reset_device(dev))
return -1;
+ /* FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
+ hub, endpoint->bInterval); */ /* P3 "official" way */
+ hub->urb->dev = dev;
if (usb_submit_urb(hub->urb))
return -1;
Thanks,
-- Pete
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel