Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg Kroah-Hartman:
"Here are a number of tiny USB fixes and new USB device ids for your
3.9 tree.

The "largest" one here is a revert of a usb-storage patch that turned
out to be incorrect, breaking existing users, which is never a good
thing. Everything else is pretty simple and small"

* tag 'usb-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (43 commits)
USB: quatech2: only write to the tty if the port is open.
qcserial: bind to DM/DIAG port on Gobi 1K devices
USB: cdc-wdm: fix buffer overflow
usb: serial: Add Rigblaster Advantage to device table
qcaux: add Franklin U600
usb: musb: core: fix possible build error with randconfig
usb: cp210x new Vendor/Device IDs
usb: gadget: pxa25x: fix disconnect reporting
usb: dwc3: ep0: fix sparc64 build
usb: c67x00 RetryCnt value in c67x00 TD should be 3
usb: Correction to c67x00 TD data length mask
usb: Makefile: fix drivers/usb/phy/ Makefile entry
USB: added support for Cinterion's products AH6 and PLS8
usb: gadget: fix omap_udc build errors
USB: storage: fix Huawei mode switching regression
USB: storage: in-kernel modeswitching is deprecated
tools: usb: ffs-test: Fix build failure
USB: option: add Huawei E5331
usb: musb: omap2430: fix sparse warning
usb: musb: omap2430: fix omap_musb_mailbox glue check again
...

+531 -218
+1 -1
drivers/usb/Makefile
··· 46 46 obj-$(CONFIG_USB_SERIAL) += serial/ 47 47 48 48 obj-$(CONFIG_USB) += misc/ 49 - obj-$(CONFIG_USB_COMMON) += phy/ 49 + obj-$(CONFIG_USB_OTG_UTILS) += phy/ 50 50 obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/ 51 51 52 52 obj-$(CONFIG_USB_ATM) += atm/
+2 -2
drivers/usb/c67x00/c67x00-sched.c
··· 100 100 #define TD_PIDEP_OFFSET 0x04 101 101 #define TD_PIDEPMASK_PID 0xF0 102 102 #define TD_PIDEPMASK_EP 0x0F 103 - #define TD_PORTLENMASK_DL 0x02FF 103 + #define TD_PORTLENMASK_DL 0x03FF 104 104 #define TD_PORTLENMASK_PN 0xC000 105 105 106 106 #define TD_STATUS_OFFSET 0x07 ··· 590 590 { 591 591 struct c67x00_td *td; 592 592 struct c67x00_urb_priv *urbp = urb->hcpriv; 593 - const __u8 active_flag = 1, retry_cnt = 1; 593 + const __u8 active_flag = 1, retry_cnt = 3; 594 594 __u8 cmd = 0; 595 595 int tt = 0; 596 596
+3 -3
drivers/usb/chipidea/udc.c
··· 1767 1767 goto put_transceiver; 1768 1768 } 1769 1769 1770 - retval = dbg_create_files(&ci->gadget.dev); 1770 + retval = dbg_create_files(ci->dev); 1771 1771 if (retval) 1772 1772 goto unreg_device; 1773 1773 ··· 1796 1796 1797 1797 dev_err(dev, "error = %i\n", retval); 1798 1798 remove_dbg: 1799 - dbg_remove_files(&ci->gadget.dev); 1799 + dbg_remove_files(ci->dev); 1800 1800 unreg_device: 1801 1801 device_unregister(&ci->gadget.dev); 1802 1802 put_transceiver: ··· 1836 1836 if (ci->global_phy) 1837 1837 usb_put_phy(ci->transceiver); 1838 1838 } 1839 - dbg_remove_files(&ci->gadget.dev); 1839 + dbg_remove_files(ci->dev); 1840 1840 device_unregister(&ci->gadget.dev); 1841 1841 /* my kobject is dynamic, I swear! */ 1842 1842 memset(&ci->gadget, 0, sizeof(ci->gadget));
+20 -3
drivers/usb/class/cdc-wdm.c
··· 56 56 #define WDM_RESPONDING 7 57 57 #define WDM_SUSPENDING 8 58 58 #define WDM_RESETTING 9 59 + #define WDM_OVERFLOW 10 59 60 60 61 #define WDM_MAX 16 61 62 ··· 156 155 { 157 156 struct wdm_device *desc = urb->context; 158 157 int status = urb->status; 158 + int length = urb->actual_length; 159 159 160 160 spin_lock(&desc->iuspin); 161 161 clear_bit(WDM_RESPONDING, &desc->flags); ··· 187 185 } 188 186 189 187 desc->rerr = status; 190 - desc->reslength = urb->actual_length; 191 - memmove(desc->ubuf + desc->length, desc->inbuf, desc->reslength); 192 - desc->length += desc->reslength; 188 + if (length + desc->length > desc->wMaxCommand) { 189 + /* The buffer would overflow */ 190 + set_bit(WDM_OVERFLOW, &desc->flags); 191 + } else { 192 + /* we may already be in overflow */ 193 + if (!test_bit(WDM_OVERFLOW, &desc->flags)) { 194 + memmove(desc->ubuf + desc->length, desc->inbuf, length); 195 + desc->length += length; 196 + desc->reslength = length; 197 + } 198 + } 193 199 skip_error: 194 200 wake_up(&desc->wait); 195 201 ··· 445 435 rv = -ENODEV; 446 436 goto err; 447 437 } 438 + if (test_bit(WDM_OVERFLOW, &desc->flags)) { 439 + clear_bit(WDM_OVERFLOW, &desc->flags); 440 + rv = -ENOBUFS; 441 + goto err; 442 + } 448 443 i++; 449 444 if (file->f_flags & O_NONBLOCK) { 450 445 if (!test_bit(WDM_READ, &desc->flags)) { ··· 493 478 spin_unlock_irq(&desc->iuspin); 494 479 goto retry; 495 480 } 481 + 496 482 if (!desc->reslength) { /* zero length read */ 497 483 dev_dbg(&desc->intf->dev, "%s: zero length - clearing WDM_READ\n", __func__); 498 484 clear_bit(WDM_READ, &desc->flags); ··· 1020 1004 struct wdm_device *desc = wdm_find_device(intf); 1021 1005 int rv; 1022 1006 1007 + clear_bit(WDM_OVERFLOW, &desc->flags); 1023 1008 clear_bit(WDM_RESETTING, &desc->flags); 1024 1009 rv = recover_from_urb_loss(desc); 1025 1010 mutex_unlock(&desc->wlock);
+1
drivers/usb/dwc3/core.c
··· 583 583 break; 584 584 } 585 585 586 + dwc3_free_event_buffers(dwc); 586 587 dwc3_core_exit(dwc); 587 588 588 589 return 0;
-2
drivers/usb/dwc3/dwc3-exynos.c
··· 23 23 #include <linux/usb/nop-usb-xceiv.h> 24 24 #include <linux/of.h> 25 25 26 - #include "core.h" 27 - 28 26 struct dwc3_exynos { 29 27 struct platform_device *dwc3; 30 28 struct platform_device *usb2_phy;
+3 -5
drivers/usb/dwc3/dwc3-omap.c
··· 54 54 #include <linux/usb/otg.h> 55 55 #include <linux/usb/nop-usb-xceiv.h> 56 56 57 - #include "core.h" 58 - 59 57 /* 60 58 * All these registers belong to OMAP's Wrapper around the 61 59 * DesignWare USB3 Core. ··· 463 465 return 0; 464 466 } 465 467 466 - static const struct of_device_id of_dwc3_matach[] = { 468 + static const struct of_device_id of_dwc3_match[] = { 467 469 { 468 470 "ti,dwc3", 469 471 }, 470 472 { }, 471 473 }; 472 - MODULE_DEVICE_TABLE(of, of_dwc3_matach); 474 + MODULE_DEVICE_TABLE(of, of_dwc3_match); 473 475 474 476 static struct platform_driver dwc3_omap_driver = { 475 477 .probe = dwc3_omap_probe, 476 478 .remove = dwc3_omap_remove, 477 479 .driver = { 478 480 .name = "omap-dwc3", 479 - .of_match_table = of_dwc3_matach, 481 + .of_match_table = of_dwc3_match, 480 482 }, 481 483 }; 482 484
-2
drivers/usb/dwc3/dwc3-pci.c
··· 45 45 #include <linux/usb/otg.h> 46 46 #include <linux/usb/nop-usb-xceiv.h> 47 47 48 - #include "core.h" 49 - 50 48 /* FIXME define these in <linux/pci_ids.h> */ 51 49 #define PCI_VENDOR_ID_SYNOPSYS 0x16c3 52 50 #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd
+4 -3
drivers/usb/dwc3/ep0.c
··· 891 891 DWC3_TRBCTL_CONTROL_DATA); 892 892 } else if (!IS_ALIGNED(req->request.length, dep->endpoint.maxpacket) 893 893 && (dep->number == 0)) { 894 - u32 transfer_size; 894 + u32 transfer_size; 895 + u32 maxpacket; 895 896 896 897 ret = usb_gadget_map_request(&dwc->gadget, &req->request, 897 898 dep->number); ··· 903 902 904 903 WARN_ON(req->request.length > DWC3_EP0_BOUNCE_SIZE); 905 904 906 - transfer_size = roundup(req->request.length, 907 - (u32) dep->endpoint.maxpacket); 905 + maxpacket = dep->endpoint.maxpacket; 906 + transfer_size = roundup(req->request.length, maxpacket); 908 907 909 908 dwc->ep0_bounced = true; 910 909
-3
drivers/usb/dwc3/gadget.c
··· 2159 2159 2160 2160 static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) 2161 2161 { 2162 - struct dwc3_gadget_ep_cmd_params params; 2163 2162 struct dwc3_ep *dep; 2164 2163 int ret; 2165 2164 u32 reg; 2166 2165 u8 speed; 2167 2166 2168 2167 dev_vdbg(dwc->dev, "%s\n", __func__); 2169 - 2170 - memset(&params, 0x00, sizeof(params)); 2171 2168 2172 2169 reg = dwc3_readl(dwc->regs, DWC3_DSTS); 2173 2170 speed = reg & DWC3_DSTS_CONNECTSPD;
+6 -6
drivers/usb/gadget/Makefile
··· 35 35 obj-$(CONFIG_USB_FUSB300) += fusb300_udc.o 36 36 obj-$(CONFIG_USB_MV_U3D) += mv_u3d_core.o 37 37 38 + # USB Functions 39 + obj-$(CONFIG_USB_F_ACM) += f_acm.o 40 + f_ss_lb-y := f_loopback.o f_sourcesink.o 41 + obj-$(CONFIG_USB_F_SS_LB) += f_ss_lb.o 42 + obj-$(CONFIG_USB_U_SERIAL) += u_serial.o 43 + 38 44 # 39 45 # USB gadget drivers 40 46 # ··· 80 74 obj-$(CONFIG_USB_G_NCM) += g_ncm.o 81 75 obj-$(CONFIG_USB_G_ACM_MS) += g_acm_ms.o 82 76 obj-$(CONFIG_USB_GADGET_TARGET) += tcm_usb_gadget.o 83 - 84 - # USB Functions 85 - obj-$(CONFIG_USB_F_ACM) += f_acm.o 86 - f_ss_lb-y := f_loopback.o f_sourcesink.o 87 - obj-$(CONFIG_USB_F_SS_LB) += f_ss_lb.o 88 - obj-$(CONFIG_USB_U_SERIAL) += u_serial.o
+1 -4
drivers/usb/gadget/composite.c
··· 1757 1757 /** 1758 1758 * usb_composite_probe() - register a composite driver 1759 1759 * @driver: the driver to register 1760 - * @bind: the callback used to allocate resources that are shared across the 1761 - * whole device, such as string IDs, and add its configurations using 1762 - * @usb_add_config(). This may fail by returning a negative errno 1763 - * value; it should return zero on successful initialization. 1760 + * 1764 1761 * Context: single threaded during gadget setup 1765 1762 * 1766 1763 * This function is used to register drivers using the composite driver
+1
drivers/usb/gadget/f_uac1.c
··· 418 418 419 419 req->context = audio; 420 420 req->complete = f_audio_complete; 421 + len = min_t(size_t, sizeof(value), len); 421 422 memcpy(req->buf, &value, len); 422 423 423 424 return len;
+8 -12
drivers/usb/gadget/imx_udc.c
··· 1334 1334 struct usb_gadget_driver *driver) 1335 1335 { 1336 1336 struct imx_udc_struct *imx_usb; 1337 - int retval; 1338 1337 1339 1338 imx_usb = container_of(gadget, struct imx_udc_struct, gadget); 1340 1339 /* first hook up the driver ... */ 1341 1340 imx_usb->driver = driver; 1342 1341 imx_usb->gadget.dev.driver = &driver->driver; 1343 - 1344 - retval = device_add(&imx_usb->gadget.dev); 1345 - if (retval) 1346 - goto fail; 1347 1342 1348 1343 D_INI(imx_usb->dev, "<%s> registered gadget driver '%s'\n", 1349 1344 __func__, driver->driver.name); ··· 1346 1351 imx_udc_enable(imx_usb); 1347 1352 1348 1353 return 0; 1349 - fail: 1350 - imx_usb->driver = NULL; 1351 - imx_usb->gadget.dev.driver = NULL; 1352 - return retval; 1353 1354 } 1354 1355 1355 1356 static int imx_udc_stop(struct usb_gadget *gadget, ··· 1360 1369 1361 1370 imx_usb->gadget.dev.driver = NULL; 1362 1371 imx_usb->driver = NULL; 1363 - 1364 - device_del(&imx_usb->gadget.dev); 1365 1372 1366 1373 D_INI(imx_usb->dev, "<%s> unregistered gadget driver '%s'\n", 1367 1374 __func__, driver->driver.name); ··· 1466 1477 imx_usb->gadget.dev.parent = &pdev->dev; 1467 1478 imx_usb->gadget.dev.dma_mask = pdev->dev.dma_mask; 1468 1479 1480 + ret = device_add(&imx_usb->gadget.dev); 1481 + if (retval) 1482 + goto fail4; 1483 + 1469 1484 platform_set_drvdata(pdev, imx_usb); 1470 1485 1471 1486 usb_init_data(imx_usb); ··· 1481 1488 1482 1489 ret = usb_add_gadget_udc(&pdev->dev, &imx_usb->gadget); 1483 1490 if (ret) 1484 - goto fail4; 1491 + goto fail5; 1485 1492 1486 1493 return 0; 1494 + fail5: 1495 + device_unregister(&imx_usb->gadget.dev); 1487 1496 fail4: 1488 1497 for (i = 0; i < IMX_USB_NB_EP + 1; i++) 1489 1498 free_irq(imx_usb->usbd_int[i], imx_usb); ··· 1509 1514 int i; 1510 1515 1511 1516 usb_del_gadget_udc(&imx_usb->gadget); 1517 + device_unregister(&imx_usb->gadget.dev); 1512 1518 imx_udc_disable(imx_usb); 1513 1519 del_timer(&imx_usb->timer); 1514 1520
+2 -1
drivers/usb/gadget/omap_udc.c
··· 62 62 #define DRIVER_VERSION "4 October 2004" 63 63 64 64 #define OMAP_DMA_USB_W2FC_TX0 29 65 + #define OMAP_DMA_USB_W2FC_RX0 26 65 66 66 67 /* 67 68 * The OMAP UDC needs _very_ early endpoint setup: before enabling the ··· 1311 1310 } 1312 1311 1313 1312 static int omap_udc_start(struct usb_gadget *g, 1314 - struct usb_gadget_driver *driver) 1313 + struct usb_gadget_driver *driver); 1315 1314 static int omap_udc_stop(struct usb_gadget *g, 1316 1315 struct usb_gadget_driver *driver); 1317 1316
+15 -9
drivers/usb/gadget/pxa25x_udc.c
··· 1266 1266 dev->gadget.dev.driver = &driver->driver; 1267 1267 dev->pullup = 1; 1268 1268 1269 - retval = device_add (&dev->gadget.dev); 1270 - if (retval) { 1271 - dev->driver = NULL; 1272 - dev->gadget.dev.driver = NULL; 1273 - return retval; 1274 - } 1275 - 1276 1269 /* ... then enable host detection and ep0; and we're ready 1277 1270 * for set_configuration as well as eventual disconnect. 1278 1271 */ ··· 1303 1310 } 1304 1311 del_timer_sync(&dev->timer); 1305 1312 1313 + /* report disconnect; the driver is already quiesced */ 1314 + if (driver) 1315 + driver->disconnect(&dev->gadget); 1316 + 1306 1317 /* re-init driver-visible data structures */ 1307 1318 udc_reinit(dev); 1308 1319 } ··· 1328 1331 dev->gadget.dev.driver = NULL; 1329 1332 dev->driver = NULL; 1330 1333 1331 - device_del (&dev->gadget.dev); 1332 1334 dump_state(dev); 1333 1335 1334 1336 return 0; ··· 2142 2146 dev->gadget.dev.parent = &pdev->dev; 2143 2147 dev->gadget.dev.dma_mask = pdev->dev.dma_mask; 2144 2148 2149 + retval = device_add(&dev->gadget.dev); 2150 + if (retval) { 2151 + dev->driver = NULL; 2152 + dev->gadget.dev.driver = NULL; 2153 + goto err_device_add; 2154 + } 2155 + 2145 2156 the_controller = dev; 2146 2157 platform_set_drvdata(pdev, dev); 2147 2158 ··· 2199 2196 free_irq(irq, dev); 2200 2197 #endif 2201 2198 err_irq1: 2199 + device_unregister(&dev->gadget.dev); 2200 + err_device_add: 2202 2201 if (gpio_is_valid(dev->mach->gpio_pullup)) 2203 2202 gpio_free(dev->mach->gpio_pullup); 2204 2203 err_gpio_pullup: ··· 2222 2217 { 2223 2218 struct pxa25x_udc *dev = platform_get_drvdata(pdev); 2224 2219 2225 - usb_del_gadget_udc(&dev->gadget); 2226 2220 if (dev->driver) 2227 2221 return -EBUSY; 2228 2222 2223 + usb_del_gadget_udc(&dev->gadget); 2224 + device_unregister(&dev->gadget.dev); 2229 2225 dev->pullup = 0; 2230 2226 pullup(dev); 2231 2227
+12 -6
drivers/usb/gadget/pxa27x_udc.c
··· 1814 1814 udc->gadget.dev.driver = &driver->driver; 1815 1815 dplus_pullup(udc, 1); 1816 1816 1817 - retval = device_add(&udc->gadget.dev); 1818 - if (retval) { 1819 - dev_err(udc->dev, "device_add error %d\n", retval); 1820 - goto fail; 1821 - } 1822 1817 if (!IS_ERR_OR_NULL(udc->transceiver)) { 1823 1818 retval = otg_set_peripheral(udc->transceiver->otg, 1824 1819 &udc->gadget); ··· 1871 1876 1872 1877 udc->driver = NULL; 1873 1878 1874 - device_del(&udc->gadget.dev); 1875 1879 1876 1880 if (!IS_ERR_OR_NULL(udc->transceiver)) 1877 1881 return otg_set_peripheral(udc->transceiver->otg, NULL); ··· 2474 2480 driver_name, udc->irq, retval); 2475 2481 goto err_irq; 2476 2482 } 2483 + 2484 + retval = device_add(&udc->gadget.dev); 2485 + if (retval) { 2486 + dev_err(udc->dev, "device_add error %d\n", retval); 2487 + goto err_dev_add; 2488 + } 2489 + 2477 2490 retval = usb_add_gadget_udc(&pdev->dev, &udc->gadget); 2478 2491 if (retval) 2479 2492 goto err_add_udc; 2480 2493 2481 2494 pxa_init_debugfs(udc); 2495 + 2482 2496 return 0; 2497 + 2483 2498 err_add_udc: 2499 + device_unregister(&udc->gadget.dev); 2500 + err_dev_add: 2484 2501 free_irq(udc->irq, udc); 2485 2502 err_irq: 2486 2503 iounmap(udc->regs); ··· 2512 2507 int gpio = udc->mach->gpio_pullup; 2513 2508 2514 2509 usb_del_gadget_udc(&udc->gadget); 2510 + device_del(&udc->gadget.dev); 2515 2511 usb_gadget_unregister_driver(udc->driver); 2516 2512 free_irq(udc->irq, udc); 2517 2513 pxa_cleanup_debugfs(udc);
+12 -16
drivers/usb/gadget/s3c2410_udc.c
··· 1668 1668 static int s3c2410_udc_start(struct usb_gadget *g, 1669 1669 struct usb_gadget_driver *driver) 1670 1670 { 1671 - struct s3c2410_udc *udc = to_s3c2410(g) 1672 - int retval; 1671 + struct s3c2410_udc *udc = to_s3c2410(g); 1673 1672 1674 1673 dprintk(DEBUG_NORMAL, "%s() '%s'\n", __func__, driver->driver.name); 1675 1674 ··· 1676 1677 udc->driver = driver; 1677 1678 udc->gadget.dev.driver = &driver->driver; 1678 1679 1679 - /* Bind the driver */ 1680 - retval = device_add(&udc->gadget.dev); 1681 - if (retval) { 1682 - dev_err(&udc->gadget.dev, "Error in device_add() : %d\n", retval); 1683 - goto register_error; 1684 - } 1685 - 1686 1680 /* Enable udc */ 1687 1681 s3c2410_udc_enable(udc); 1688 1682 1689 1683 return 0; 1690 - 1691 - register_error: 1692 - udc->driver = NULL; 1693 - udc->gadget.dev.driver = NULL; 1694 - return retval; 1695 1684 } 1696 1685 1697 1686 static int s3c2410_udc_stop(struct usb_gadget *g, ··· 1687 1700 { 1688 1701 struct s3c2410_udc *udc = to_s3c2410(g); 1689 1702 1690 - device_del(&udc->gadget.dev); 1691 1703 udc->driver = NULL; 1692 1704 1693 1705 /* Disable udc */ ··· 1828 1842 udc->gadget.dev.parent = &pdev->dev; 1829 1843 udc->gadget.dev.dma_mask = pdev->dev.dma_mask; 1830 1844 1845 + /* Bind the driver */ 1846 + retval = device_add(&udc->gadget.dev); 1847 + if (retval) { 1848 + dev_err(&udc->gadget.dev, "Error in device_add() : %d\n", retval); 1849 + goto err_device_add; 1850 + } 1851 + 1831 1852 the_controller = udc; 1832 1853 platform_set_drvdata(pdev, udc); 1833 1854 ··· 1923 1930 err_int: 1924 1931 free_irq(IRQ_USBD, udc); 1925 1932 err_map: 1933 + device_unregister(&udc->gadget.dev); 1934 + err_device_add: 1926 1935 iounmap(base_addr); 1927 1936 err_mem: 1928 1937 release_mem_region(rsrc_start, rsrc_len); ··· 1942 1947 1943 1948 dev_dbg(&pdev->dev, "%s()\n", __func__); 1944 1949 1945 - usb_del_gadget_udc(&udc->gadget); 1946 1950 if (udc->driver) 1947 1951 return -EBUSY; 1948 1952 1953 + usb_del_gadget_udc(&udc->gadget); 1954 + device_unregister(&udc->gadget.dev); 1949 1955 debugfs_remove(udc->regs_info); 1950 1956 1951 1957 if (udc_info && !udc_info->udc_command &&
+3
drivers/usb/gadget/u_uac1.c
··· 240 240 snd = &card->playback; 241 241 snd->filp = filp_open(fn_play, O_WRONLY, 0); 242 242 if (IS_ERR(snd->filp)) { 243 + int ret = PTR_ERR(snd->filp); 244 + 243 245 ERROR(card, "No such PCM playback device: %s\n", fn_play); 244 246 snd->filp = NULL; 247 + return ret; 245 248 } 246 249 pcm_file = snd->filp->private_data; 247 250 snd->substream = pcm_file->substream;
+2 -4
drivers/usb/host/ehci-hcd.c
··· 748 748 /* guard against (alleged) silicon errata */ 749 749 if (cmd & CMD_IAAD) 750 750 ehci_dbg(ehci, "IAA with IAAD still set?\n"); 751 - if (ehci->async_iaa) { 751 + if (ehci->async_iaa) 752 752 COUNT(ehci->stats.iaa); 753 - end_unlink_async(ehci); 754 - } else 755 - ehci_dbg(ehci, "IAA with nothing unlinked?\n"); 753 + end_unlink_async(ehci); 756 754 } 757 755 758 756 /* remote wakeup [4.3.1] */
+27 -9
drivers/usb/host/ehci-q.c
··· 135 135 * qtd is updated in qh_completions(). Update the QH 136 136 * overlay here. 137 137 */ 138 - if (cpu_to_hc32(ehci, qtd->qtd_dma) == qh->hw->hw_current) { 138 + if (qh->hw->hw_token & ACTIVE_BIT(ehci)) { 139 139 qh->hw->hw_qtd_next = qtd->hw_next; 140 140 qtd = NULL; 141 141 } ··· 449 449 else if (last_status == -EINPROGRESS && !urb->unlinked) 450 450 continue; 451 451 452 - /* qh unlinked; token in overlay may be most current */ 453 - if (state == QH_STATE_IDLE 454 - && cpu_to_hc32(ehci, qtd->qtd_dma) 455 - == hw->hw_current) { 452 + /* 453 + * If this was the active qtd when the qh was unlinked 454 + * and the overlay's token is active, then the overlay 455 + * hasn't been written back to the qtd yet so use its 456 + * token instead of the qtd's. After the qtd is 457 + * processed and removed, the overlay won't be valid 458 + * any more. 459 + */ 460 + if (state == QH_STATE_IDLE && 461 + qh->qtd_list.next == &qtd->qtd_list && 462 + (hw->hw_token & ACTIVE_BIT(ehci))) { 456 463 token = hc32_to_cpu(ehci, hw->hw_token); 464 + hw->hw_token &= ~ACTIVE_BIT(ehci); 457 465 458 466 /* An unlink may leave an incomplete 459 467 * async transaction in the TT buffer. ··· 1178 1170 struct ehci_qh *prev; 1179 1171 1180 1172 /* Add to the end of the list of QHs waiting for the next IAAD */ 1181 - qh->qh_state = QH_STATE_UNLINK; 1173 + qh->qh_state = QH_STATE_UNLINK_WAIT; 1182 1174 if (ehci->async_unlink) 1183 1175 ehci->async_unlink_last->unlink_next = qh; 1184 1176 else ··· 1221 1213 1222 1214 /* Do only the first waiting QH (nVidia bug?) */ 1223 1215 qh = ehci->async_unlink; 1224 - ehci->async_iaa = qh; 1225 - ehci->async_unlink = qh->unlink_next; 1226 - qh->unlink_next = NULL; 1216 + 1217 + /* 1218 + * Intel (?) bug: The HC can write back the overlay region 1219 + * even after the IAA interrupt occurs. In self-defense, 1220 + * always go through two IAA cycles for each QH. 1221 + */ 1222 + if (qh->qh_state == QH_STATE_UNLINK_WAIT) { 1223 + qh->qh_state = QH_STATE_UNLINK; 1224 + } else { 1225 + ehci->async_iaa = qh; 1226 + ehci->async_unlink = qh->unlink_next; 1227 + qh->unlink_next = NULL; 1228 + } 1227 1229 1228 1230 /* Make sure the unlinks are all visible to the hardware */ 1229 1231 wmb();
-5
drivers/usb/musb/Kconfig
··· 7 7 config USB_MUSB_HDRC 8 8 tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' 9 9 depends on USB && USB_GADGET 10 - select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) 11 - select NOP_USB_XCEIV if (SOC_TI81XX || SOC_AM33XX) 12 - select TWL4030_USB if MACH_OMAP_3430SDP 13 - select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA 14 - select OMAP_CONTROL_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA 15 10 select USB_OTG_UTILS 16 11 help 17 12 Say Y here if your system has a dual role high speed USB
-6
drivers/usb/musb/musb_core.c
··· 1624 1624 1625 1625 /*-------------------------------------------------------------------------*/ 1626 1626 1627 - #ifdef CONFIG_SYSFS 1628 - 1629 1627 static ssize_t 1630 1628 musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) 1631 1629 { ··· 1739 1741 static const struct attribute_group musb_attr_group = { 1740 1742 .attrs = musb_attributes, 1741 1743 }; 1742 - 1743 - #endif /* sysfs */ 1744 1744 1745 1745 /* Only used to provide driver mode change events */ 1746 1746 static void musb_irq_work(struct work_struct *data) ··· 1964 1968 if (status < 0) 1965 1969 goto fail4; 1966 1970 1967 - #ifdef CONFIG_SYSFS 1968 1971 status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group); 1969 1972 if (status) 1970 1973 goto fail5; 1971 - #endif 1972 1974 1973 1975 pm_runtime_put(musb->controller); 1974 1976
+8 -4
drivers/usb/musb/omap2430.c
··· 51 51 }; 52 52 #define glue_to_musb(g) platform_get_drvdata(g->musb) 53 53 54 - struct omap2430_glue *_glue; 54 + static struct omap2430_glue *_glue; 55 55 56 56 static struct timer_list musb_idle_timer; 57 57 ··· 237 237 { 238 238 struct omap2430_glue *glue = _glue; 239 239 240 - if (glue && glue_to_musb(glue)) { 241 - glue->status = status; 242 - } else { 240 + if (!glue) { 241 + pr_err("%s: musb core is not yet initialized\n", __func__); 242 + return; 243 + } 244 + glue->status = status; 245 + 246 + if (!glue_to_musb(glue)) { 243 247 pr_err("%s: musb core is not yet ready\n", __func__); 244 248 return; 245 249 }
+7 -3
drivers/usb/otg/otg.c
··· 130 130 spin_lock_irqsave(&phy_lock, flags); 131 131 132 132 phy = __usb_find_phy(&phy_list, type); 133 - if (IS_ERR(phy)) { 133 + if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { 134 134 pr_err("unable to find transceiver of type %s\n", 135 135 usb_phy_type_string(type)); 136 136 goto err0; ··· 228 228 spin_lock_irqsave(&phy_lock, flags); 229 229 230 230 phy = __usb_find_phy_dev(dev, &phy_bind_list, index); 231 - if (IS_ERR(phy)) { 231 + if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { 232 232 pr_err("unable to find transceiver\n"); 233 233 goto err0; 234 234 } ··· 301 301 */ 302 302 void usb_put_phy(struct usb_phy *x) 303 303 { 304 - if (x) 304 + if (x) { 305 + struct module *owner = x->dev->driver->owner; 306 + 305 307 put_device(x->dev); 308 + module_put(owner); 309 + } 306 310 } 307 311 EXPORT_SYMBOL(usb_put_phy); 308 312
+9 -15
drivers/usb/phy/omap-control-usb.c
··· 219 219 220 220 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 221 221 "control_dev_conf"); 222 - control_usb->dev_conf = devm_request_and_ioremap(&pdev->dev, res); 223 - if (!control_usb->dev_conf) { 224 - dev_err(&pdev->dev, "Failed to obtain io memory\n"); 225 - return -EADDRNOTAVAIL; 226 - } 222 + control_usb->dev_conf = devm_ioremap_resource(&pdev->dev, res); 223 + if (IS_ERR(control_usb->dev_conf)) 224 + return PTR_ERR(control_usb->dev_conf); 227 225 228 226 if (control_usb->type == OMAP_CTRL_DEV_TYPE1) { 229 227 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 230 228 "otghs_control"); 231 - control_usb->otghs_control = devm_request_and_ioremap( 229 + control_usb->otghs_control = devm_ioremap_resource( 232 230 &pdev->dev, res); 233 - if (!control_usb->otghs_control) { 234 - dev_err(&pdev->dev, "Failed to obtain io memory\n"); 235 - return -EADDRNOTAVAIL; 236 - } 231 + if (IS_ERR(control_usb->otghs_control)) 232 + return PTR_ERR(control_usb->otghs_control); 237 233 } 238 234 239 235 if (control_usb->type == OMAP_CTRL_DEV_TYPE2) { 240 236 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 241 237 "phy_power_usb"); 242 - control_usb->phy_power = devm_request_and_ioremap( 238 + control_usb->phy_power = devm_ioremap_resource( 243 239 &pdev->dev, res); 244 - if (!control_usb->phy_power) { 245 - dev_dbg(&pdev->dev, "Failed to obtain io memory\n"); 246 - return -EADDRNOTAVAIL; 247 - } 240 + if (IS_ERR(control_usb->phy_power)) 241 + return PTR_ERR(control_usb->phy_power); 248 242 249 243 control_usb->sys_clk = devm_clk_get(control_usb->dev, 250 244 "sys_clkin");
+3 -5
drivers/usb/phy/omap-usb3.c
··· 212 212 } 213 213 214 214 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pll_ctrl"); 215 - phy->pll_ctrl_base = devm_request_and_ioremap(&pdev->dev, res); 216 - if (!phy->pll_ctrl_base) { 217 - dev_err(&pdev->dev, "ioremap of pll_ctrl failed\n"); 218 - return -ENOMEM; 219 - } 215 + phy->pll_ctrl_base = devm_ioremap_resource(&pdev->dev, res); 216 + if (IS_ERR(phy->pll_ctrl_base)) 217 + return PTR_ERR(phy->pll_ctrl_base); 220 218 221 219 phy->dev = &pdev->dev; 222 220
+3 -5
drivers/usb/phy/samsung-usbphy.c
··· 787 787 return -ENODEV; 788 788 } 789 789 790 - phy_base = devm_request_and_ioremap(dev, phy_mem); 791 - if (!phy_base) { 792 - dev_err(dev, "%s: register mapping failed\n", __func__); 793 - return -ENXIO; 794 - } 790 + phy_base = devm_ioremap_resource(dev, phy_mem); 791 + if (IS_ERR(phy_base)) 792 + return PTR_ERR(phy_base); 795 793 796 794 sphy = devm_kzalloc(dev, sizeof(*sphy), GFP_KERNEL); 797 795 if (!sphy)
+20
drivers/usb/serial/cp210x.c
··· 85 85 { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ 86 86 { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ 87 87 { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ 88 + { USB_DEVICE(0x2405, 0x0003) }, /* West Mountain Radio RIGblaster Advantage */ 88 89 { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ 89 90 { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ 90 91 { USB_DEVICE(0x10C4, 0x815F) }, /* Timewave HamLinkUSB */ ··· 151 150 { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ 152 151 { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ 153 152 { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */ 153 + { USB_DEVICE(0x1FB9, 0x0100) }, /* Lake Shore Model 121 Current Source */ 154 + { USB_DEVICE(0x1FB9, 0x0200) }, /* Lake Shore Model 218A Temperature Monitor */ 155 + { USB_DEVICE(0x1FB9, 0x0201) }, /* Lake Shore Model 219 Temperature Monitor */ 156 + { USB_DEVICE(0x1FB9, 0x0202) }, /* Lake Shore Model 233 Temperature Transmitter */ 157 + { USB_DEVICE(0x1FB9, 0x0203) }, /* Lake Shore Model 235 Temperature Transmitter */ 158 + { USB_DEVICE(0x1FB9, 0x0300) }, /* Lake Shore Model 335 Temperature Controller */ 159 + { USB_DEVICE(0x1FB9, 0x0301) }, /* Lake Shore Model 336 Temperature Controller */ 160 + { USB_DEVICE(0x1FB9, 0x0302) }, /* Lake Shore Model 350 Temperature Controller */ 161 + { USB_DEVICE(0x1FB9, 0x0303) }, /* Lake Shore Model 371 AC Bridge */ 162 + { USB_DEVICE(0x1FB9, 0x0400) }, /* Lake Shore Model 411 Handheld Gaussmeter */ 163 + { USB_DEVICE(0x1FB9, 0x0401) }, /* Lake Shore Model 425 Gaussmeter */ 164 + { USB_DEVICE(0x1FB9, 0x0402) }, /* Lake Shore Model 455A Gaussmeter */ 165 + { USB_DEVICE(0x1FB9, 0x0403) }, /* Lake Shore Model 475A Gaussmeter */ 166 + { USB_DEVICE(0x1FB9, 0x0404) }, /* Lake Shore Model 465 Three Axis Gaussmeter */ 167 + { USB_DEVICE(0x1FB9, 0x0600) }, /* Lake Shore Model 625A Superconducting MPS */ 168 + { USB_DEVICE(0x1FB9, 0x0601) }, /* Lake Shore Model 642A Magnet Power Supply */ 169 + { USB_DEVICE(0x1FB9, 0x0602) }, /* Lake Shore Model 648 Magnet Power Supply */ 170 + { USB_DEVICE(0x1FB9, 0x0700) }, /* Lake Shore Model 737 VSM Controller */ 171 + { USB_DEVICE(0x1FB9, 0x0701) }, /* Lake Shore Model 776 Hall Matrix */ 154 172 { USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */ 155 173 { USB_DEVICE(0x3195, 0xF280) }, /* Link Instruments MSO-28 */ 156 174 { USB_DEVICE(0x3195, 0xF281) }, /* Link Instruments MSO-28 */
+5
drivers/usb/serial/option.c
··· 341 341 #define CINTERION_PRODUCT_EU3_E 0x0051 342 342 #define CINTERION_PRODUCT_EU3_P 0x0052 343 343 #define CINTERION_PRODUCT_PH8 0x0053 344 + #define CINTERION_PRODUCT_AH6 0x0055 345 + #define CINTERION_PRODUCT_PLS8 0x0060 344 346 345 347 /* Olivetti products */ 346 348 #define OLIVETTI_VENDOR_ID 0x0b3c ··· 581 579 { USB_DEVICE(QUANTA_VENDOR_ID, 0xea42), 582 580 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 583 581 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c05, USB_CLASS_COMM, 0x02, 0xff) }, 582 + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c1f, USB_CLASS_COMM, 0x02, 0xff) }, 584 583 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x1c23, USB_CLASS_COMM, 0x02, 0xff) }, 585 584 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173, 0xff, 0xff, 0xff), 586 585 .driver_info = (kernel_ulong_t) &net_intf1_blacklist }, ··· 1263 1260 { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) }, 1264 1261 { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) }, 1265 1262 { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8) }, 1263 + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AH6) }, 1264 + { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLS8) }, 1266 1265 { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDM) }, 1267 1266 { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_HC28_MDMNET) }, 1268 1267 { USB_DEVICE(SIEMENS_VENDOR_ID, CINTERION_PRODUCT_HC25_MDM) },
+1
drivers/usb/serial/qcaux.c
··· 69 69 { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfd, 0xff) }, /* NMEA */ 70 70 { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfe, 0xff) }, /* WMC */ 71 71 { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xff, 0xff) }, /* DIAG */ 72 + { USB_DEVICE_AND_INTERFACE_INFO(0x1fac, 0x0151, 0xff, 0xff, 0xff) }, 72 73 { }, 73 74 }; 74 75 MODULE_DEVICE_TABLE(usb, id_table);
+5 -2
drivers/usb/serial/qcserial.c
··· 197 197 198 198 if (is_gobi1k) { 199 199 /* Gobi 1K USB layout: 200 - * 0: serial port (doesn't respond) 200 + * 0: DM/DIAG (use libqcdm from ModemManager for communication) 201 201 * 1: serial port (doesn't respond) 202 202 * 2: AT-capable modem port 203 203 * 3: QMI/net 204 204 */ 205 - if (ifnum == 2) 205 + if (ifnum == 0) { 206 + dev_dbg(dev, "Gobi 1K DM/DIAG interface found\n"); 207 + altsetting = 1; 208 + } else if (ifnum == 2) 206 209 dev_dbg(dev, "Modem port found\n"); 207 210 else 208 211 altsetting = -1;
+5 -2
drivers/usb/serial/quatech2.c
··· 661 661 __func__); 662 662 break; 663 663 } 664 - tty_flip_buffer_push(&port->port); 664 + 665 + if (port_priv->is_open) 666 + tty_flip_buffer_push(&port->port); 665 667 666 668 newport = *(ch + 3); 667 669 ··· 706 704 tty_insert_flip_string(&port->port, ch, 1); 707 705 } 708 706 709 - tty_flip_buffer_push(&port->port); 707 + if (port_priv->is_open) 708 + tty_flip_buffer_push(&port->port); 710 709 } 711 710 712 711 static void qt2_write_bulk_callback(struct urb *urb)
+2 -74
drivers/usb/storage/initializers.c
··· 92 92 return 0; 93 93 } 94 94 95 - /* This places the HUAWEI usb dongles in multi-port mode */ 96 - static int usb_stor_huawei_feature_init(struct us_data *us) 95 + /* This places the HUAWEI E220 devices in multi-port mode */ 96 + int usb_stor_huawei_e220_init(struct us_data *us) 97 97 { 98 98 int result; 99 99 ··· 103 103 0x01, 0x0, NULL, 0x0, 1000); 104 104 US_DEBUGP("Huawei mode set result is %d\n", result); 105 105 return 0; 106 - } 107 - 108 - /* 109 - * It will send a scsi switch command called rewind' to huawei dongle. 110 - * When the dongle receives this command at the first time, 111 - * it will reboot immediately. After rebooted, it will ignore this command. 112 - * So it is unnecessary to read its response. 113 - */ 114 - static int usb_stor_huawei_scsi_init(struct us_data *us) 115 - { 116 - int result = 0; 117 - int act_len = 0; 118 - struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf; 119 - char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00, 120 - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 121 - 122 - bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN); 123 - bcbw->Tag = 0; 124 - bcbw->DataTransferLength = 0; 125 - bcbw->Flags = bcbw->Lun = 0; 126 - bcbw->Length = sizeof(rewind_cmd); 127 - memset(bcbw->CDB, 0, sizeof(bcbw->CDB)); 128 - memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd)); 129 - 130 - result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw, 131 - US_BULK_CB_WRAP_LEN, &act_len); 132 - US_DEBUGP("transfer actual length=%d, result=%d\n", act_len, result); 133 - return result; 134 - } 135 - 136 - /* 137 - * It tries to find the supported Huawei USB dongles. 138 - * In Huawei, they assign the following product IDs 139 - * for all of their mobile broadband dongles, 140 - * including the new dongles in the future. 141 - * So if the product ID is not included in this list, 142 - * it means it is not Huawei's mobile broadband dongles. 143 - */ 144 - static int usb_stor_huawei_dongles_pid(struct us_data *us) 145 - { 146 - struct usb_interface_descriptor *idesc; 147 - int idProduct; 148 - 149 - idesc = &us->pusb_intf->cur_altsetting->desc; 150 - idProduct = le16_to_cpu(us->pusb_dev->descriptor.idProduct); 151 - /* The first port is CDROM, 152 - * means the dongle in the single port mode, 153 - * and a switch command is required to be sent. */ 154 - if (idesc && idesc->bInterfaceNumber == 0) { 155 - if ((idProduct == 0x1001) 156 - || (idProduct == 0x1003) 157 - || (idProduct == 0x1004) 158 - || (idProduct >= 0x1401 && idProduct <= 0x1500) 159 - || (idProduct >= 0x1505 && idProduct <= 0x1600) 160 - || (idProduct >= 0x1c02 && idProduct <= 0x2202)) { 161 - return 1; 162 - } 163 - } 164 - return 0; 165 - } 166 - 167 - int usb_stor_huawei_init(struct us_data *us) 168 - { 169 - int result = 0; 170 - 171 - if (usb_stor_huawei_dongles_pid(us)) { 172 - if (le16_to_cpu(us->pusb_dev->descriptor.idProduct) >= 0x1446) 173 - result = usb_stor_huawei_scsi_init(us); 174 - else 175 - result = usb_stor_huawei_feature_init(us); 176 - } 177 - return result; 178 106 }
+2 -2
drivers/usb/storage/initializers.h
··· 46 46 * flash reader */ 47 47 int usb_stor_ucr61s2b_init(struct us_data *us); 48 48 49 - /* This places the HUAWEI usb dongles in multi-port mode */ 50 - int usb_stor_huawei_init(struct us_data *us); 49 + /* This places the HUAWEI E220 devices in multi-port mode */ 50 + int usb_stor_huawei_e220_init(struct us_data *us);
+335 -2
drivers/usb/storage/unusual_devs.h
··· 53 53 * as opposed to devices that do something strangely or wrongly. 54 54 */ 55 55 56 + /* In-kernel mode switching is deprecated. Do not add new devices to 57 + * this list for the sole purpose of switching them to a different 58 + * mode. Existing userspace solutions are superior. 59 + * 60 + * New mode switching devices should instead be added to the database 61 + * maintained at http://www.draisberghof.de/usb_modeswitch/ 62 + */ 63 + 56 64 #if !defined(CONFIG_USB_STORAGE_SDDR09) && \ 57 65 !defined(CONFIG_USB_STORAGE_SDDR09_MODULE) 58 66 #define NO_SDDR09 ··· 1535 1527 /* Reported by fangxiaozhi <huananhu@huawei.com> 1536 1528 * This brings the HUAWEI data card devices into multi-port mode 1537 1529 */ 1538 - UNUSUAL_VENDOR_INTF(0x12d1, 0x08, 0x06, 0x50, 1530 + UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, 1539 1531 "HUAWEI MOBILE", 1540 1532 "Mass Storage", 1541 - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_init, 1533 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1534 + 0), 1535 + UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000, 1536 + "HUAWEI MOBILE", 1537 + "Mass Storage", 1538 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1539 + 0), 1540 + UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000, 1541 + "HUAWEI MOBILE", 1542 + "Mass Storage", 1543 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1544 + 0), 1545 + UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000, 1546 + "HUAWEI MOBILE", 1547 + "Mass Storage", 1548 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1549 + 0), 1550 + UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000, 1551 + "HUAWEI MOBILE", 1552 + "Mass Storage", 1553 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1554 + 0), 1555 + UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000, 1556 + "HUAWEI MOBILE", 1557 + "Mass Storage", 1558 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1559 + 0), 1560 + UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000, 1561 + "HUAWEI MOBILE", 1562 + "Mass Storage", 1563 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1564 + 0), 1565 + UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000, 1566 + "HUAWEI MOBILE", 1567 + "Mass Storage", 1568 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1569 + 0), 1570 + UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000, 1571 + "HUAWEI MOBILE", 1572 + "Mass Storage", 1573 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1574 + 0), 1575 + UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000, 1576 + "HUAWEI MOBILE", 1577 + "Mass Storage", 1578 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1579 + 0), 1580 + UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000, 1581 + "HUAWEI MOBILE", 1582 + "Mass Storage", 1583 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1584 + 0), 1585 + UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000, 1586 + "HUAWEI MOBILE", 1587 + "Mass Storage", 1588 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1589 + 0), 1590 + UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000, 1591 + "HUAWEI MOBILE", 1592 + "Mass Storage", 1593 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1594 + 0), 1595 + UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000, 1596 + "HUAWEI MOBILE", 1597 + "Mass Storage", 1598 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1599 + 0), 1600 + UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000, 1601 + "HUAWEI MOBILE", 1602 + "Mass Storage", 1603 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1604 + 0), 1605 + UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000, 1606 + "HUAWEI MOBILE", 1607 + "Mass Storage", 1608 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1609 + 0), 1610 + UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000, 1611 + "HUAWEI MOBILE", 1612 + "Mass Storage", 1613 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1614 + 0), 1615 + UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000, 1616 + "HUAWEI MOBILE", 1617 + "Mass Storage", 1618 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1619 + 0), 1620 + UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000, 1621 + "HUAWEI MOBILE", 1622 + "Mass Storage", 1623 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1624 + 0), 1625 + UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000, 1626 + "HUAWEI MOBILE", 1627 + "Mass Storage", 1628 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1629 + 0), 1630 + UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000, 1631 + "HUAWEI MOBILE", 1632 + "Mass Storage", 1633 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1634 + 0), 1635 + UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000, 1636 + "HUAWEI MOBILE", 1637 + "Mass Storage", 1638 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1639 + 0), 1640 + UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000, 1641 + "HUAWEI MOBILE", 1642 + "Mass Storage", 1643 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1644 + 0), 1645 + UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000, 1646 + "HUAWEI MOBILE", 1647 + "Mass Storage", 1648 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1649 + 0), 1650 + UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000, 1651 + "HUAWEI MOBILE", 1652 + "Mass Storage", 1653 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1654 + 0), 1655 + UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000, 1656 + "HUAWEI MOBILE", 1657 + "Mass Storage", 1658 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1659 + 0), 1660 + UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000, 1661 + "HUAWEI MOBILE", 1662 + "Mass Storage", 1663 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1664 + 0), 1665 + UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000, 1666 + "HUAWEI MOBILE", 1667 + "Mass Storage", 1668 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1669 + 0), 1670 + UNUSUAL_DEV( 0x12d1, 0x141A, 0x0000, 0x0000, 1671 + "HUAWEI MOBILE", 1672 + "Mass Storage", 1673 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1674 + 0), 1675 + UNUSUAL_DEV( 0x12d1, 0x141B, 0x0000, 0x0000, 1676 + "HUAWEI MOBILE", 1677 + "Mass Storage", 1678 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1679 + 0), 1680 + UNUSUAL_DEV( 0x12d1, 0x141C, 0x0000, 0x0000, 1681 + "HUAWEI MOBILE", 1682 + "Mass Storage", 1683 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1684 + 0), 1685 + UNUSUAL_DEV( 0x12d1, 0x141D, 0x0000, 0x0000, 1686 + "HUAWEI MOBILE", 1687 + "Mass Storage", 1688 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1689 + 0), 1690 + UNUSUAL_DEV( 0x12d1, 0x141E, 0x0000, 0x0000, 1691 + "HUAWEI MOBILE", 1692 + "Mass Storage", 1693 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1694 + 0), 1695 + UNUSUAL_DEV( 0x12d1, 0x141F, 0x0000, 0x0000, 1696 + "HUAWEI MOBILE", 1697 + "Mass Storage", 1698 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1699 + 0), 1700 + UNUSUAL_DEV( 0x12d1, 0x1420, 0x0000, 0x0000, 1701 + "HUAWEI MOBILE", 1702 + "Mass Storage", 1703 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1704 + 0), 1705 + UNUSUAL_DEV( 0x12d1, 0x1421, 0x0000, 0x0000, 1706 + "HUAWEI MOBILE", 1707 + "Mass Storage", 1708 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1709 + 0), 1710 + UNUSUAL_DEV( 0x12d1, 0x1422, 0x0000, 0x0000, 1711 + "HUAWEI MOBILE", 1712 + "Mass Storage", 1713 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1714 + 0), 1715 + UNUSUAL_DEV( 0x12d1, 0x1423, 0x0000, 0x0000, 1716 + "HUAWEI MOBILE", 1717 + "Mass Storage", 1718 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1719 + 0), 1720 + UNUSUAL_DEV( 0x12d1, 0x1424, 0x0000, 0x0000, 1721 + "HUAWEI MOBILE", 1722 + "Mass Storage", 1723 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1724 + 0), 1725 + UNUSUAL_DEV( 0x12d1, 0x1425, 0x0000, 0x0000, 1726 + "HUAWEI MOBILE", 1727 + "Mass Storage", 1728 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1729 + 0), 1730 + UNUSUAL_DEV( 0x12d1, 0x1426, 0x0000, 0x0000, 1731 + "HUAWEI MOBILE", 1732 + "Mass Storage", 1733 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1734 + 0), 1735 + UNUSUAL_DEV( 0x12d1, 0x1427, 0x0000, 0x0000, 1736 + "HUAWEI MOBILE", 1737 + "Mass Storage", 1738 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1739 + 0), 1740 + UNUSUAL_DEV( 0x12d1, 0x1428, 0x0000, 0x0000, 1741 + "HUAWEI MOBILE", 1742 + "Mass Storage", 1743 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1744 + 0), 1745 + UNUSUAL_DEV( 0x12d1, 0x1429, 0x0000, 0x0000, 1746 + "HUAWEI MOBILE", 1747 + "Mass Storage", 1748 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1749 + 0), 1750 + UNUSUAL_DEV( 0x12d1, 0x142A, 0x0000, 0x0000, 1751 + "HUAWEI MOBILE", 1752 + "Mass Storage", 1753 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1754 + 0), 1755 + UNUSUAL_DEV( 0x12d1, 0x142B, 0x0000, 0x0000, 1756 + "HUAWEI MOBILE", 1757 + "Mass Storage", 1758 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1759 + 0), 1760 + UNUSUAL_DEV( 0x12d1, 0x142C, 0x0000, 0x0000, 1761 + "HUAWEI MOBILE", 1762 + "Mass Storage", 1763 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1764 + 0), 1765 + UNUSUAL_DEV( 0x12d1, 0x142D, 0x0000, 0x0000, 1766 + "HUAWEI MOBILE", 1767 + "Mass Storage", 1768 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1769 + 0), 1770 + UNUSUAL_DEV( 0x12d1, 0x142E, 0x0000, 0x0000, 1771 + "HUAWEI MOBILE", 1772 + "Mass Storage", 1773 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1774 + 0), 1775 + UNUSUAL_DEV( 0x12d1, 0x142F, 0x0000, 0x0000, 1776 + "HUAWEI MOBILE", 1777 + "Mass Storage", 1778 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1779 + 0), 1780 + UNUSUAL_DEV( 0x12d1, 0x1430, 0x0000, 0x0000, 1781 + "HUAWEI MOBILE", 1782 + "Mass Storage", 1783 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1784 + 0), 1785 + UNUSUAL_DEV( 0x12d1, 0x1431, 0x0000, 0x0000, 1786 + "HUAWEI MOBILE", 1787 + "Mass Storage", 1788 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1789 + 0), 1790 + UNUSUAL_DEV( 0x12d1, 0x1432, 0x0000, 0x0000, 1791 + "HUAWEI MOBILE", 1792 + "Mass Storage", 1793 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1794 + 0), 1795 + UNUSUAL_DEV( 0x12d1, 0x1433, 0x0000, 0x0000, 1796 + "HUAWEI MOBILE", 1797 + "Mass Storage", 1798 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1799 + 0), 1800 + UNUSUAL_DEV( 0x12d1, 0x1434, 0x0000, 0x0000, 1801 + "HUAWEI MOBILE", 1802 + "Mass Storage", 1803 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1804 + 0), 1805 + UNUSUAL_DEV( 0x12d1, 0x1435, 0x0000, 0x0000, 1806 + "HUAWEI MOBILE", 1807 + "Mass Storage", 1808 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1809 + 0), 1810 + UNUSUAL_DEV( 0x12d1, 0x1436, 0x0000, 0x0000, 1811 + "HUAWEI MOBILE", 1812 + "Mass Storage", 1813 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1814 + 0), 1815 + UNUSUAL_DEV( 0x12d1, 0x1437, 0x0000, 0x0000, 1816 + "HUAWEI MOBILE", 1817 + "Mass Storage", 1818 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1819 + 0), 1820 + UNUSUAL_DEV( 0x12d1, 0x1438, 0x0000, 0x0000, 1821 + "HUAWEI MOBILE", 1822 + "Mass Storage", 1823 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1824 + 0), 1825 + UNUSUAL_DEV( 0x12d1, 0x1439, 0x0000, 0x0000, 1826 + "HUAWEI MOBILE", 1827 + "Mass Storage", 1828 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1829 + 0), 1830 + UNUSUAL_DEV( 0x12d1, 0x143A, 0x0000, 0x0000, 1831 + "HUAWEI MOBILE", 1832 + "Mass Storage", 1833 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1834 + 0), 1835 + UNUSUAL_DEV( 0x12d1, 0x143B, 0x0000, 0x0000, 1836 + "HUAWEI MOBILE", 1837 + "Mass Storage", 1838 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1839 + 0), 1840 + UNUSUAL_DEV( 0x12d1, 0x143C, 0x0000, 0x0000, 1841 + "HUAWEI MOBILE", 1842 + "Mass Storage", 1843 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1844 + 0), 1845 + UNUSUAL_DEV( 0x12d1, 0x143D, 0x0000, 0x0000, 1846 + "HUAWEI MOBILE", 1847 + "Mass Storage", 1848 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1849 + 0), 1850 + UNUSUAL_DEV( 0x12d1, 0x143E, 0x0000, 0x0000, 1851 + "HUAWEI MOBILE", 1852 + "Mass Storage", 1853 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1854 + 0), 1855 + UNUSUAL_DEV( 0x12d1, 0x143F, 0x0000, 0x0000, 1856 + "HUAWEI MOBILE", 1857 + "Mass Storage", 1858 + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init, 1542 1859 0), 1543 1860 1544 1861 /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
+2 -1
include/linux/usb/composite.h
··· 60 60 * @name: For diagnostics, identifies the function. 61 61 * @strings: tables of strings, keyed by identifiers assigned during bind() 62 62 * and by language IDs provided in control requests 63 - * @descriptors: Table of full (or low) speed descriptors, using interface and 63 + * @fs_descriptors: Table of full (or low) speed descriptors, using interface and 64 64 * string identifiers assigned during @bind(). If this pointer is null, 65 65 * the function will not be available at full speed (or at low speed). 66 66 * @hs_descriptors: Table of high speed descriptors, using interface and ··· 290 290 * after function notifications 291 291 * @resume: Notifies configuration when the host restarts USB traffic, 292 292 * before function notifications 293 + * @gadget_driver: Gadget driver controlling this driver 293 294 * 294 295 * Devices default to reporting self powered operation. Devices which rely 295 296 * on bus powered operation should report this in their @bind method.
+1 -1
tools/usb/ffs-test.c
··· 38 38 #include <unistd.h> 39 39 #include <tools/le_byteshift.h> 40 40 41 - #include "../../include/linux/usb/functionfs.h" 41 + #include "../../include/uapi/linux/usb/functionfs.h" 42 42 43 43 44 44 /******************** Little Endian Handling ********************************/