Commit 2d01552f authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[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: default avatarDavid Brownell <dbrownelL@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent e5219c5d
...@@ -2302,17 +2302,6 @@ eth_bind (struct usb_gadget *gadget) ...@@ -2302,17 +2302,6 @@ eth_bind (struct usb_gadget *gadget)
UTS_SYSNAME " " UTS_RELEASE "/%s", UTS_SYSNAME " " UTS_RELEASE "/%s",
gadget->name); 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 /* 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" * be using ... so use these product IDs here and in the "linux.inf"
* needed to install MSFT drivers. Current Linux kernels will use * needed to install MSFT drivers. Current Linux kernels will use
...@@ -2326,6 +2315,16 @@ eth_bind (struct usb_gadget *gadget) ...@@ -2326,6 +2315,16 @@ eth_bind (struct usb_gadget *gadget)
__constant_cpu_to_le16(RNDIS_PRODUCT_NUM); __constant_cpu_to_le16(RNDIS_PRODUCT_NUM);
snprintf (product_desc, sizeof product_desc, snprintf (product_desc, sizeof product_desc,
"RNDIS/%s", driver_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 */ /* support optional vendor/distro customization */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment