Greg:

This patch fixes another bug in the dummy_hcd driver.  When a gadget 
driver unregisters (simulating a device disconnect), dummy_hcd stops the 
timer that it uses for processing outstanding URBs.  Unfortunately this 
means that those URBs will never be given back.  The patch lets the timer 
continue running; when it expires all the remaining URBs will fail so the 
timer won't be reinitialized.

Please apply.

Alan Stern



Signed-off-by: Alan Stern <[EMAIL PROTECTED]>

===== drivers/usb/gadget/dummy_hcd.c 1.6 vs edited =====
--- 1.6/drivers/usb/gadget/dummy_hcd.c  Wed Jun  9 07:40:49 2004
+++ edited/drivers/usb/gadget/dummy_hcd.c       Fri Jun 18 17:09:56 2004
@@ -739,11 +739,9 @@
        struct dummy_ep *ep;
 
        /* prevent any more requests */
-       dum->hdev = 0;
        dum->address = 0;
 
-       /* this might not succeed ... */
-       del_timer (&dum->timer);
+       /* The timer is left running so that outstanding URBs can fail */
 
        /* nuke any pending requests first, so driver i/o is quiesced */
        list_for_each_entry (ep, &dum->gadget.ep_list, ep.ep_list)
@@ -784,7 +782,6 @@
 
        driver_unregister (&driver->driver);
 
-       del_timer_sync (&dum->timer);
        return 0;
 }
 EXPORT_SYMBOL (usb_gadget_unregister_driver);
 



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to