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

[PATCH] USB: host side fixes for pxa2xx/ethernet/rndis gadgets, like gumstix

This fixes an interop glitch with PXA gadgets; please merge.


This resolves an issue that's more or less specific to hosts trying to
talk pxa255 based Linux devices using the Ethernet/RNDIS gadget driver.

  - Teaches "usbnet" about the product ID used by pxa255 based devices
    when they enable RNDIS, since it won't be using CDC Ethernet.

  - Forces usbcore config selection code to use non-RNDIS configurations,
    even when their class is vendor-specific (as in the pxa255 case).

This makes gumstix devices, for example, talk with Linux 2.6.9 hosts
AND with Windows ... previously only one would work.

From: Craig Hughes <craig@gumstix.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 8f895a81
...@@ -1045,11 +1045,19 @@ static int choose_configuration(struct usb_device *udev) ...@@ -1045,11 +1045,19 @@ static int choose_configuration(struct usb_device *udev)
->altsetting->desc; ->altsetting->desc;
if (desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC) if (desc->bInterfaceClass == USB_CLASS_VENDOR_SPEC)
continue; continue;
/* COMM/2/all is CDC ACM, except 0xff is MSFT RNDIS */ /* COMM/2/all is CDC ACM, except 0xff is MSFT RNDIS.
* MSFT needs this to be the first config; never use
* it as the default unless Linux has host-side RNDIS.
* A second config would ideally be CDC-Ethernet, but
* may instead be the "vendor specific" CDC subset
* long used by ARM Linux for sa1100 or pxa255.
*/
if (desc->bInterfaceClass == USB_CLASS_COMM if (desc->bInterfaceClass == USB_CLASS_COMM
&& desc->bInterfaceSubClass == 2 && desc->bInterfaceSubClass == 2
&& desc->bInterfaceProtocol == 0xff) && desc->bInterfaceProtocol == 0xff) {
c = udev->config[1].desc.bConfigurationValue;
continue; continue;
}
c = udev->config[i].desc.bConfigurationValue; c = udev->config[i].desc.bConfigurationValue;
break; break;
} }
......
...@@ -3308,11 +3308,18 @@ static const struct usb_device_id products [] = { ...@@ -3308,11 +3308,18 @@ static const struct usb_device_id products [] = {
* *
* PXA25x or PXA210 ... these use a "usb-eth" driver much like * PXA25x or PXA210 ... these use a "usb-eth" driver much like
* the sa1100 one, but hardware uses different endpoint numbers. * the sa1100 one, but hardware uses different endpoint numbers.
*
* Or the Linux "Ethernet" gadget on hardware that can't talk
* CDC Ethernet (e.g., no altsettings), in either of two modes:
* - acting just like the old "usb-eth" firmware, though
* the implementation is different
* - supporting RNDIS as the first/default configuration for
* MS-Windows interop; Linux needs to use the other config
*/ */
{ {
// 1183 = 0x049F, both used as hex values? // 1183 = 0x049F, both used as hex values?
// Compaq "Itsy" vendor/product id // Compaq "Itsy" vendor/product id
USB_DEVICE (0x049F, 0x505A), USB_DEVICE (0x049F, 0x505A), // usb-eth, or compatible
.driver_info = (unsigned long) &linuxdev_info, .driver_info = (unsigned long) &linuxdev_info,
}, { }, {
USB_DEVICE (0x0E7E, 0x1001), // G.Mate "Yopy" USB_DEVICE (0x0E7E, 0x1001), // G.Mate "Yopy"
...@@ -3320,6 +3327,10 @@ static const struct usb_device_id products [] = { ...@@ -3320,6 +3327,10 @@ static const struct usb_device_id products [] = {
}, { }, {
USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader
.driver_info = (unsigned long) &blob_info, .driver_info = (unsigned long) &blob_info,
}, {
// Linux Ethernet/RNDIS gadget on pxa210/25x/26x
USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203),
.driver_info = (unsigned long) &linuxdev_info,
}, },
#endif #endif
......
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