Greg and all:

(I've lost track of patches that have been submitted in the last few
weeks, so it's possible that something incorporating this change is
already somewhere in the queue.)

The usb_physical_reset_device() routine in hub.c doesn't properly set the 
device state back to its correct value when the reset is over.  This fixes 
that problem.

Alan Stern


===== hub.c 1.123 vs edited =====
--- 1.123/drivers/usb/core/hub.c        Mon Sep 22 12:37:50 2003
+++ edited/drivers/usb/core/hub.c       Tue Nov  4 15:55:56 2003
@@ -1260,6 +1260,7 @@
                kfree(descriptor);
                return(-ENODEV);
        }
+       dev->state = USB_STATE_DEFAULT;
 
        /* Reprogram the Address */
        ret = usb_set_address(dev);
@@ -1273,7 +1274,7 @@
 
        /* Let the SET_ADDRESS settle */
        wait_ms(10);
-
+       dev->state = USB_STATE_ADDRESS;
        up(&usb_address0_sem);
 
        /*
@@ -1342,6 +1343,7 @@
                        dev->devpath, ret);
                return ret;
        }
+       dev->state = USB_STATE_CONFIGURED;
 
        for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
                struct usb_interface *intf = dev->actconfig->interface[i];



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to