Greg:

This patch helped Jon Wilson.  It allows devices to have a configuration
numbered 0, in spite of the standard convention that config #0 really
means unconfigured.  Please apply.

Alan Stern


--- a/drivers/usb/core/message.c.orig   Fri Oct 24 13:10:05 2003
+++ b/drivers/usb/core/message.c        Sun Oct 26 22:51:28 2003
@@ -1086,6 +1086,11 @@
                ret = -EINVAL;
                goto out;
        }
+
+       /* The USB spec says configuration 0 means unconfigured.
+        * But if a device includes a configuration numbered 0,
+        * we will accept it as a correctly configured state.
+        */
        if (cp && configuration == 0)
                dev_warn(&dev->dev, "config 0 descriptor??\n");
 
@@ -1101,7 +1106,7 @@
                goto out;
 
        dev->actconfig = cp;
-       if (!configuration)
+       if (!cp)
                dev->state = USB_STATE_ADDRESS;
        else {
                dev->state = USB_STATE_CONFIGURED;




-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. 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