| Start/ | End/ | |||
| True | False | - | Line | Source |
| 1 | /* | |||
| 2 | * CDC Ethernet based networking peripherals | |||
| 3 | * Copyright (C) 2003-2005 by David Brownell | |||
| 4 | * | |||
| 5 | * This program is free software; you can redistribute it and/or modify | |||
| 6 | * it under the terms of the GNU General Public License as published by | |||
| 7 | * the Free Software Foundation; either version 2 of the License, or | |||
| 8 | * (at your option) any later version. | |||
| 9 | * | |||
| 10 | * This program is distributed in the hope that it will be useful, | |||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
| 13 | * GNU General Public License for more details. | |||
| 14 | * | |||
| 15 | * You should have received a copy of the GNU General Public License | |||
| 16 | * along with this program; if not, write to the Free Software | |||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
| 18 | */ | |||
| 19 | ||||
| 20 | // #define DEBUG // error path messages, extra info | |||
| 21 | // #define VERBOSE // more; success messages | |||
| 22 | ||||
| 23 | #include <linux/config.h> | |||
| 24 | #include <linux/module.h> | |||
| 25 | #include <linux/sched.h> | |||
| 26 | #include <linux/init.h> | |||
| 27 | #include <linux/netdevice.h> | |||
| 28 | #include <linux/etherdevice.h> | |||
| 29 | #include <linux/ctype.h> | |||
| 30 | #include <linux/ethtool.h> | |||
| 31 | #include <linux/workqueue.h> | |||
| 32 | #include <linux/mii.h> | |||
| 33 | #include <linux/usb.h> | |||
| 34 | #include <linux/usb_cdc.h> | |||
| 35 | ||||
| 36 | #include "usbnet.h" | |||
| 37 | ||||
| 38 | ||||
| 39 | /* | |||
| 40 | * probes control interface, claims data interface, collects the bulk | |||
| 41 | * endpoints, activates data interface (if needed), maybe sets MTU. | |||
| 42 | * all pure cdc, except for certain firmware workarounds, and knowing | |||
| 43 | * that rndis uses one different rule. | |||
| 44 | */ | |||
| 0 | 0 | - | 45 | int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) |
| 46 | { | |||
| 47 | u8 *buf = intf->cur_altsetting->extra; | |||
| 48 | int len = intf->cur_altsetting->extralen; | |||
| 49 | struct usb_interface_descriptor *d; | |||
| 50 | struct cdc_state *info = (void *) &dev->data; | |||
| 51 | int status; | |||
| 52 | int rndis; | |||
| 53 | struct usb_driver *driver = driver_of(intf); | |||
| 54 | ||||
| 0 | 0 | - | 55 | if (sizeof dev->data < sizeof *info) |
| 0 | - | 56 | return -EDOM; | |
| 57 | ||||
| 58 | /* expect strict spec conformance for the descriptors, but | |||
| 59 | * cope with firmware which stores them in the wrong place | |||
| 60 | */ | |||
| 0 | 0 | - | 61 | if (len == 0 && dev->udev->actconfig->extralen) { |
| 0 | - | 61 | T && T | |
| 0 | - | 61 | T && F | |
| 0 | - | 61 | F && _ | |
| 62 | /* Motorola SB4100 (and others: Brad Hards says it's | |||
| 63 | * from a Broadcom design) put CDC descriptors here | |||
| 64 | */ | |||
| 65 | buf = dev->udev->actconfig->extra; | |||
| 66 | len = dev->udev->actconfig->extralen; | |||
| 0 | 0 | - | 67 | if (len) |
| 68 | dev_dbg(&intf->dev, | |||
| 0 | 0 | - | 68 | ternary-?: ( & intf -> dev ) -> driver |
| 69 | "CDC descriptors on config\n"); | |||
| 70 | } | |||
| 71 | ||||
| 72 | /* this assumes that if there's a non-RNDIS vendor variant | |||
| 73 | * of cdc-acm, it'll fail RNDIS requests cleanly. | |||
| 74 | */ | |||
| 75 | rndis = (intf->cur_altsetting->desc.bInterfaceProtocol == 0xff); | |||
| 76 | ||||
| 77 | memset(info, 0, sizeof *info); | |||
| 78 | info->control = intf; | |||
| 0 | 0 | - | 79 | while (len > 3) { |
| 0 | 0 | - | 80 | if (buf [1] != USB_DT_CS_INTERFACE) |
| 0 | - | 81 | goto next_desc; | |
| 82 | ||||
| 83 | /* use bDescriptorSubType to identify the CDC descriptors. | |||
| 84 | * We expect devices with CDC header and union descriptors. | |||
| 85 | * For CDC Ethernet we need the ethernet descriptor. | |||
| 86 | * For RNDIS, ignore two (pointless) CDC modem descriptors | |||
| 87 | * in favor of a complicated OID-based RPC scheme doing what | |||
| 88 | * CDC Ethernet achieves with a simple descriptor. | |||
| 89 | */ | |||
| 90 | switch (buf [2]) { | |||
| 0 | - | 91 | case USB_CDC_HEADER_TYPE: | |
| 0 | 0 | - | 92 | if (info->header) { |
| 93 | dev_dbg(&intf->dev, "extra CDC header\n"); | |||
| 0 | 0 | - | 93 | ternary-?: ( & intf -> dev ) -> driver |
| 0 | - | 94 | goto bad_desc; | |
| 95 | } | |||
| 96 | info->header = (void *) buf; | |||
| 0 | 0 | - | 97 | if (info->header->bLength != sizeof *info->header) { |
| 98 | dev_dbg(&intf->dev, "CDC header len %u\n", | |||
| 0 | 0 | - | 98 | ternary-?: ( & intf -> dev ) -> driver |
| 99 | info->header->bLength); | |||
| 0 | - | 100 | goto bad_desc; | |
| 101 | } | |||
| 0 | - | 102 | break; | |
| 0 | - | 103 | case USB_CDC_UNION_TYPE: | |
| 0 | 0 | - | 104 | if (info->u) { |
| 105 | dev_dbg(&intf->dev, "extra CDC union\n"); | |||
| 0 | 0 | - | 105 | ternary-?: ( & intf -> dev ) -> driver |
| 0 | - | 106 | goto bad_desc; | |
| 107 | } | |||
| 108 | info->u = (void *) buf; | |||
| 0 | 0 | - | 109 | if (info->u->bLength != sizeof *info->u) { |
| 110 | dev_dbg(&intf->dev, "CDC union len %u\n", | |||
| 0 | 0 | - | 110 | ternary-?: ( & intf -> dev ) -> driver |
| 111 | info->u->bLength); | |||
| 0 | - | 112 | goto bad_desc; | |
| 113 | } | |||
| 114 | ||||
| 115 | /* we need a master/control interface (what we're | |||
| 116 | * probed with) and a slave/data interface; union | |||
| 117 | * descriptors sort this all out. | |||
| 118 | */ | |||
| 119 | info->control = usb_ifnum_to_if(dev->udev, | |||
| 120 | info->u->bMasterInterface0); | |||
| 121 | info->data = usb_ifnum_to_if(dev->udev, | |||
| 122 | info->u->bSlaveInterface0); | |||
| 0 | 0 | - | 123 | if (!info->control || !info->data) { |
| 0 | - | 123 | T || _ | |
| 0 | - | 123 | F || T | |
| 0 | - | 123 | F || F | |
| 124 | dev_dbg(&intf->dev, | |||
| 0 | 0 | - | 124 | ternary-?: ( & intf -> dev ) -> driver |
| 125 | "master #%u/%p slave #%u/%p\n", | |||
| 126 | info->u->bMasterInterface0, | |||
| 127 | info->control, | |||
| 128 | info->u->bSlaveInterface0, | |||
| 129 | info->data); | |||
| 0 | - | 130 | goto bad_desc; | |
| 131 | } | |||
| 0 | 0 | - | 132 | if (info->control != intf) { |
| 133 | dev_dbg(&intf->dev, "bogus CDC Union\n"); | |||
| 0 | 0 | - | 133 | ternary-?: ( & intf -> dev ) -> driver |
| 134 | /* Ambit USB Cable Modem (and maybe others) | |||
| 135 | * interchanges master and slave interface. | |||
| 136 | */ | |||
| 0 | 0 | - | 137 | if (info->data == intf) { |
| 138 | info->data = info->control; | |||
| 139 | info->control = intf; | |||
| 140 | } else | |||
| 0 | - | 141 | goto bad_desc; | |
| 142 | } | |||
| 143 | ||||
| 144 | /* a data interface altsetting does the real i/o */ | |||
| 145 | d = &info->data->cur_altsetting->desc; | |||
| 0 | 0 | - | 146 | if (d->bInterfaceClass != USB_CLASS_CDC_DATA) { |
| 147 | dev_dbg(&intf->dev, "slave class %u\n", | |||
| 0 | 0 | - | 147 | ternary-?: ( & intf -> dev ) -> driver |
| 148 | d->bInterfaceClass); | |||
| 0 | - | 149 | goto bad_desc; | |
| 150 | } | |||
| 0 | - | 151 | break; | |
| 0 | - | 152 | case USB_CDC_ETHERNET_TYPE: | |
| 0 | 0 | - | 153 | if (info->ether) { |
| 154 | dev_dbg(&intf->dev, "extra CDC ether\n"); | |||
| 0 | 0 | - | 154 | ternary-?: ( & intf -> dev ) -> driver |
| 0 | - | 155 | goto bad_desc; | |
| 156 | } | |||
| 157 | info->ether = (void *) buf; | |||
| 0 | 0 | - | 158 | if (info->ether->bLength != sizeof *info->ether) { |
| 159 | dev_dbg(&intf->dev, "CDC ether len %u\n", | |||
| 0 | 0 | - | 159 | ternary-?: ( & intf -> dev ) -> driver |
| 160 | info->ether->bLength); | |||
| 0 | - | 161 | goto bad_desc; | |
| 162 | } | |||
| 163 | dev->hard_mtu = le16_to_cpu( | |||
| 164 | info->ether->wMaxSegmentSize); | |||
| 165 | /* because of Zaurus, we may be ignoring the host | |||
| 166 | * side link address we were given. | |||
| 167 | */ | |||
| 0 | - | 168 | break; | |
| 169 | } | |||
| 170 | next_desc: | |||
| 171 | len -= buf [0]; /* bLength */ | |||
| 172 | buf += buf [0]; | |||
| 173 | } | |||
| 174 | ||||
| 0 | 0 | - | 175 | if (!info->header || !info->u || (!rndis && !info->ether)) { |
| 0 | - | 175 | T || _ || (_ && _) | |
| 0 | - | 175 | F || T || (_ && _) | |
| 0 | - | 175 | F || F || (T && T) | |
| 0 | - | 175 | F || F || (T && F) | |
| 0 | - | 175 | F || F || (F && _) | |
| 176 | dev_dbg(&intf->dev, "missing cdc %s%s%sdescriptor\n", | |||
| 0 | 0 | - | 176 | ternary-?: ( & intf -> dev ) -> driver |
| 0 | 0 | - | 176 | ternary-?: info -> header |
| 0 | 0 | - | 176 | ternary-?: info -> u |
| 0 | 0 | - | 176 | ternary-?: info -> ether |
| 177 | info->header ? "" : "header ", | |||
| 178 | info->u ? "" : "union ", | |||
| 179 | info->ether ? "" : "ether "); | |||
| 0 | - | 180 | goto bad_desc; | |
| 181 | } | |||
| 182 | ||||
| 183 | /* claim data interface and set it up ... with side effects. | |||
| 184 | * network traffic can't flow until an altsetting is enabled. | |||
| 185 | */ | |||
| 186 | status = usb_driver_claim_interface(driver, info->data, dev); | |||
| 0 | 0 | - | 187 | if (status < 0) |
| 0 | - | 188 | return status; | |
| 189 | status = usbnet_get_endpoints(dev, info->data); | |||
| 0 | 0 | - | 190 | if (status < 0) { |
| 191 | /* ensure immediate exit from usbnet_disconnect */ | |||
| 192 | usb_set_intfdata(info->data, NULL); | |||
| 193 | usb_driver_release_interface(driver, info->data); | |||
| 0 | - | 194 | return status; | |
| 195 | } | |||
| 196 | ||||
| 197 | /* status endpoint: optional for CDC Ethernet, not RNDIS (or ACM) */ | |||
| 198 | dev->status = NULL; | |||
| 0 | 0 | - | 199 | if (info->control->cur_altsetting->desc.bNumEndpoints == 1) { |
| 200 | struct usb_endpoint_descriptor *desc; | |||
| 201 | ||||
| 202 | dev->status = &info->control->cur_altsetting->endpoint [0]; | |||
| 203 | desc = &dev->status->desc; | |||
| 204 | if (desc->bmAttributes != USB_ENDPOINT_XFER_INT | |||
| 205 | || !(desc->bEndpointAddress & USB_DIR_IN) | |||
| 206 | || (le16_to_cpu(desc->wMaxPacketSize) | |||
| 207 | < sizeof(struct usb_cdc_notification)) | |||
| 0 | 0 | - | 208 | || !desc->bInterval) { |
| 0 | - | 208 | T || !(_) || (_) || _ | |
| 0 | - | 208 | F || !(T) || (T) || _ | |
| 0 | - | 208 | F || !(T) || (F) || T | |
| 0 | - | 208 | F || !(F) || (_) || _ | |
| 0 | - | 208 | F || !(T) || (F) || F | |
| 209 | dev_dbg(&intf->dev, "bad notification endpoint\n"); | |||
| 0 | 0 | - | 209 | ternary-?: ( & intf -> dev ) -> driver |
| 210 | dev->status = NULL; | |||
| 211 | } | |||
| 212 | } | |||
| 0 | 0 | - | 213 | if (rndis && !dev->status) { |
| 0 | - | 213 | T && T | |
| 0 | - | 213 | T && F | |
| 0 | - | 213 | F && _ | |
| 214 | dev_dbg(&intf->dev, "missing RNDIS status endpoint\n"); | |||
| 0 | 0 | - | 214 | ternary-?: ( & intf -> dev ) -> driver |
| 215 | usb_set_intfdata(info->data, NULL); | |||
| 216 | usb_driver_release_interface(driver, info->data); | |||
| 0 | - | 217 | return -ENODEV; | |
| 218 | } | |||
| 0 | - | 219 | return 0; | |
| 220 | ||||
| 221 | bad_desc: | |||
| 222 | dev_info(&dev->udev->dev, "bad CDC descriptors\n"); | |||
| 0 | 0 | - | 222 | ternary-?: ( & dev -> udev -> dev ) -> driver |
| 0 | - | 223 | return -ENODEV; | |
| 224 | } | |||
| 225 | EXPORT_SYMBOL_GPL(usbnet_generic_cdc_bind); | |||
| 226 | ||||
| 0 | 0 | - | 227 | void usbnet_cdc_unbind(struct usbnet *dev, struct usb_interface *intf) |
| 228 | { | |||
| 229 | struct cdc_state *info = (void *) &dev->data; | |||
| 230 | struct usb_driver *driver = driver_of(intf); | |||
| 231 | ||||
| 232 | /* disconnect master --> disconnect slave */ | |||
| 0 | 0 | - | 233 | if (intf == info->control && info->data) { |
| 0 | - | 233 | T && T | |
| 0 | - | 233 | T && F | |
| 0 | - | 233 | F && _ | |
| 234 | /* ensure immediate exit from usbnet_disconnect */ | |||
| 235 | usb_set_intfdata(info->data, NULL); | |||
| 236 | usb_driver_release_interface(driver, info->data); | |||
| 237 | info->data = NULL; | |||
| 238 | } | |||
| 239 | ||||
| 240 | /* and vice versa (just in case) */ | |||
| 0 | 0 | - | 241 | else if (intf == info->data && info->control) { |
| 0 | - | 241 | T && T | |
| 0 | - | 241 | T && F | |
| 0 | - | 241 | F && _ | |
| 242 | /* ensure immediate exit from usbnet_disconnect */ | |||
| 243 | usb_set_intfdata(info->control, NULL); | |||
| 244 | usb_driver_release_interface(driver, info->control); | |||
| 245 | info->control = NULL; | |||
| 246 | } | |||
| 247 | } | |||
| 248 | EXPORT_SYMBOL_GPL(usbnet_cdc_unbind); | |||
| 249 | ||||
| 250 | ||||
| 251 | /*------------------------------------------------------------------------- | |||
| 252 | * | |||
| 253 | * Communications Device Class, Ethernet Control model | |||
| 254 | * | |||
| 255 | * Takes two interfaces. The DATA interface is inactive till an altsetting | |||
| 256 | * is selected. Configuration data includes class descriptors. There's | |||
| 257 | * an optional status endpoint on the control interface. | |||
| 258 | * | |||
| 259 | * This should interop with whatever the 2.4 "CDCEther.c" driver | |||
| 260 | * (by Brad Hards) talked with, with more functionality. | |||
| 261 | * | |||
| 262 | *-------------------------------------------------------------------------*/ | |||
| 263 | ||||
| 0 | 0 | - | 264 | static void dumpspeed(struct usbnet *dev, __le32 *speeds) |
| 265 | { | |||
| 0 | 0 | - | 266 | if (netif_msg_timer(dev)) |
| 267 | devinfo(dev, "link speeds: %u kbps up, %u kbps down", | |||
| 268 | __le32_to_cpu(speeds[0]) / 1000, | |||
| 269 | __le32_to_cpu(speeds[1]) / 1000); | |||
| 270 | } | |||
| 271 | ||||
| 0 | 0 | - | 272 | static void cdc_status(struct usbnet *dev, struct urb *urb) |
| 273 | { | |||
| 274 | struct usb_cdc_notification *event; | |||
| 275 | ||||
| 0 | 0 | - | 276 | if (urb->actual_length < sizeof *event) |
| 0 | - | 277 | return; | |
| 278 | ||||
| 279 | /* SPEED_CHANGE can get split into two 8-byte packets */ | |||
| 0 | 0 | - | 280 | if (test_and_clear_bit(EVENT_STS_SPLIT, &dev->flags)) { |
| 281 | dumpspeed(dev, (__le32 *) urb->transfer_buffer); | |||
| 0 | - | 282 | return; | |
| 283 | } | |||
| 284 | ||||
| 285 | event = urb->transfer_buffer; | |||
| 286 | switch (event->bNotificationType) { | |||
| 0 | - | 287 | case USB_CDC_NOTIFY_NETWORK_CONNECTION: | |
| 0 | 0 | - | 288 | if (netif_msg_timer(dev)) |
| 289 | devdbg(dev, "CDC: carrier %s", | |||
| 0 | 0 | - | 289 | ternary-?: event -> wValue |
| 290 | event->wValue ? "on" : "off"); | |||
| 0 | 0 | - | 291 | if (event->wValue) |
| 292 | netif_carrier_on(dev->net); | |||
| 293 | else | |||
| 294 | netif_carrier_off(dev->net); | |||
| 0 | - | 295 | break; | |
| 0 | - | 296 | case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */ | |
| 0 | 0 | - | 297 | if (netif_msg_timer(dev)) |
| 298 | devdbg(dev, "CDC: speed change (len %d)", | |||
| 299 | urb->actual_length); | |||
| 0 | 0 | - | 300 | if (urb->actual_length != (sizeof *event + 8)) |
| 301 | set_bit(EVENT_STS_SPLIT, &dev->flags); | |||
| 302 | else | |||
| 303 | dumpspeed(dev, (__le32 *) &event[1]); | |||
| 0 | - | 304 | break; | |
| 305 | /* USB_CDC_NOTIFY_RESPONSE_AVAILABLE can happen too (e.g. RNDIS), | |||
| 306 | * but there are no standard formats for the response data. | |||
| 307 | */ | |||
| 0 | - | 308 | default: | |
| 309 | deverr(dev, "CDC: unexpected notification %02x!", | |||
| 310 | event->bNotificationType); | |||
| 0 | - | 311 | break; | |
| 312 | } | |||
| 313 | } | |||
| 314 | ||||
| 0 | 0 | - | 315 | static u8 nibble(unsigned char c) |
| 316 | { | |||
| 0 | 0 | - | 317 | if (likely(isdigit(c))) |
| 0 | - | 318 | return c - '0'; | |
| 319 | c = toupper(c); | |||
| 0 | 0 | - | 320 | if (likely(isxdigit(c))) |
| 0 | - | 321 | return 10 + c - 'A'; | |
| 0 | - | 322 | return 0; | |
| 323 | } | |||
| 324 | ||||
| 325 | static inline int | |||
| 0 | 0 | - | 326 | get_ethernet_addr(struct usbnet *dev, struct usb_cdc_ether_desc *e) |
| 327 | { | |||
| 328 | int tmp, i; | |||
| 329 | unsigned char buf [13]; | |||
| 330 | ||||
| 331 | tmp = usb_string(dev->udev, e->iMACAddress, buf, sizeof buf); | |||
| 0 | 0 | - | 332 | if (tmp != 12) { |
| 333 | dev_dbg(&dev->udev->dev, | |||
| 0 | 0 | - | 333 | ternary-?: ( & dev -> udev -> dev ) -> driver |
| 334 | "bad MAC string %d fetch, %d\n", e->iMACAddress, tmp); | |||
| 0 | 0 | - | 335 | if (tmp >= 0) |
| 336 | tmp = -EINVAL; | |||
| 0 | - | 337 | return tmp; | |
| 338 | } | |||
| 0 | 0 | - | 339 | for (i = tmp = 0; i < 6; i++, tmp += 2) |
| 340 | dev->net->dev_addr [i] = | |||
| 341 | (nibble(buf [tmp]) << 4) + nibble(buf [tmp + 1]); | |||
| 0 | - | 342 | return 0; | |
| 343 | } | |||
| 344 | ||||
| 0 | 0 | - | 345 | static int cdc_bind(struct usbnet *dev, struct usb_interface *intf) |
| 346 | { | |||
| 347 | int status; | |||
| 348 | struct cdc_state *info = (void *) &dev->data; | |||
| 349 | ||||
| 350 | status = usbnet_generic_cdc_bind(dev, intf); | |||
| 0 | 0 | - | 351 | if (status < 0) |
| 0 | - | 352 | return status; | |
| 353 | ||||
| 354 | status = get_ethernet_addr(dev, info->ether); | |||
| 0 | 0 | - | 355 | if (status < 0) { |
| 356 | usb_set_intfdata(info->data, NULL); | |||
| 357 | usb_driver_release_interface(driver_of(intf), info->data); | |||
| 0 | - | 358 | return status; | |
| 359 | } | |||
| 360 | ||||
| 361 | /* FIXME cdc-ether has some multicast code too, though it complains | |||
| 362 | * in routine cases. info->ether describes the multicast support. | |||
| 363 | * Implement that here, manipulating the cdc filter as needed. | |||
| 364 | */ | |||
| 0 | - | 365 | return 0; | |
| 366 | } | |||
| 367 | ||||
| 368 | static const struct driver_info cdc_info = { | |||
| 369 | .description = "CDC Ethernet Device", | |||
| 370 | .flags = FLAG_ETHER, | |||
| 371 | // .check_connect = cdc_check_connect, | |||
| 372 | .bind = cdc_bind, | |||
| 373 | .unbind = usbnet_cdc_unbind, | |||
| 374 | .status = cdc_status, | |||
| 375 | }; | |||
| 376 | ||||
| 377 | /*-------------------------------------------------------------------------*/ | |||
| 378 | ||||
| 379 | ||||
| 380 | static const struct usb_device_id products [] = { | |||
| 381 | /* | |||
| 382 | * BLACKLIST !! | |||
| 383 | * | |||
| 384 | * First blacklist any products that are egregiously nonconformant | |||
| 385 | * with the CDC Ethernet specs. Minor braindamage we cope with; when | |||
| 386 | * they're not even trying, needing a separate driver is only the first | |||
| 387 | * of the differences to show up. | |||
| 388 | */ | |||
| 389 | ||||
| 390 | #define ZAURUS_MASTER_INTERFACE \ | |||
| 391 | .bInterfaceClass = USB_CLASS_COMM, \ | |||
| 392 | .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, \ | |||
| 393 | .bInterfaceProtocol = USB_CDC_PROTO_NONE | |||
| 394 | ||||
| 395 | /* SA-1100 based Sharp Zaurus ("collie"), or compatible; | |||
| 396 | * wire-incompatible with true CDC Ethernet implementations. | |||
| 397 | * (And, it seems, needlessly so...) | |||
| 398 | */ | |||
| 399 | { | |||
| 400 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | |||
| 401 | | USB_DEVICE_ID_MATCH_DEVICE, | |||
| 402 | .idVendor = 0x04DD, | |||
| 403 | .idProduct = 0x8004, | |||
| 404 | ZAURUS_MASTER_INTERFACE, | |||
| 405 | .driver_info = 0, | |||
| 406 | }, | |||
| 407 | ||||
| 408 | /* PXA-25x based Sharp Zaurii. Note that it seems some of these | |||
| 409 | * (later models especially) may have shipped only with firmware | |||
| 410 | * advertising false "CDC MDLM" compatibility ... but we're not | |||
| 411 | * clear which models did that, so for now let's assume the worst. | |||
| 412 | */ | |||
| 413 | { | |||
| 414 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | |||
| 415 | | USB_DEVICE_ID_MATCH_DEVICE, | |||
| 416 | .idVendor = 0x04DD, | |||
| 417 | .idProduct = 0x8005, /* A-300 */ | |||
| 418 | ZAURUS_MASTER_INTERFACE, | |||
| 419 | .driver_info = 0, | |||
| 420 | }, { | |||
| 421 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | |||
| 422 | | USB_DEVICE_ID_MATCH_DEVICE, | |||
| 423 | .idVendor = 0x04DD, | |||
| 424 | .idProduct = 0x8006, /* B-500/SL-5600 */ | |||
| 425 | ZAURUS_MASTER_INTERFACE, | |||
| 426 | .driver_info = 0, | |||
| 427 | }, { | |||
| 428 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | |||
| 429 | | USB_DEVICE_ID_MATCH_DEVICE, | |||
| 430 | .idVendor = 0x04DD, | |||
| 431 | .idProduct = 0x8007, /* C-700 */ | |||
| 432 | ZAURUS_MASTER_INTERFACE, | |||
| 433 | .driver_info = 0, | |||
| 434 | }, { | |||
| 435 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | |||
| 436 | | USB_DEVICE_ID_MATCH_DEVICE, | |||
| 437 | .idVendor = 0x04DD, | |||
| 438 | .idProduct = 0x9031, /* C-750 C-760 */ | |||
| 439 | ZAURUS_MASTER_INTERFACE, | |||
| 440 | .driver_info = 0, | |||
| 441 | }, { | |||
| 442 | .match_flags = USB_DEVICE_ID_MATCH_INT_INFO | |||
| 443 | | USB_DEVICE_ID_MATCH_DEVICE, | |||
| 444 | .idVendor = 0x04DD, | |||
| 445 | .idProduct = 0x9032, /* SL-6000 */ | |||