ChangeSet 1.1722.83.5, 2004/06/02 13:25:08-07:00, [EMAIL PROTECTED]

[PATCH] USB: pxa/rndis device descriptor

This fixes a problem that all pxa2xx_udc g_ether devices
would run into.  They'd give the wrong descriptors, like:

> --------msg1- usbview ----------
> Device Descriptor: bcdUSB:             0x0200
> bDeviceClass:         0xFF
> bDeviceSubClass:      0x00
> bDeviceProtocol:      0x00
> bMaxPacketSize0:      0x10 (16)

Windows doesn't like RNDIS-supporting devices to point
out that they're really vendor-specific.  So this patch
makes sure they don't.

Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/gadget/ether.c |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)


diff -Nru a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
--- a/drivers/usb/gadget/ether.c        Fri Jun 18 11:06:58 2004
+++ b/drivers/usb/gadget/ether.c        Fri Jun 18 11:06:58 2004
@@ -2302,17 +2302,6 @@
                UTS_SYSNAME " " UTS_RELEASE "/%s",
                gadget->name);
 
-       /* CDC subset ... recognized by Linux since 2.4.10, but Windows
-        * drivers aren't widely available.
-        */
-       if (!cdc) {
-               device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
-               device_desc.idVendor =
-                       __constant_cpu_to_le16(SIMPLE_VENDOR_NUM);
-               device_desc.idProduct =
-                       __constant_cpu_to_le16(SIMPLE_PRODUCT_NUM);
-       }
-
        /* If there's an RNDIS configuration, that's what Windows wants to
         * be using ... so use these product IDs here and in the "linux.inf"
         * needed to install MSFT drivers.  Current Linux kernels will use
@@ -2326,6 +2315,16 @@
                        __constant_cpu_to_le16(RNDIS_PRODUCT_NUM);
                snprintf (product_desc, sizeof product_desc,
                        "RNDIS/%s", driver_desc);
+
+       /* CDC subset ... recognized by Linux since 2.4.10, but Windows
+        * drivers aren't widely available.
+        */
+       } else if (!cdc) {
+               device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
+               device_desc.idVendor =
+                       __constant_cpu_to_le16(SIMPLE_VENDOR_NUM);
+               device_desc.idProduct =
+                       __constant_cpu_to_le16(SIMPLE_PRODUCT_NUM);
        }
 
        /* support optional vendor/distro customization */



-------------------------------------------------------
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