aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/class/usblp.c3
-rw-r--r--drivers/usb/core/hub.c3
-rw-r--r--drivers/usb/input/hid-core.c63
-rw-r--r--drivers/usb/input/usbtouchscreen.c2
-rw-r--r--drivers/usb/input/xpad.c41
-rw-r--r--drivers/usb/net/Kconfig8
-rw-r--r--drivers/usb/net/usbnet.c58
-rw-r--r--drivers/usb/serial/Kconfig4
-rw-r--r--drivers/usb/serial/cp2101.c3
-rw-r--r--drivers/usb/serial/sierra.c3
-rw-r--r--drivers/usb/storage/unusual_devs.h9
11 files changed, 144 insertions, 53 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 809d465eb25..6303970e93c 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -722,6 +722,7 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t
722 usblp->wcomplete = 0; 722 usblp->wcomplete = 0;
723 err = usb_submit_urb(usblp->writeurb, GFP_KERNEL); 723 err = usb_submit_urb(usblp->writeurb, GFP_KERNEL);
724 if (err) { 724 if (err) {
725 usblp->wcomplete = 1;
725 if (err != -ENOMEM) 726 if (err != -ENOMEM)
726 count = -EIO; 727 count = -EIO;
727 else 728 else
@@ -1202,8 +1203,6 @@ static int usblp_suspend (struct usb_interface *intf, pm_message_t message)
1202 down (&usblp->sem); 1203 down (&usblp->sem);
1203 /* we take no more IO */ 1204 /* we take no more IO */
1204 usblp->sleeping = 1; 1205 usblp->sleeping = 1;
1205 /* we wait for anything printing */
1206 wait_event (usblp->wait, usblp->wcomplete || !usblp->present);
1207 usblp_unlink_urbs(usblp); 1206 usblp_unlink_urbs(usblp);
1208 up (&usblp->sem); 1207 up (&usblp->sem);
1209 mutex_unlock (&usblp_mutex); 1208 mutex_unlock (&usblp_mutex);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 66bff184a30..ba165aff9ea 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1188,6 +1188,7 @@ static inline void show_string(struct usb_device *udev, char *id, char *string)
1188 1188
1189#ifdef CONFIG_USB_OTG 1189#ifdef CONFIG_USB_OTG
1190#include "otg_whitelist.h" 1190#include "otg_whitelist.h"
1191static int __usb_port_suspend(struct usb_device *, int port1);
1191#endif 1192#endif
1192 1193
1193/** 1194/**
@@ -1289,8 +1290,6 @@ int usb_new_device(struct usb_device *udev)
1289 * (Includes HNP test device.) 1290 * (Includes HNP test device.)
1290 */ 1291 */
1291 if (udev->bus->b_hnp_enable || udev->bus->is_b_host) { 1292 if (udev->bus->b_hnp_enable || udev->bus->is_b_host) {
1292 static int __usb_port_suspend(struct usb_device *,
1293 int port1);
1294 err = __usb_port_suspend(udev, udev->bus->otg_port); 1293 err = __usb_port_suspend(udev, udev->bus->otg_port);
1295 if (err < 0) 1294 if (err < 0)
1296 dev_dbg(&udev->dev, "HNP fail, %d\n", err); 1295 dev_dbg(&udev->dev, "HNP fail, %d\n", err);
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index 45f44fe33bf..6daf85c6eee 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -270,7 +270,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
270 * Read data value from item. 270 * Read data value from item.
271 */ 271 */
272 272
273static __inline__ __u32 item_udata(struct hid_item *item) 273static u32 item_udata(struct hid_item *item)
274{ 274{
275 switch (item->size) { 275 switch (item->size) {
276 case 1: return item->data.u8; 276 case 1: return item->data.u8;
@@ -280,7 +280,7 @@ static __inline__ __u32 item_udata(struct hid_item *item)
280 return 0; 280 return 0;
281} 281}
282 282
283static __inline__ __s32 item_sdata(struct hid_item *item) 283static s32 item_sdata(struct hid_item *item)
284{ 284{
285 switch (item->size) { 285 switch (item->size) {
286 case 1: return item->data.s8; 286 case 1: return item->data.s8;
@@ -727,7 +727,7 @@ static struct hid_device *hid_parse_report(__u8 *start, unsigned size)
727 * done by hand. 727 * done by hand.
728 */ 728 */
729 729
730static __inline__ __s32 snto32(__u32 value, unsigned n) 730static s32 snto32(__u32 value, unsigned n)
731{ 731{
732 switch (n) { 732 switch (n) {
733 case 8: return ((__s8)value); 733 case 8: return ((__s8)value);
@@ -741,9 +741,9 @@ static __inline__ __s32 snto32(__u32 value, unsigned n)
741 * Convert a signed 32-bit integer to a signed n-bit integer. 741 * Convert a signed 32-bit integer to a signed n-bit integer.
742 */ 742 */
743 743
744static __inline__ __u32 s32ton(__s32 value, unsigned n) 744static u32 s32ton(__s32 value, unsigned n)
745{ 745{
746 __s32 a = value >> (n - 1); 746 s32 a = value >> (n - 1);
747 if (a && a != -1) 747 if (a && a != -1)
748 return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1; 748 return value < 0 ? 1 << (n - 1) : (1 << (n - 1)) - 1;
749 return value & ((1 << n) - 1); 749 return value & ((1 << n) - 1);
@@ -751,30 +751,55 @@ static __inline__ __u32 s32ton(__s32 value, unsigned n)
751 751
752/* 752/*
753 * Extract/implement a data field from/to a little endian report (bit array). 753 * Extract/implement a data field from/to a little endian report (bit array).
754 *
755 * Code sort-of follows HID spec:
756 * http://www.usb.org/developers/devclass_docs/HID1_11.pdf
757 *
758 * While the USB HID spec allows unlimited length bit fields in "report
759 * descriptors", most devices never use more than 16 bits.
760 * One model of UPS is claimed to report "LINEV" as a 32-bit field.
761 * Search linux-kernel and linux-usb-devel archives for "hid-core extract".
754 */ 762 */
755 763
756static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n) 764static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n)
757{ 765{
758 u32 x; 766 u64 x;
767
768 WARN_ON(n > 32);
759 769
760 report += offset >> 3; /* adjust byte index */ 770 report += offset >> 3; /* adjust byte index */
761 offset &= 8 - 1; 771 offset &= 7; /* now only need bit offset into one byte */
762 x = get_unaligned((u32 *) report); 772 x = get_unaligned((u64 *) report);
763 x = le32_to_cpu(x); 773 x = le64_to_cpu(x);
764 x = (x >> offset) & ((1 << n) - 1); 774 x = (x >> offset) & ((1ULL << n) - 1); /* extract bit field */
765 return x; 775 return (u32) x;
766} 776}
767 777
778/*
779 * "implement" : set bits in a little endian bit stream.
780 * Same concepts as "extract" (see comments above).
781 * The data mangled in the bit stream remains in little endian
782 * order the whole time. It make more sense to talk about
783 * endianness of register values by considering a register
784 * a "cached" copy of the little endiad bit stream.
785 */
768static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value) 786static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value)
769{ 787{
770 u32 x; 788 u64 x;
789 u64 m = (1ULL << n) - 1;
790
791 WARN_ON(n > 32);
792
793 WARN_ON(value > m);
794 value &= m;
771 795
772 report += offset >> 3; 796 report += offset >> 3;
773 offset &= 8 - 1; 797 offset &= 7;
774 x = get_unaligned((u32 *)report); 798
775 x &= cpu_to_le32(~((((__u32) 1 << n) - 1) << offset)); 799 x = get_unaligned((u64 *)report);
776 x |= cpu_to_le32(value << offset); 800 x &= cpu_to_le64(~(m << offset));
777 put_unaligned(x,(u32 *)report); 801 x |= cpu_to_le64(((u64) value) << offset);
802 put_unaligned(x, (u64 *) report);
778} 803}
779 804
780/* 805/*
@@ -1615,6 +1640,9 @@ void hid_init_reports(struct hid_device *hid)
1615#define USB_VENDOR_ID_SUN 0x0430 1640#define USB_VENDOR_ID_SUN 0x0430
1616#define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab 1641#define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab
1617 1642
1643#define USB_VENDOR_ID_AIRCABLE 0x16CA
1644#define USB_DEVICE_ID_AIRCABLE1 0x1502
1645
1618/* 1646/*
1619 * Alphabetically sorted blacklist by quirk type. 1647 * Alphabetically sorted blacklist by quirk type.
1620 */ 1648 */
@@ -1632,6 +1660,7 @@ static const struct hid_blacklist {
1632 { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_22, HID_QUIRK_IGNORE }, 1660 { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_22, HID_QUIRK_IGNORE },
1633 { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_23, HID_QUIRK_IGNORE }, 1661 { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_23, HID_QUIRK_IGNORE },
1634 { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE }, 1662 { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE },
1663 { USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1, HID_QUIRK_IGNORE },
1635 { USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE }, 1664 { USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE },
1636 { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE }, 1665 { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE },
1637 { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, HID_QUIRK_IGNORE }, 1666 { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, HID_QUIRK_IGNORE },
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c
index 2902742895a..933ceddf3de 100644
--- a/drivers/usb/input/usbtouchscreen.c
+++ b/drivers/usb/input/usbtouchscreen.c
@@ -640,7 +640,7 @@ static int usbtouch_probe(struct usb_interface *intf,
640 type->max_press, 0, 0); 640 type->max_press, 0, 0);
641 641
642 usb_fill_int_urb(usbtouch->irq, usbtouch->udev, 642 usb_fill_int_urb(usbtouch->irq, usbtouch->udev,
643 usb_rcvintpipe(usbtouch->udev, 0x81), 643 usb_rcvintpipe(usbtouch->udev, endpoint->bEndpointAddress),
644 usbtouch->data, type->rept_size, 644 usbtouch->data, type->rept_size,
645 usbtouch_irq, usbtouch, endpoint->bInterval); 645 usbtouch_irq, usbtouch, endpoint->bInterval);
646 646
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
index 6a12a943b93..df97e5c803f 100644
--- a/drivers/usb/input/xpad.c
+++ b/drivers/usb/input/xpad.c
@@ -2,6 +2,10 @@
2 * X-Box gamepad - v0.0.6 2 * X-Box gamepad - v0.0.6
3 * 3 *
4 * Copyright (c) 2002 Marko Friedemann <mfr@bmx-chemnitz.de> 4 * Copyright (c) 2002 Marko Friedemann <mfr@bmx-chemnitz.de>
5 * 2004 Oliver Schwartz <Oliver.Schwartz@gmx.de>,
6 * Steven Toth <steve@toth.demon.co.uk>,
7 * Franz Lehner <franz@caos.at>,
8 * Ivan Hawkes <blackhawk@ivanhawkes.com>
5 * 2005 Dominic Cerquetti <binary1230@yahoo.com> 9 * 2005 Dominic Cerquetti <binary1230@yahoo.com>
6 * 2006 Adam Buchbinder <adam.buchbinder@gmail.com> 10 * 2006 Adam Buchbinder <adam.buchbinder@gmail.com>
7 * 11 *
@@ -29,6 +33,7 @@
29 * - ITO Takayuki for providing essential xpad information on his website 33 * - ITO Takayuki for providing essential xpad information on his website
30 * - Vojtech Pavlik - iforce driver / input subsystem 34 * - Vojtech Pavlik - iforce driver / input subsystem
31 * - Greg Kroah-Hartman - usb-skeleton driver 35 * - Greg Kroah-Hartman - usb-skeleton driver
36 * - XBOX Linux project - extra USB id's
32 * 37 *
33 * TODO: 38 * TODO:
34 * - fine tune axes (especially trigger axes) 39 * - fine tune axes (especially trigger axes)
@@ -54,6 +59,13 @@
54 * - fixed d-pad to axes mapping 59 * - fixed d-pad to axes mapping
55 * 60 *
56 * 2002-07-17 - 0.0.5 : simplified d-pad handling 61 * 2002-07-17 - 0.0.5 : simplified d-pad handling
62 *
63 * 2004-10-02 - 0.0.6 : DDR pad support
64 * - borrowed from the XBOX linux kernel
65 * - USB id's for commonly used dance pads are present
66 * - dance pads will map D-PAD to buttons, not axes
67 * - pass the module paramater 'dpad_to_buttons' to force
68 * the D-PAD to map to buttons if your pad is not detected
57 */ 69 */
58 70
59#include <linux/kernel.h> 71#include <linux/kernel.h>
@@ -90,8 +102,35 @@ static const struct xpad_device {
90 { 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", MAP_DPAD_TO_AXES }, 102 { 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", MAP_DPAD_TO_AXES },
91 { 0x045e, 0x0289, "Microsoft X-Box pad v2 (US)", MAP_DPAD_TO_AXES }, 103 { 0x045e, 0x0289, "Microsoft X-Box pad v2 (US)", MAP_DPAD_TO_AXES },
92 { 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", MAP_DPAD_TO_AXES }, 104 { 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", MAP_DPAD_TO_AXES },
93 { 0x05fd, 0x107a, "InterAct 'PowerPad Pro' X-Box pad (Germany)", MAP_DPAD_TO_AXES }, 105 { 0x045e, 0x0287, "Microsoft Xbox Controller S", MAP_DPAD_TO_AXES },
94 { 0x0c12, 0x8809, "RedOctane Xbox Dance Pad", MAP_DPAD_TO_BUTTONS }, 106 { 0x0c12, 0x8809, "RedOctane Xbox Dance Pad", MAP_DPAD_TO_BUTTONS },
107 { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", MAP_DPAD_TO_AXES },
108 { 0x046d, 0xca84, "Logitech Xbox Cordless Controller", MAP_DPAD_TO_AXES },
109 { 0x046d, 0xca88, "Logitech Compact Controller for Xbox", MAP_DPAD_TO_AXES },
110 { 0x05fd, 0x1007, "Mad Catz Controller (unverified)", MAP_DPAD_TO_AXES },
111 { 0x05fd, 0x107a, "InterAct 'PowerPad Pro' X-Box pad (Germany)", MAP_DPAD_TO_AXES },
112 { 0x0738, 0x4516, "Mad Catz Control Pad", MAP_DPAD_TO_AXES },
113 { 0x0738, 0x4522, "Mad Catz LumiCON", MAP_DPAD_TO_AXES },
114 { 0x0738, 0x4526, "Mad Catz Control Pad Pro", MAP_DPAD_TO_AXES },
115 { 0x0738, 0x4536, "Mad Catz MicroCON", MAP_DPAD_TO_AXES },
116 { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS },
117 { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", MAP_DPAD_TO_AXES },
118 { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS },
119 { 0x0c12, 0x8802, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES },
120 { 0x0c12, 0x8810, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES },
121 { 0x0c12, 0x9902, "HAMA VibraX - *FAULTY HARDWARE*", MAP_DPAD_TO_AXES },
122 { 0x0e4c, 0x1097, "Radica Gamester Controller", MAP_DPAD_TO_AXES },
123 { 0x0e4c, 0x2390, "Radica Games Jtech Controller", MAP_DPAD_TO_AXES},
124 { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", MAP_DPAD_TO_AXES },
125 { 0x0e6f, 0x0005, "Eclipse wireless Controller", MAP_DPAD_TO_AXES },
126 { 0x0e6f, 0x0006, "Edge wireless Controller", MAP_DPAD_TO_AXES },
127 { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", MAP_DPAD_TO_AXES },
128 { 0x0f30, 0x0202, "Joytech Advanced Controller", MAP_DPAD_TO_AXES },
129 { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", MAP_DPAD_TO_AXES },
130 { 0x102c, 0xff0c, "Joytech Wireless Advanced Controller", MAP_DPAD_TO_AXES },
131 { 0x12ab, 0x8809, "Xbox DDR dancepad", MAP_DPAD_TO_BUTTONS },
132 { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS },
133 { 0xffff, 0xffff, "Chinese-made Xbox Controller", MAP_DPAD_TO_AXES },
95 { 0x0000, 0x0000, "Generic X-Box pad", MAP_DPAD_UNKNOWN } 134 { 0x0000, 0x0000, "Generic X-Box pad", MAP_DPAD_UNKNOWN }
96}; 135};
97 136
diff --git a/drivers/usb/net/Kconfig b/drivers/usb/net/Kconfig
index 454a186b64a..e081836014a 100644
--- a/drivers/usb/net/Kconfig
+++ b/drivers/usb/net/Kconfig
@@ -92,8 +92,13 @@ config USB_RTL8150
92 To compile this driver as a module, choose M here: the 92 To compile this driver as a module, choose M here: the
93 module will be called rtl8150. 93 module will be called rtl8150.
94 94
95config USB_USBNET_MII
96 tristate
97 default n
98
95config USB_USBNET 99config USB_USBNET
96 tristate "Multi-purpose USB Networking Framework" 100 tristate "Multi-purpose USB Networking Framework"
101 select MII if USBNET_MII != n
97 ---help--- 102 ---help---
98 This driver supports several kinds of network links over USB, 103 This driver supports several kinds of network links over USB,
99 with "minidrivers" built around a common network driver core 104 with "minidrivers" built around a common network driver core
@@ -129,7 +134,7 @@ config USB_NET_AX8817X
129 tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters" 134 tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters"
130 depends on USB_USBNET && NET_ETHERNET 135 depends on USB_USBNET && NET_ETHERNET
131 select CRC32 136 select CRC32
132 select MII 137 select USB_USBNET_MII
133 default y 138 default y
134 help 139 help
135 This option adds support for ASIX AX88xxx based USB 2.0 140 This option adds support for ASIX AX88xxx based USB 2.0
@@ -210,6 +215,7 @@ config USB_NET_PLUSB
210config USB_NET_MCS7830 215config USB_NET_MCS7830
211 tristate "MosChip MCS7830 based Ethernet adapters" 216 tristate "MosChip MCS7830 based Ethernet adapters"
212 depends on USB_USBNET 217 depends on USB_USBNET
218 select USB_USBNET_MII
213 help 219 help
214 Choose this option if you're using a 10/100 Ethernet USB2 220 Choose this option if you're using a 10/100 Ethernet USB2
215 adapter based on the MosChip 7830 controller. This includes 221 adapter based on the MosChip 7830 controller. This includes
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index 40873635d80..760b5327b81 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -669,6 +669,9 @@ done:
669 * they'll probably want to use this base set. 669 * they'll probably want to use this base set.
670 */ 670 */
671 671
672#if defined(CONFIG_MII) || defined(CONFIG_MII_MODULE)
673#define HAVE_MII
674
672int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd) 675int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd)
673{ 676{
674 struct usbnet *dev = netdev_priv(net); 677 struct usbnet *dev = netdev_priv(net);
@@ -699,20 +702,6 @@ int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd)
699} 702}
700EXPORT_SYMBOL_GPL(usbnet_set_settings); 703EXPORT_SYMBOL_GPL(usbnet_set_settings);
701 704
702
703void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
704{
705 struct usbnet *dev = netdev_priv(net);
706
707 /* REVISIT don't always return "usbnet" */
708 strncpy (info->driver, driver_name, sizeof info->driver);
709 strncpy (info->version, DRIVER_VERSION, sizeof info->version);
710 strncpy (info->fw_version, dev->driver_info->description,
711 sizeof info->fw_version);
712 usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info);
713}
714EXPORT_SYMBOL_GPL(usbnet_get_drvinfo);
715
716u32 usbnet_get_link (struct net_device *net) 705u32 usbnet_get_link (struct net_device *net)
717{ 706{
718 struct usbnet *dev = netdev_priv(net); 707 struct usbnet *dev = netdev_priv(net);
@@ -730,40 +719,57 @@ u32 usbnet_get_link (struct net_device *net)
730} 719}
731EXPORT_SYMBOL_GPL(usbnet_get_link); 720EXPORT_SYMBOL_GPL(usbnet_get_link);
732 721
733u32 usbnet_get_msglevel (struct net_device *net) 722int usbnet_nway_reset(struct net_device *net)
734{ 723{
735 struct usbnet *dev = netdev_priv(net); 724 struct usbnet *dev = netdev_priv(net);
736 725
737 return dev->msg_enable; 726 if (!dev->mii.mdio_write)
727 return -EOPNOTSUPP;
728
729 return mii_nway_restart(&dev->mii);
738} 730}
739EXPORT_SYMBOL_GPL(usbnet_get_msglevel); 731EXPORT_SYMBOL_GPL(usbnet_nway_reset);
740 732
741void usbnet_set_msglevel (struct net_device *net, u32 level) 733#endif /* HAVE_MII */
734
735void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
742{ 736{
743 struct usbnet *dev = netdev_priv(net); 737 struct usbnet *dev = netdev_priv(net);
744 738
745 dev->msg_enable = level; 739 /* REVISIT don't always return "usbnet" */
740 strncpy (info->driver, driver_name, sizeof info->driver);
741 strncpy (info->version, DRIVER_VERSION, sizeof info->version);
742 strncpy (info->fw_version, dev->driver_info->description,
743 sizeof info->fw_version);
744 usb_make_path (dev->udev, info->bus_info, sizeof info->bus_info);
746} 745}
747EXPORT_SYMBOL_GPL(usbnet_set_msglevel); 746EXPORT_SYMBOL_GPL(usbnet_get_drvinfo);
748 747
749int usbnet_nway_reset(struct net_device *net) 748u32 usbnet_get_msglevel (struct net_device *net)
750{ 749{
751 struct usbnet *dev = netdev_priv(net); 750 struct usbnet *dev = netdev_priv(net);
752 751
753 if (!dev->mii.mdio_write) 752 return dev->msg_enable;
754 return -EOPNOTSUPP; 753}
754EXPORT_SYMBOL_GPL(usbnet_get_msglevel);
755 755
756 return mii_nway_restart(&dev->mii); 756void usbnet_set_msglevel (struct net_device *net, u32 level)
757{
758 struct usbnet *dev = netdev_priv(net);
759
760 dev->msg_enable = level;
757} 761}
758EXPORT_SYMBOL_GPL(usbnet_nway_reset); 762EXPORT_SYMBOL_GPL(usbnet_set_msglevel);
759 763
760/* drivers may override default ethtool_ops in their bind() routine */ 764/* drivers may override default ethtool_ops in their bind() routine */
761static struct ethtool_ops usbnet_ethtool_ops = { 765static struct ethtool_ops usbnet_ethtool_ops = {
766#ifdef HAVE_MII
762 .get_settings = usbnet_get_settings, 767 .get_settings = usbnet_get_settings,
763 .set_settings = usbnet_set_settings, 768 .set_settings = usbnet_set_settings,
764 .get_drvinfo = usbnet_get_drvinfo,
765 .get_link = usbnet_get_link, 769 .get_link = usbnet_get_link,
766 .nway_reset = usbnet_nway_reset, 770 .nway_reset = usbnet_nway_reset,
771#endif
772 .get_drvinfo = usbnet_get_drvinfo,
767 .get_msglevel = usbnet_get_msglevel, 773 .get_msglevel = usbnet_get_msglevel,
768 .set_msglevel = usbnet_set_msglevel, 774 .set_msglevel = usbnet_set_msglevel,
769}; 775};
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
index 9a6ec1b5e3d..2a8dd4cc943 100644
--- a/drivers/usb/serial/Kconfig
+++ b/drivers/usb/serial/Kconfig
@@ -54,10 +54,10 @@ config USB_SERIAL_GENERIC
54 properly. 54 properly.
55 55
56config USB_SERIAL_AIRCABLE 56config USB_SERIAL_AIRCABLE
57 tristate "AIRcable USB Bluetooth Dongle Driver (EXPERIMENTAL)" 57 tristate "USB AIRcable Bluetooth Dongle Driver (EXPERIMENTAL)"
58 depends on USB_SERIAL && EXPERIMENTAL 58 depends on USB_SERIAL && EXPERIMENTAL
59 help 59 help
60 Say Y here if you want to use AIRcable USB Bluetoot Dongle. 60 Say Y here if you want to use USB AIRcable Bluetooth Dongle.
61 61
62 To compile this driver as a module, choose M here: the module 62 To compile this driver as a module, choose M here: the module
63 will be called aircable. 63 will be called aircable.
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c
index bbf6532c26e..f95d42c0d16 100644
--- a/drivers/usb/serial/cp2101.c
+++ b/drivers/usb/serial/cp2101.c
@@ -64,6 +64,9 @@ static struct usb_device_id id_table [] = {
64 { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ 64 { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */
65 { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ 65 { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */
66 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ 66 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
67 { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
68 { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
69 { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
67 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ 70 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
68 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ 71 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
69 { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */ 72 { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index ea16572d19f..4b5097fa48d 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -35,6 +35,7 @@ static struct usb_device_id id_table [] = {
35 { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ 35 { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */
36 { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ 36 { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */
37 { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ 37 { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */
38 { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */
38 { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ 39 { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */
39 { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ 40 { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */
40 { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */ 41 { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */
@@ -58,8 +59,10 @@ static struct usb_device_id id_table_3port [] = {
58 { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ 59 { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */
59 { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ 60 { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */
60 { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ 61 { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */
62 { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */
61 { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ 63 { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */
62 { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ 64 { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */
65 { USB_DEVICE(0x1199, 0x6804) }, /* Sierra Wireless MC8755 for Europe */
63 { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ 66 { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */
64 { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ 67 { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */
65 { } 68 { }
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 37ed8e0f2dc..bc1ac07bf6c 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1236,7 +1236,7 @@ UNUSUAL_DEV( 0x0e21, 0x0520, 0x0100, 0x0100,
1236 "Cowon Systems", 1236 "Cowon Systems",
1237 "iAUDIO M5", 1237 "iAUDIO M5",
1238 US_SC_DEVICE, US_PR_BULK, NULL, 1238 US_SC_DEVICE, US_PR_BULK, NULL,
1239 0 ), 1239 US_FL_NEED_OVERRIDE ),
1240 1240
1241/* Submitted by Antoine Mairesse <antoine.mairesse@free.fr> */ 1241/* Submitted by Antoine Mairesse <antoine.mairesse@free.fr> */
1242UNUSUAL_DEV( 0x0ed1, 0x6660, 0x0100, 0x0300, 1242UNUSUAL_DEV( 0x0ed1, 0x6660, 0x0100, 0x0300,
@@ -1313,6 +1313,13 @@ UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x0000,
1313 US_SC_DEVICE, US_PR_DEVICE, NULL, 1313 US_SC_DEVICE, US_PR_DEVICE, NULL,
1314 US_FL_FIX_CAPACITY ), 1314 US_FL_FIX_CAPACITY ),
1315 1315
1316/* Reported by Jan Mate <mate@fiit.stuba.sk> */
1317UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x0000,
1318 "Sony Ericsson",
1319 "P990i",
1320 US_SC_DEVICE, US_PR_DEVICE, NULL,
1321 US_FL_FIX_CAPACITY ),
1322
1316/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> 1323/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu>
1317 * Tested on hardware version 1.10. 1324 * Tested on hardware version 1.10.
1318 * Entry is needed only for the initializer function override. 1325 * Entry is needed only for the initializer function override.