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

+63 -65
+2 -2
Documentation/usb/gadget_serial.txt
··· 114 Then you must load the gadget serial driver. To load it as an 115 ACM device (recommended for interoperability), do this: 116 117 - modprobe g_serial use_acm=1 118 119 To load it as a vendor specific bulk in/out device, do this: 120 121 - modprobe g_serial 122 123 This will also automatically load the underlying gadget peripheral 124 controller driver. This must be done each time you reboot the gadget
··· 114 Then you must load the gadget serial driver. To load it as an 115 ACM device (recommended for interoperability), do this: 116 117 + modprobe g_serial 118 119 To load it as a vendor specific bulk in/out device, do this: 120 121 + modprobe g_serial use_acm=0 122 123 This will also automatically load the underlying gadget peripheral 124 controller driver. This must be done each time you reboot the gadget
+4 -2
Documentation/usb/proc_usb_info.txt
··· 49 50 These files can be read as binary data. The binary data consists 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. 54 55 These files may also be used to write user-level drivers for the USB 56 devices. You would open the /proc/bus/usb/BBB/DDD file read/write,
··· 49 50 These files can be read as binary data. The binary data consists 51 of first the device descriptor, then the descriptors for each 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. 56 57 These files may also be used to write user-level drivers for the USB 58 devices. You would open the /proc/bus/usb/BBB/DDD file read/write,
+7 -5
Documentation/usb/usbmon.txt
··· 34 Verify that bus sockets are present. 35 36 # ls /sys/kernel/debug/usbmon 37 - 0s 0t 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u 38 # 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. 42 43 2. Find which bus connects to the desired device 44 ··· 100 101 Here is the list of words, from left to right: 102 103 - - URB Tag. This is used to identify URBs is normally a kernel mode address 104 - of the URB structure in hexadecimal. 105 106 - Timestamp in microseconds, a decimal number. The timestamp's resolution 107 depends on available clock, and so it can be much worse than a microsecond
··· 34 Verify that bus sockets are present. 35 36 # ls /sys/kernel/debug/usbmon 37 + 0s 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u 38 # 39 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. 43 44 2. Find which bus connects to the desired device 45 ··· 99 100 Here is the list of words, from left to right: 101 102 + - URB Tag. This is used to identify URBs, and is normally an in-kernel address 103 + of the URB structure in hexadecimal, but can be a sequence number or any 104 + other unique string, within reason. 105 106 - Timestamp in microseconds, a decimal number. The timestamp's resolution 107 depends on available clock, and so it can be much worse than a microsecond
+1
drivers/usb/class/usbtmc.c
··· 51 { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), }, 52 { 0, } /* terminating entry */ 53 }; 54 55 /* 56 * This structure is the capabilities for the device
··· 51 { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), }, 52 { 0, } /* terminating entry */ 53 }; 54 + MODULE_DEVICE_TABLE(usb, usbtmc_devices); 55 56 /* 57 * This structure is the capabilities for the device
+3 -1
drivers/usb/core/driver.c
··· 279 * altsetting means creating new endpoint device entries). 280 * When either of these happens, defer the Set-Interface. 281 */ 282 - if (!error && intf->dev.power.status == DPM_ON) 283 usb_set_interface(udev, intf->altsetting[0]. 284 desc.bInterfaceNumber, 0); 285 else
··· 279 * altsetting means creating new endpoint device entries). 280 * When either of these happens, defer the Set-Interface. 281 */ 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) 285 usb_set_interface(udev, intf->altsetting[0]. 286 desc.bInterfaceNumber, 0); 287 else
+4
drivers/usb/gadget/f_rndis.c
··· 651 fs_in_desc.bEndpointAddress; 652 hs_out_desc.bEndpointAddress = 653 fs_out_desc.bEndpointAddress; 654 655 /* copy descriptors, and track endpoint copies */ 656 f->hs_descriptors = usb_copy_descriptors(eth_hs_function); ··· 664 f->hs_descriptors, &hs_in_desc); 665 rndis->hs.out = usb_find_endpoint(eth_hs_function, 666 f->hs_descriptors, &hs_out_desc); 667 } 668 669 rndis->port.open = rndis_open;
··· 651 fs_in_desc.bEndpointAddress; 652 hs_out_desc.bEndpointAddress = 653 fs_out_desc.bEndpointAddress; 654 + hs_notify_desc.bEndpointAddress = 655 + fs_notify_desc.bEndpointAddress; 656 657 /* copy descriptors, and track endpoint copies */ 658 f->hs_descriptors = usb_copy_descriptors(eth_hs_function); ··· 662 f->hs_descriptors, &hs_in_desc); 663 rndis->hs.out = usb_find_endpoint(eth_hs_function, 664 f->hs_descriptors, &hs_out_desc); 665 + rndis->hs.notify = usb_find_endpoint(eth_hs_function, 666 + f->hs_descriptors, &hs_notify_desc); 667 } 668 669 rndis->port.open = rndis_open;
+2
drivers/usb/serial/ftdi_sio.c
··· 143 static struct usb_device_id id_table_combined [] = { 144 { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, 145 { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, 146 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, 147 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, 148 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, ··· 167 { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) }, 168 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, 169 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, 170 { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) }, 171 { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) }, 172 { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
··· 143 static struct usb_device_id id_table_combined [] = { 144 { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, 145 { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, 146 + { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, 147 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, 148 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, 149 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, ··· 166 { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) }, 167 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, 168 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, 169 + { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) }, 170 { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) }, 171 { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) }, 172 { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
+6
drivers/usb/serial/ftdi_sio.h
··· 40 /* AlphaMicro Components AMC-232USB01 device */ 41 #define FTDI_AMC232_PID 0xFF00 /* Product Id */ 42 43 /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */ 44 /* the VID is the standard ftdi vid (FTDI_VID) */ 45 #define FTDI_SCS_DEVICE_0_PID 0xD010 /* SCS PTC-IIusb */ ··· 77 78 /* OpenDCC (www.opendcc.de) product id */ 79 #define FTDI_OPENDCC_PID 0xBFD8 80 81 /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */ 82 /* they use the ftdi chipset for the USB interface and the vendor id is the same */
··· 40 /* AlphaMicro Components AMC-232USB01 device */ 41 #define FTDI_AMC232_PID 0xFF00 /* Product Id */ 42 43 + /* www.candapter.com Ewert Energy Systems CANdapter device */ 44 + #define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */ 45 + 46 /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */ 47 /* the VID is the standard ftdi vid (FTDI_VID) */ 48 #define FTDI_SCS_DEVICE_0_PID 0xD010 /* SCS PTC-IIusb */ ··· 74 75 /* OpenDCC (www.opendcc.de) product id */ 76 #define FTDI_OPENDCC_PID 0xBFD8 77 + 78 + /* Sprog II (Andrew Crosland's SprogII DCC interface) */ 79 + #define FTDI_SPROG_II 0xF0C8 80 81 /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */ 82 /* they use the ftdi chipset for the USB interface and the vendor id is the same */
+2
drivers/usb/serial/pl2303.c
··· 91 { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, 92 { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, 93 { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) }, 94 { } /* Terminating entry */ 95 }; 96
··· 91 { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, 92 { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, 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) }, 96 { } /* Terminating entry */ 97 }; 98
+8
drivers/usb/serial/pl2303.h
··· 110 /* Y.C. Cable U.S.A., Inc - USB to RS-232 */ 111 #define YCCABLE_VENDOR_ID 0x05ad 112 #define YCCABLE_PRODUCT_ID 0x0fba
··· 110 /* Y.C. Cable U.S.A., Inc - USB to RS-232 */ 111 #define YCCABLE_VENDOR_ID 0x05ad 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
+3 -52
drivers/usb/serial/ti_usb_3410_5052.c
··· 16 * For questions or problems with this driver, contact Texas Instruments 17 * technical support, or Al Borchers <alborchers@steinerpoint.com>, or 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 */ 70 71 #include <linux/kernel.h> ··· 407 goto free_tdev; 408 } 409 410 - /* the second configuration must be set (in sysfs by hotplug script) */ 411 if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) { 412 - status = -ENODEV; 413 goto free_tdev; 414 } 415
··· 16 * For questions or problems with this driver, contact Texas Instruments 17 * technical support, or Al Borchers <alborchers@steinerpoint.com>, or 18 * Peter Berger <pberger@brimson.com>. 19 */ 20 21 #include <linux/kernel.h> ··· 457 goto free_tdev; 458 } 459 460 + /* the second configuration must be set */ 461 if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) { 462 + status = usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG); 463 + status = status ? status : -ENODEV; 464 goto free_tdev; 465 } 466
+15 -1
drivers/usb/storage/unusual_devs.h
··· 167 US_SC_DEVICE, US_PR_DEVICE, NULL, 168 US_FL_FIX_CAPACITY ), 169 170 /* Patch for Nokia 5310 capacity */ 171 - UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0591, 172 "Nokia", 173 "5310", 174 US_SC_DEVICE, US_PR_DEVICE, NULL,
··· 167 US_SC_DEVICE, US_PR_DEVICE, NULL, 168 US_FL_FIX_CAPACITY ), 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 + 184 /* Patch for Nokia 5310 capacity */ 185 + UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0701, 186 "Nokia", 187 "5310", 188 US_SC_DEVICE, US_PR_DEVICE, NULL,
+6 -2
include/linux/usb/ch9.h
··· 158 * (rarely) accepted by SET_DESCRIPTOR. 159 * 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. 163 */ 164 165 /*
··· 158 * (rarely) accepted by SET_DESCRIPTOR. 159 * 160 * Note that all multi-byte values here are encoded in little endian 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. 167 */ 168 169 /*