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

[PATCH] USB: usbnet: Olympus R1000 PDA, and blacklisting if CDC && !ZAURUS

Add support for the Zaurus-compatible configuration of the
Olympus R1000 PDA.  (IDs from Todd Blumer, todd@sdgsystems.com)

Resolve a FIXME:  all the Zaurus support morphs into blacklist
entries when CDC Ethernet is enabled and Zaurus isn't (since the
Zaurus firmware falsely advertises itself as CDC conformant).
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent de7b428e
......@@ -2265,14 +2265,34 @@ static const struct driver_info zaurus_sl5x00_info = {
.unbind = cdc_unbind,
.tx_fixup = zaurus_tx_fixup,
};
#define ZAURUS_STRONGARM_INFO ((unsigned long)&zaurus_sl5x00_info)
static const struct driver_info zaurus_pxa_info = {
.description = "Sharp Zaurus, PXA-2xx based",
.flags = FLAG_FRAMING_Z,
.check_connect = always_connected,
.bind = generic_cdc_bind,
.unbind = cdc_unbind,
.tx_fixup = zaurus_tx_fixup,
};
#define ZAURUS_PXA_INFO ((unsigned long)&zaurus_pxa_info)
.in = 1, .out = 2,
static const struct driver_info olympus_mxl_info = {
.description = "Olympus R1000",
.flags = FLAG_FRAMING_Z,
.check_connect = always_connected,
.bind = generic_cdc_bind,
.unbind = cdc_unbind,
.tx_fixup = zaurus_tx_fixup,
};
#define OLYMPUS_MXL_INFO ((unsigned long)&olympus_mxl_info)
#else
/* blacklist all those devices */
#define ZAURUS_STRONGARM_INFO 0
#define ZAURUS_PXA_INFO 0
#define OLYMPUS_MXL_INFO 0
#endif
......@@ -2741,7 +2761,7 @@ kevent (void *data)
if (test_bit (EVENT_TX_HALT, &dev->flags)) {
unlink_urbs (dev, &dev->txq);
status = usb_clear_halt (dev->udev, dev->out);
if (status < 0)
if (status < 0 && status != -EPIPE)
deverr (dev, "can't clear tx halt, status %d",
status);
else {
......@@ -2752,7 +2772,7 @@ kevent (void *data)
if (test_bit (EVENT_RX_HALT, &dev->flags)) {
unlink_urbs (dev, &dev->rxq);
status = usb_clear_halt (dev->udev, dev->in);
if (status < 0)
if (status < 0 && status != -EPIPE)
deverr (dev, "can't clear rx halt, status %d",
status);
else {
......@@ -3355,12 +3375,15 @@ static const struct usb_device_id products [] = {
},
#endif
#ifdef CONFIG_USB_ZAURUS
#if defined(CONFIG_USB_ZAURUS) || defined(CONFIG_USB_CDCETHER)
/*
* SA-1100 based Sharp Zaurus ("collie"), or compatible.
* Same idea as above, but different framing.
*
* PXA-2xx based models are also lying-about-cdc.
*
* NOTE: These entries do double-duty, serving as blacklist entries
* whenever Zaurus support isn't enabled, but CDC Ethernet is.
*/
{
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
......@@ -3371,82 +3394,79 @@ static const struct usb_device_id products [] = {
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = 6 /* Ethernet model */,
.bInterfaceProtocol = 0,
.driver_info = (unsigned long) &zaurus_sl5x00_info,
.driver_info = ZAURUS_STRONGARM_INFO,
}, {
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
| USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x04DD,
.idProduct = 0x8005, /* A-300 */
.bInterfaceClass = 0x02,
.bInterfaceSubClass = 0x0a,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = 6 /* Ethernet model */,
.bInterfaceProtocol = 0x00,
.driver_info = (unsigned long) &zaurus_pxa_info,
.driver_info = ZAURUS_PXA_INFO,
}, {
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
| USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x04DD,
.idProduct = 0x8006, /* B-500/SL-5600 */
.bInterfaceClass = 0x02,
.bInterfaceSubClass = 0x0a,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = 6 /* Ethernet model */,
.bInterfaceProtocol = 0x00,
.driver_info = (unsigned long) &zaurus_pxa_info,
.driver_info = ZAURUS_PXA_INFO,
}, {
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
| USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x04DD,
.idProduct = 0x8007, /* C-700 */
.bInterfaceClass = 0x02,
.bInterfaceSubClass = 0x0a,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = 6 /* Ethernet model */,
.bInterfaceProtocol = 0x00,
.driver_info = (unsigned long) &zaurus_pxa_info,
.driver_info = ZAURUS_PXA_INFO,
}, {
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
| USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x04DD,
.idProduct = 0x9031, /* C-750 C-760 */
.bInterfaceClass = 0x02,
.bInterfaceSubClass = 0x0a,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = 6 /* Ethernet model */,
.bInterfaceProtocol = 0x00,
.driver_info = (unsigned long) &zaurus_pxa_info,
.driver_info = ZAURUS_PXA_INFO,
}, {
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
| USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x04DD,
.idProduct = 0x9032, /* SL-6000 */
.bInterfaceClass = 0x02,
.bInterfaceSubClass = 0x0a,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = 6 /* Ethernet model */,
.bInterfaceProtocol = 0x00,
.driver_info = (unsigned long) &zaurus_pxa_info,
.driver_info = ZAURUS_PXA_INFO,
}, {
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
| USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x04DD,
.idProduct = 0x9050, /* C-860 */
.bInterfaceClass = 0x02,
.bInterfaceSubClass = 0x0a,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = 6 /* Ethernet model */,
.bInterfaceProtocol = 0x00,
.driver_info = (unsigned long) &zaurus_pxa_info,
.driver_info = ZAURUS_PXA_INFO,
},
#endif
#ifdef CONFIG_USB_CDCETHER
#ifndef CONFIG_USB_ZAURUS
/* if we couldn't whitelist Zaurus, we must blacklist it */
/* Olympus has some models with a Zaurus-compatible option.
* R-1000 uses a FreeScale i.MXL cpu (ARMv4T)
*/
{
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
| USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x04DD,
.idProduct = 0x8004,
/* match the master interface */
.idVendor = 0x07B4,
.idProduct = 0x0F02, /* R-1000 */
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = 6 /* Ethernet model */,
.bInterfaceProtocol = 0,
.driver_info = 0, /* BLACKLIST */
.bInterfaceProtocol = 0x00,
.driver_info = OLYMPUS_MXL_INFO,
},
// FIXME blacklist the other Zaurus models too, sigh
#endif
#ifdef CONFIG_USB_CDCETHER
{
/* CDC Ether uses two interfaces, not necessarily consecutive.
* We match the main interface, ignoring the optional device
......
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