Commit 3797455fd269f6ae0bc228d5206b502830af03f4

Authored by Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: pl2303: add id for Hewlett-Packard LD220-HP POS pole display
  USB: set correct configuration in probe of ti_usb_3410_5052
  USB: add 5372:2303 to pl2303
  USB: skip Set-Interface(0) if already in altsetting 0
  USB: fix comment about endianness of descriptors
  USB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour
  usbmon: drop bogus 0t from usbmon.txt
  USB: gadget: fix rndis working at high speed
  USB: ftdi_sio: Adding Ewert Energy System's CANdapter PID
  USB: tty: SprogII DCC controller identifiers
  usb-storage: update unusual_devs entry for Nokia 5310
  USB: Unusual devs patch for Nokia 3500c
  USB: storage: unusual_devs.h: Nokia 3109c addition
  USB: fix problem with usbtmc driver not loading properly

Showing 13 changed files Side-by-side Diff

Documentation/usb/gadget_serial.txt
... ... @@ -114,11 +114,11 @@
114 114 Then you must load the gadget serial driver. To load it as an
115 115 ACM device (recommended for interoperability), do this:
116 116  
117   - modprobe g_serial use_acm=1
  117 + modprobe g_serial
118 118  
119 119 To load it as a vendor specific bulk in/out device, do this:
120 120  
121   - modprobe g_serial
  121 + modprobe g_serial use_acm=0
122 122  
123 123 This will also automatically load the underlying gadget peripheral
124 124 controller driver. This must be done each time you reboot the gadget
Documentation/usb/proc_usb_info.txt
... ... @@ -49,8 +49,10 @@
49 49  
50 50 These files can be read as binary data. The binary data consists
51 51 of first the device descriptor, then the descriptors for each
52   -configuration of the device. That information is also shown in
53   -text form by the /proc/bus/usb/devices file, described later.
  52 +configuration of the device. Multi-byte fields in the device and
  53 +configuration descriptors, but not other descriptors, are converted
  54 +to host endianness by the kernel. This information is also shown
  55 +in text form by the /proc/bus/usb/devices file, described later.
54 56  
55 57 These files may also be used to write user-level drivers for the USB
56 58 devices. You would open the /proc/bus/usb/BBB/DDD file read/write,
Documentation/usb/usbmon.txt
... ... @@ -34,11 +34,12 @@
34 34 Verify that bus sockets are present.
35 35  
36 36 # ls /sys/kernel/debug/usbmon
37   -0s 0t 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u
  37 +0s 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u
38 38 #
39 39  
40   -Now you can choose to either use the sockets numbered '0' (to capture packets on
41   -all buses), and skip to step #3, or find the bus used by your device with step #2.
  40 +Now you can choose to either use the socket '0u' (to capture packets on all
  41 +buses), and skip to step #3, or find the bus used by your device with step #2.
  42 +This allows to filter away annoying devices that talk continuously.
42 43  
43 44 2. Find which bus connects to the desired device
44 45  
... ... @@ -99,8 +100,9 @@
99 100  
100 101 Here is the list of words, from left to right:
101 102  
102   -- URB Tag. This is used to identify URBs is normally a kernel mode address
103   - of the URB structure in hexadecimal.
  103 +- URB Tag. This is used to identify URBs, and is normally an in-kernel address
  104 + of the URB structure in hexadecimal, but can be a sequence number or any
  105 + other unique string, within reason.
104 106  
105 107 - Timestamp in microseconds, a decimal number. The timestamp's resolution
106 108 depends on available clock, and so it can be much worse than a microsecond
drivers/usb/class/usbtmc.c
... ... @@ -51,6 +51,7 @@
51 51 { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), },
52 52 { 0, } /* terminating entry */
53 53 };
  54 +MODULE_DEVICE_TABLE(usb, usbtmc_devices);
54 55  
55 56 /*
56 57 * This structure is the capabilities for the device
drivers/usb/core/driver.c
... ... @@ -279,7 +279,9 @@
279 279 * altsetting means creating new endpoint device entries).
280 280 * When either of these happens, defer the Set-Interface.
281 281 */
282   - if (!error && intf->dev.power.status == DPM_ON)
  282 + if (intf->cur_altsetting->desc.bAlternateSetting == 0)
  283 + ; /* Already in altsetting 0 so skip Set-Interface */
  284 + else if (!error && intf->dev.power.status == DPM_ON)
283 285 usb_set_interface(udev, intf->altsetting[0].
284 286 desc.bInterfaceNumber, 0);
285 287 else
drivers/usb/gadget/f_rndis.c
... ... @@ -651,6 +651,8 @@
651 651 fs_in_desc.bEndpointAddress;
652 652 hs_out_desc.bEndpointAddress =
653 653 fs_out_desc.bEndpointAddress;
  654 + hs_notify_desc.bEndpointAddress =
  655 + fs_notify_desc.bEndpointAddress;
654 656  
655 657 /* copy descriptors, and track endpoint copies */
656 658 f->hs_descriptors = usb_copy_descriptors(eth_hs_function);
... ... @@ -662,6 +664,8 @@
662 664 f->hs_descriptors, &hs_in_desc);
663 665 rndis->hs.out = usb_find_endpoint(eth_hs_function,
664 666 f->hs_descriptors, &hs_out_desc);
  667 + rndis->hs.notify = usb_find_endpoint(eth_hs_function,
  668 + f->hs_descriptors, &hs_notify_desc);
665 669 }
666 670  
667 671 rndis->port.open = rndis_open;
drivers/usb/serial/ftdi_sio.c
... ... @@ -143,6 +143,7 @@
143 143 static struct usb_device_id id_table_combined [] = {
144 144 { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
145 145 { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
  146 + { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
146 147 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
147 148 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) },
148 149 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) },
... ... @@ -166,6 +167,7 @@
166 167 { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
167 168 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
168 169 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
  170 + { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
169 171 { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
170 172 { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
171 173 { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
drivers/usb/serial/ftdi_sio.h
... ... @@ -40,6 +40,9 @@
40 40 /* AlphaMicro Components AMC-232USB01 device */
41 41 #define FTDI_AMC232_PID 0xFF00 /* Product Id */
42 42  
  43 +/* www.candapter.com Ewert Energy Systems CANdapter device */
  44 +#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
  45 +
43 46 /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */
44 47 /* the VID is the standard ftdi vid (FTDI_VID) */
45 48 #define FTDI_SCS_DEVICE_0_PID 0xD010 /* SCS PTC-IIusb */
... ... @@ -74,6 +77,9 @@
74 77  
75 78 /* OpenDCC (www.opendcc.de) product id */
76 79 #define FTDI_OPENDCC_PID 0xBFD8
  80 +
  81 +/* Sprog II (Andrew Crosland's SprogII DCC interface) */
  82 +#define FTDI_SPROG_II 0xF0C8
77 83  
78 84 /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
79 85 /* they use the ftdi chipset for the USB interface and the vendor id is the same */
drivers/usb/serial/pl2303.c
... ... @@ -91,6 +91,8 @@
91 91 { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) },
92 92 { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) },
93 93 { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) },
  94 + { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
  95 + { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
94 96 { } /* Terminating entry */
95 97 };
96 98  
drivers/usb/serial/pl2303.h
... ... @@ -110,4 +110,12 @@
110 110 /* Y.C. Cable U.S.A., Inc - USB to RS-232 */
111 111 #define YCCABLE_VENDOR_ID 0x05ad
112 112 #define YCCABLE_PRODUCT_ID 0x0fba
  113 +
  114 +/* "Superial" USB - Serial */
  115 +#define SUPERIAL_VENDOR_ID 0x5372
  116 +#define SUPERIAL_PRODUCT_ID 0x2303
  117 +
  118 +/* Hewlett-Packard LD220-HP POS Pole Display */
  119 +#define HP_VENDOR_ID 0x03f0
  120 +#define HP_LD220_PRODUCT_ID 0x3524
drivers/usb/serial/ti_usb_3410_5052.c
... ... @@ -16,56 +16,6 @@
16 16 * For questions or problems with this driver, contact Texas Instruments
17 17 * technical support, or Al Borchers <alborchers@steinerpoint.com>, or
18 18 * Peter Berger <pberger@brimson.com>.
19   - *
20   - * This driver needs this hotplug script in /etc/hotplug/usb/ti_usb_3410_5052
21   - * or in /etc/hotplug.d/usb/ti_usb_3410_5052.hotplug to set the device
22   - * configuration.
23   - *
24   - * #!/bin/bash
25   - *
26   - * BOOT_CONFIG=1
27   - * ACTIVE_CONFIG=2
28   - *
29   - * if [[ "$ACTION" != "add" ]]
30   - * then
31   - * exit
32   - * fi
33   - *
34   - * CONFIG_PATH=/sys${DEVPATH%/?*}/bConfigurationValue
35   - *
36   - * if [[ 0`cat $CONFIG_PATH` -ne $BOOT_CONFIG ]]
37   - * then
38   - * exit
39   - * fi
40   - *
41   - * PRODUCT=${PRODUCT%/?*} # delete version
42   - * VENDOR_ID=`printf "%d" 0x${PRODUCT%/?*}`
43   - * PRODUCT_ID=`printf "%d" 0x${PRODUCT#*?/}`
44   - *
45   - * PARAM_PATH=/sys/module/ti_usb_3410_5052/parameters
46   - *
47   - * function scan() {
48   - * s=$1
49   - * shift
50   - * for i
51   - * do
52   - * if [[ $s -eq $i ]]
53   - * then
54   - * return 0
55   - * fi
56   - * done
57   - * return 1
58   - * }
59   - *
60   - * IFS=$IFS,
61   - *
62   - * if (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_3410` &&
63   - * scan $PRODUCT_ID 13328 `cat $PARAM_PATH/product_3410`) ||
64   - * (scan $VENDOR_ID 1105 `cat $PARAM_PATH/vendor_5052` &&
65   - * scan $PRODUCT_ID 20562 20818 20570 20575 `cat $PARAM_PATH/product_5052`)
66   - * then
67   - * echo $ACTIVE_CONFIG > $CONFIG_PATH
68   - * fi
69 19 */
70 20  
71 21 #include <linux/kernel.h>
72 22  
... ... @@ -457,9 +407,10 @@
457 407 goto free_tdev;
458 408 }
459 409  
460   - /* the second configuration must be set (in sysfs by hotplug script) */
  410 + /* the second configuration must be set */
461 411 if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
462   - status = -ENODEV;
  412 + status = usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG);
  413 + status = status ? status : -ENODEV;
463 414 goto free_tdev;
464 415 }
465 416  
drivers/usb/storage/unusual_devs.h
... ... @@ -167,8 +167,22 @@
167 167 US_SC_DEVICE, US_PR_DEVICE, NULL,
168 168 US_FL_FIX_CAPACITY ),
169 169  
  170 +/* Reported by Ozan Sener <themgzzy@gmail.com> */
  171 +UNUSUAL_DEV( 0x0421, 0x0060, 0x0551, 0x0551,
  172 + "Nokia",
  173 + "3500c",
  174 + US_SC_DEVICE, US_PR_DEVICE, NULL,
  175 + US_FL_FIX_CAPACITY ),
  176 +
  177 +/* Reported by CSECSY Laszlo <boobaa@frugalware.org> */
  178 +UNUSUAL_DEV( 0x0421, 0x0063, 0x0001, 0x0601,
  179 + "Nokia",
  180 + "Nokia 3109c",
  181 + US_SC_DEVICE, US_PR_DEVICE, NULL,
  182 + US_FL_FIX_CAPACITY ),
  183 +
170 184 /* Patch for Nokia 5310 capacity */
171   -UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0591,
  185 +UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0701,
172 186 "Nokia",
173 187 "5310",
174 188 US_SC_DEVICE, US_PR_DEVICE, NULL,
include/linux/usb/ch9.h
... ... @@ -158,8 +158,12 @@
158 158 * (rarely) accepted by SET_DESCRIPTOR.
159 159 *
160 160 * Note that all multi-byte values here are encoded in little endian
161   - * byte order "on the wire". But when exposed through Linux-USB APIs,
162   - * they've been converted to cpu byte order.
  161 + * byte order "on the wire". Within the kernel and when exposed
  162 + * through the Linux-USB APIs, they are not converted to cpu byte
  163 + * order; it is the responsibility of the client code to do this.
  164 + * The single exception is when device and configuration descriptors (but
  165 + * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD);
  166 + * in this case the fields are converted to host endianness by the kernel.
163 167 */
164 168  
165 169 /*