This is a separate patch from my experimental userspace driver binding
patch which fixes 2 minor issues.

The first is a typo, which while it was a coincidence that it worked,
should be fixed. We want to copy USB_DT_CONFIG_SIZE bytes, not
USB_DT_INTERFACE_SIZE bytes for a config descriptor. Turns out the 2
descriptors, and thusly macros, were identical in size.

The second, resets the data toggles on a SET_INTERFACE call as mandated
by section 9.1.1.5 of the USB v1.1 spec.

This is against 2.3.99-pre4-5.

Randy, please send this on to Linus.

JE

--- linux-2.3.99-pre4-5.orig/drivers/usb/usb.c  Mon Apr 10 11:43:44 2000
+++ linux-2.3.99-pre4-5/drivers/usb/usb.c       Mon Apr 10 11:50:52 2000
@@ -1084,7 +1084,7 @@
        int size;
        struct usb_descriptor_header *header;
 
-       memcpy(config, buffer, USB_DT_INTERFACE_SIZE);
+       memcpy(config, buffer, USB_DT_CONFIG_SIZE);
        le16_to_cpus(&config->wTotalLength);
        size = config->wTotalLength;
 
@@ -1512,6 +1512,8 @@
                return ret;
 
        iface->act_altsetting = alternate;
+       dev->toggle[0] = 0;     /* 9.1.1.5 says to do this */
+       dev->toggle[1] = 0;
        usb_set_maxpacket(dev);
        return 0;
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to