diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 11:11:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 11:11:04 -0400 |
commit | ff96b3d4b840e8aa126e0a60fd743417ffdee178 (patch) | |
tree | bf16c711040aa5a00e5a6d6675869526b4dbfbb5 /drivers | |
parent | b82a96a7f28b9939576bf79a817c7a238d784b47 (diff) | |
parent | 360b52b08972ada8fd4421e9a7bcbe1ea186c20e (diff) |
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/sysfs.c | 34 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 1 | ||||
-rw-r--r-- | drivers/usb/net/Kconfig | 14 | ||||
-rw-r--r-- | drivers/usb/net/usbnet.c | 53 | ||||
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/cypress_m8.h | 1 |
6 files changed, 73 insertions, 32 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index ec9b3bde8ae5..4ab50009291d 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
@@ -286,6 +286,39 @@ static ssize_t show_interface_string(struct device *dev, char *buf) | |||
286 | } | 286 | } |
287 | static DEVICE_ATTR(interface, S_IRUGO, show_interface_string, NULL); | 287 | static DEVICE_ATTR(interface, S_IRUGO, show_interface_string, NULL); |
288 | 288 | ||
289 | static ssize_t show_modalias(struct device *dev, char *buf) | ||
290 | { | ||
291 | struct usb_interface *intf; | ||
292 | struct usb_device *udev; | ||
293 | |||
294 | intf = to_usb_interface(dev); | ||
295 | udev = interface_to_usbdev(intf); | ||
296 | if (udev->descriptor.bDeviceClass == 0) { | ||
297 | struct usb_host_interface *alt = intf->cur_altsetting; | ||
298 | |||
299 | return sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X\n", | ||
300 | le16_to_cpu(udev->descriptor.idVendor), | ||
301 | le16_to_cpu(udev->descriptor.idProduct), | ||
302 | le16_to_cpu(udev->descriptor.bcdDevice), | ||
303 | udev->descriptor.bDeviceClass, | ||
304 | udev->descriptor.bDeviceSubClass, | ||
305 | udev->descriptor.bDeviceProtocol, | ||
306 | alt->desc.bInterfaceClass, | ||
307 | alt->desc.bInterfaceSubClass, | ||
308 | alt->desc.bInterfaceProtocol); | ||
309 | } else { | ||
310 | return sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*\n", | ||
311 | le16_to_cpu(udev->descriptor.idVendor), | ||
312 | le16_to_cpu(udev->descriptor.idProduct), | ||
313 | le16_to_cpu(udev->descriptor.bcdDevice), | ||
314 | udev->descriptor.bDeviceClass, | ||
315 | udev->descriptor.bDeviceSubClass, | ||
316 | udev->descriptor.bDeviceProtocol); | ||
317 | } | ||
318 | |||
319 | } | ||
320 | static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL); | ||
321 | |||
289 | static struct attribute *intf_attrs[] = { | 322 | static struct attribute *intf_attrs[] = { |
290 | &dev_attr_bInterfaceNumber.attr, | 323 | &dev_attr_bInterfaceNumber.attr, |
291 | &dev_attr_bAlternateSetting.attr, | 324 | &dev_attr_bAlternateSetting.attr, |
@@ -293,6 +326,7 @@ static struct attribute *intf_attrs[] = { | |||
293 | &dev_attr_bInterfaceClass.attr, | 326 | &dev_attr_bInterfaceClass.attr, |
294 | &dev_attr_bInterfaceSubClass.attr, | 327 | &dev_attr_bInterfaceSubClass.attr, |
295 | &dev_attr_bInterfaceProtocol.attr, | 328 | &dev_attr_bInterfaceProtocol.attr, |
329 | &dev_attr_modalias.attr, | ||
296 | NULL, | 330 | NULL, |
297 | }; | 331 | }; |
298 | static struct attribute_group intf_attr_grp = { | 332 | static struct attribute_group intf_attr_grp = { |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 02fefab3501e..429330bc38de 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -72,6 +72,7 @@ static int ehci_hub_suspend (struct usb_hcd *hcd) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | /* turn off now-idle HC */ | 74 | /* turn off now-idle HC */ |
75 | del_timer_sync (&ehci->watchdog); | ||
75 | ehci_halt (ehci); | 76 | ehci_halt (ehci); |
76 | hcd->state = HC_STATE_SUSPENDED; | 77 | hcd->state = HC_STATE_SUSPENDED; |
77 | 78 | ||
diff --git a/drivers/usb/net/Kconfig b/drivers/usb/net/Kconfig index db64c908d4a7..b104430e2c6a 100644 --- a/drivers/usb/net/Kconfig +++ b/drivers/usb/net/Kconfig | |||
@@ -219,17 +219,21 @@ config USB_EPSON2888 | |||
219 | by some sample firmware from Epson. | 219 | by some sample firmware from Epson. |
220 | 220 | ||
221 | config USB_ZAURUS | 221 | config USB_ZAURUS |
222 | boolean "Sharp Zaurus (stock ROMs)" | 222 | boolean "Sharp Zaurus (stock ROMs) and compatible" |
223 | depends on USB_USBNET | 223 | depends on USB_USBNET |
224 | select CRC32 | 224 | select CRC32 |
225 | default y | 225 | default y |
226 | help | 226 | help |
227 | Choose this option to support the usb networking links used by | 227 | Choose this option to support the usb networking links used by |
228 | Zaurus models like the SL-5000D, SL-5500, SL-5600, A-300, B-500. | 228 | Zaurus models like the SL-5000D, SL-5500, SL-5600, A-300, B-500. |
229 | 229 | This also supports some related device firmware, as used in some | |
230 | If you install an alternate ROM image, you may no longer need | 230 | PDAs from Olympus and some cell phones from Motorola. |
231 | to support this protocol. Only the "eth-fd" driver really needs | 231 | |
232 | this non-conformant variant of CDC Ethernet protocol. | 232 | If you install an alternate ROM image, such as the Linux 2.6 based |
233 | versions of OpenZaurus, you should no longer need to support this | ||
234 | protocol. Only the "eth-fd" or "net_fd" drivers in these devices | ||
235 | really need this non-conformant variant of CDC Ethernet (or in | ||
236 | some cases CDC MDLM) protocol, not "g_ether". | ||
233 | 237 | ||
234 | config USB_CDCETHER | 238 | config USB_CDCETHER |
235 | boolean "CDC Ethernet support (smart devices such as cable modems)" | 239 | boolean "CDC Ethernet support (smart devices such as cable modems)" |
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index f6bc6b3b333c..85476e76b244 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c | |||
@@ -1517,6 +1517,26 @@ static void cdc_unbind (struct usbnet *dev, struct usb_interface *intf) | |||
1517 | } | 1517 | } |
1518 | } | 1518 | } |
1519 | 1519 | ||
1520 | #endif /* NEED_GENERIC_CDC */ | ||
1521 | |||
1522 | |||
1523 | #ifdef CONFIG_USB_CDCETHER | ||
1524 | #define HAVE_HARDWARE | ||
1525 | |||
1526 | /*------------------------------------------------------------------------- | ||
1527 | * | ||
1528 | * Communications Device Class, Ethernet Control model | ||
1529 | * | ||
1530 | * Takes two interfaces. The DATA interface is inactive till an altsetting | ||
1531 | * is selected. Configuration data includes class descriptors. | ||
1532 | * | ||
1533 | * This should interop with whatever the 2.4 "CDCEther.c" driver | ||
1534 | * (by Brad Hards) talked with. | ||
1535 | * | ||
1536 | *-------------------------------------------------------------------------*/ | ||
1537 | |||
1538 | #include <linux/ctype.h> | ||
1539 | |||
1520 | 1540 | ||
1521 | static void dumpspeed (struct usbnet *dev, __le32 *speeds) | 1541 | static void dumpspeed (struct usbnet *dev, __le32 *speeds) |
1522 | { | 1542 | { |
@@ -1567,26 +1587,6 @@ static void cdc_status (struct usbnet *dev, struct urb *urb) | |||
1567 | } | 1587 | } |
1568 | } | 1588 | } |
1569 | 1589 | ||
1570 | #endif /* NEED_GENERIC_CDC */ | ||
1571 | |||
1572 | |||
1573 | #ifdef CONFIG_USB_CDCETHER | ||
1574 | #define HAVE_HARDWARE | ||
1575 | |||
1576 | /*------------------------------------------------------------------------- | ||
1577 | * | ||
1578 | * Communications Device Class, Ethernet Control model | ||
1579 | * | ||
1580 | * Takes two interfaces. The DATA interface is inactive till an altsetting | ||
1581 | * is selected. Configuration data includes class descriptors. | ||
1582 | * | ||
1583 | * This should interop with whatever the 2.4 "CDCEther.c" driver | ||
1584 | * (by Brad Hards) talked with. | ||
1585 | * | ||
1586 | *-------------------------------------------------------------------------*/ | ||
1587 | |||
1588 | #include <linux/ctype.h> | ||
1589 | |||
1590 | static u8 nibble (unsigned char c) | 1590 | static u8 nibble (unsigned char c) |
1591 | { | 1591 | { |
1592 | if (likely (isdigit (c))) | 1592 | if (likely (isdigit (c))) |
@@ -2765,7 +2765,7 @@ static int blan_mdlm_bind (struct usbnet *dev, struct usb_interface *intf) | |||
2765 | } | 2765 | } |
2766 | /* expect bcdVersion 1.0, ignore */ | 2766 | /* expect bcdVersion 1.0, ignore */ |
2767 | if (memcmp(&desc->bGUID, blan_guid, 16) | 2767 | if (memcmp(&desc->bGUID, blan_guid, 16) |
2768 | || memcmp(&desc->bGUID, blan_guid, 16) ) { | 2768 | && memcmp(&desc->bGUID, blan_guid, 16) ) { |
2769 | /* hey, this one might _really_ be MDLM! */ | 2769 | /* hey, this one might _really_ be MDLM! */ |
2770 | dev_dbg (&intf->dev, "MDLM guid\n"); | 2770 | dev_dbg (&intf->dev, "MDLM guid\n"); |
2771 | goto bad_desc; | 2771 | goto bad_desc; |
@@ -2797,11 +2797,13 @@ static int blan_mdlm_bind (struct usbnet *dev, struct usb_interface *intf) | |||
2797 | * - bPad (ignored, for PADAFTER -- BLAN-only) | 2797 | * - bPad (ignored, for PADAFTER -- BLAN-only) |
2798 | * bits are: | 2798 | * bits are: |
2799 | * - 0x01 -- Zaurus framing (add CRC) | 2799 | * - 0x01 -- Zaurus framing (add CRC) |
2800 | * - 0x02 -- PADBEFORE | 2800 | * - 0x02 -- PADBEFORE (CRC includes some padding) |
2801 | * - 0x04 -- PADAFTER | 2801 | * - 0x04 -- PADAFTER (some padding after CRC) |
2802 | * - 0x08 -- "fermat" packet mangling (for hw bugs) | 2802 | * - 0x08 -- "fermat" packet mangling (for hw bugs) |
2803 | * the PADBEFORE appears not to matter; we interop | ||
2804 | * with devices that use it and those that don't. | ||
2803 | */ | 2805 | */ |
2804 | if (detail->bDetailData[1] != 0x01) { | 2806 | if ((detail->bDetailData[1] & ~02) != 0x01) { |
2805 | /* bmDataCapabilites == 0 would be fine too, | 2807 | /* bmDataCapabilites == 0 would be fine too, |
2806 | * but framing is minidriver-coupled for now. | 2808 | * but framing is minidriver-coupled for now. |
2807 | */ | 2809 | */ |
@@ -4071,9 +4073,6 @@ static const struct usb_device_id products [] = { | |||
4071 | USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader | 4073 | USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader |
4072 | .driver_info = (unsigned long) &blob_info, | 4074 | .driver_info = (unsigned long) &blob_info, |
4073 | }, { | 4075 | }, { |
4074 | USB_DEVICE (0x22b8, 0x600c), // USBNET Motorola E680 | ||
4075 | .driver_info = (unsigned long) &linuxdev_info, | ||
4076 | }, { | ||
4077 | // Linux Ethernet/RNDIS gadget on pxa210/25x/26x | 4076 | // Linux Ethernet/RNDIS gadget on pxa210/25x/26x |
4078 | // e.g. Gumstix, current OpenZaurus, ... | 4077 | // e.g. Gumstix, current OpenZaurus, ... |
4079 | USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203), | 4078 | USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203), |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index f34a9bb6a219..012e63e05806 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -89,6 +89,7 @@ static int interval; | |||
89 | 89 | ||
90 | static struct usb_device_id id_table_earthmate [] = { | 90 | static struct usb_device_id id_table_earthmate [] = { |
91 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, | 91 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, |
92 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, | ||
92 | { } /* Terminating entry */ | 93 | { } /* Terminating entry */ |
93 | }; | 94 | }; |
94 | 95 | ||
@@ -99,6 +100,7 @@ static struct usb_device_id id_table_cyphidcomrs232 [] = { | |||
99 | 100 | ||
100 | static struct usb_device_id id_table_combined [] = { | 101 | static struct usb_device_id id_table_combined [] = { |
101 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, | 102 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, |
103 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, | ||
102 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, | 104 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, |
103 | { } /* Terminating entry */ | 105 | { } /* Terminating entry */ |
104 | }; | 106 | }; |
diff --git a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h index 1012ee6b19ce..1fa119efe41a 100644 --- a/drivers/usb/serial/cypress_m8.h +++ b/drivers/usb/serial/cypress_m8.h | |||
@@ -13,6 +13,7 @@ | |||
13 | /* DeLorme Earthmate USB - a GPS device */ | 13 | /* DeLorme Earthmate USB - a GPS device */ |
14 | #define VENDOR_ID_DELORME 0x1163 | 14 | #define VENDOR_ID_DELORME 0x1163 |
15 | #define PRODUCT_ID_EARTHMATEUSB 0x0100 | 15 | #define PRODUCT_ID_EARTHMATEUSB 0x0100 |
16 | #define PRODUCT_ID_EARTHMATEUSB_LT20 0x0200 | ||
16 | 17 | ||
17 | /* Cypress HID->COM RS232 Adapter */ | 18 | /* Cypress HID->COM RS232 Adapter */ |
18 | #define VENDOR_ID_CYPRESS 0x04b4 | 19 | #define VENDOR_ID_CYPRESS 0x04b4 |