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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull USB fixes from Greg KH:
"Here are a number of USB fixes for 3.11-rc3.

Lots of little things, nothing major. A number of new device ids,
build fixes for DMA, and a bunch of other minor things. All of these
have been in the linux-next tree"

* tag 'usb-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (40 commits)
usb: Clear both buffers when clearing a control transfer TT buffer.
usb/gadget: free opts struct on error recovery
USB: mos7840: fix memory leak in open
usb: serial: option.c: remove ONDA MT825UP product ID fromdriver
usb: serial: option: add Olivetti Olicard 200
usb: serial: option: blacklist ONDA MT689DC QMI interface
xhci: fix null pointer dereference on ring_doorbell_for_active_rings
usb: host: xhci: Enable XHCI_SPURIOUS_SUCCESS for all controllers with xhci 1.0
usb: fix build warning in pci-quirks.h when CONFIG_PCI is not enabled
usb: xhci: Mark two functions __maybe_unused
xhci: Avoid NULL pointer deref when host dies.
usb: serial: option: Add ONYX 3G device support
USB: ti_usb_3410_5052: fix dynamic-id matching
usb: option: add TP-LINK MA260
USB: option: add D-Link DWM-152/C1 and DWM-156/C1
USB: EHCI: Fix resume signalling on remote wakeup
USB: cp210x: add MMB and PI ZigBee USB Device Support
usb: cp210x support SEL C662 Vendor/Device
USB: option: append Petatel NP10T device to GSM modems list
USB: misc: Add Manhattan Hi-Speed USB DVI Converter to sisusbvga
...

+172 -79
+40 -8
drivers/usb/core/hub.c
··· 668 668 static inline int 669 669 hub_clear_tt_buffer (struct usb_device *hdev, u16 devinfo, u16 tt) 670 670 { 671 + /* Need to clear both directions for control ep */ 672 + if (((devinfo >> 11) & USB_ENDPOINT_XFERTYPE_MASK) == 673 + USB_ENDPOINT_XFER_CONTROL) { 674 + int status = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), 675 + HUB_CLEAR_TT_BUFFER, USB_RT_PORT, 676 + devinfo ^ 0x8000, tt, NULL, 0, 1000); 677 + if (status) 678 + return status; 679 + } 671 680 return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), 672 681 HUB_CLEAR_TT_BUFFER, USB_RT_PORT, devinfo, 673 682 tt, NULL, 0, 1000); ··· 2857 2848 USB_CTRL_SET_TIMEOUT); 2858 2849 } 2859 2850 2851 + /* Count of wakeup-enabled devices at or below udev */ 2852 + static unsigned wakeup_enabled_descendants(struct usb_device *udev) 2853 + { 2854 + struct usb_hub *hub = usb_hub_to_struct_hub(udev); 2855 + 2856 + return udev->do_remote_wakeup + 2857 + (hub ? hub->wakeup_enabled_descendants : 0); 2858 + } 2859 + 2860 2860 /* 2861 2861 * usb_port_suspend - suspend a usb device's upstream port 2862 2862 * @udev: device that's no longer in active use, not a root hub ··· 2906 2888 * Linux (2.6) currently has NO mechanisms to initiate that: no khubd 2907 2889 * timer, no SRP, no requests through sysfs. 2908 2890 * 2909 - * If Runtime PM isn't enabled or used, non-SuperSpeed devices really get 2910 - * suspended only when their bus goes into global suspend (i.e., the root 2891 + * If Runtime PM isn't enabled or used, non-SuperSpeed devices may not get 2892 + * suspended until their bus goes into global suspend (i.e., the root 2911 2893 * hub is suspended). Nevertheless, we change @udev->state to 2912 2894 * USB_STATE_SUSPENDED as this is the device's "logical" state. The actual 2913 2895 * upstream port setting is stored in @udev->port_is_suspended. ··· 2978 2960 /* see 7.1.7.6 */ 2979 2961 if (hub_is_superspeed(hub->hdev)) 2980 2962 status = hub_set_port_link_state(hub, port1, USB_SS_PORT_LS_U3); 2981 - else if (PMSG_IS_AUTO(msg)) 2982 - status = set_port_feature(hub->hdev, port1, 2983 - USB_PORT_FEAT_SUSPEND); 2963 + 2984 2964 /* 2985 2965 * For system suspend, we do not need to enable the suspend feature 2986 2966 * on individual USB-2 ports. The devices will automatically go 2987 2967 * into suspend a few ms after the root hub stops sending packets. 2988 2968 * The USB 2.0 spec calls this "global suspend". 2969 + * 2970 + * However, many USB hubs have a bug: They don't relay wakeup requests 2971 + * from a downstream port if the port's suspend feature isn't on. 2972 + * Therefore we will turn on the suspend feature if udev or any of its 2973 + * descendants is enabled for remote wakeup. 2989 2974 */ 2975 + else if (PMSG_IS_AUTO(msg) || wakeup_enabled_descendants(udev) > 0) 2976 + status = set_port_feature(hub->hdev, port1, 2977 + USB_PORT_FEAT_SUSPEND); 2990 2978 else { 2991 2979 really_suspend = false; 2992 2980 status = 0; ··· 3027 3003 if (!PMSG_IS_AUTO(msg)) 3028 3004 status = 0; 3029 3005 } else { 3030 - /* device has up to 10 msec to fully suspend */ 3031 3006 dev_dbg(&udev->dev, "usb %ssuspend, wakeup %d\n", 3032 3007 (PMSG_IS_AUTO(msg) ? "auto-" : ""), 3033 3008 udev->do_remote_wakeup); 3034 - usb_set_device_state(udev, USB_STATE_SUSPENDED); 3035 3009 if (really_suspend) { 3036 3010 udev->port_is_suspended = 1; 3011 + 3012 + /* device has up to 10 msec to fully suspend */ 3037 3013 msleep(10); 3038 3014 } 3015 + usb_set_device_state(udev, USB_STATE_SUSPENDED); 3039 3016 } 3040 3017 3041 3018 /* ··· 3318 3293 unsigned port1; 3319 3294 int status; 3320 3295 3321 - /* Warn if children aren't already suspended */ 3296 + /* 3297 + * Warn if children aren't already suspended. 3298 + * Also, add up the number of wakeup-enabled descendants. 3299 + */ 3300 + hub->wakeup_enabled_descendants = 0; 3322 3301 for (port1 = 1; port1 <= hdev->maxchild; port1++) { 3323 3302 struct usb_device *udev; 3324 3303 ··· 3332 3303 if (PMSG_IS_AUTO(msg)) 3333 3304 return -EBUSY; 3334 3305 } 3306 + if (udev) 3307 + hub->wakeup_enabled_descendants += 3308 + wakeup_enabled_descendants(udev); 3335 3309 } 3336 3310 3337 3311 if (hdev->do_remote_wakeup && hub->quirk_check_port_auto_suspend) {
+3
drivers/usb/core/hub.h
··· 59 59 struct usb_tt tt; /* Transaction Translator */ 60 60 61 61 unsigned mA_per_port; /* current for each child */ 62 + #ifdef CONFIG_PM 63 + unsigned wakeup_enabled_descendants; 64 + #endif 62 65 63 66 unsigned limited_power:1; 64 67 unsigned quiescing:1;
+1 -1
drivers/usb/dwc3/Kconfig
··· 1 1 config USB_DWC3 2 2 tristate "DesignWare USB3 DRD Core Support" 3 - depends on (USB || USB_GADGET) && GENERIC_HARDIRQS 3 + depends on (USB || USB_GADGET) && GENERIC_HARDIRQS && HAS_DMA 4 4 select USB_XHCI_PLATFORM if USB_SUPPORT && USB_XHCI_HCD 5 5 help 6 6 Say Y or M here if your system has a Dual Role SuperSpeed
+1 -1
drivers/usb/dwc3/core.c
··· 450 450 } 451 451 452 452 if (IS_ERR(dwc->usb3_phy)) { 453 - ret = PTR_ERR(dwc->usb2_phy); 453 + ret = PTR_ERR(dwc->usb3_phy); 454 454 455 455 /* 456 456 * if -ENXIO is returned, it means PHY layer wasn't
+2 -2
drivers/usb/dwc3/core.h
··· 759 759 760 760 struct dwc3_event_type { 761 761 u32 is_devspec:1; 762 - u32 type:6; 763 - u32 reserved8_31:25; 762 + u32 type:7; 763 + u32 reserved8_31:24; 764 764 } __packed; 765 765 766 766 #define DWC3_DEPEVT_XFERCOMPLETE 0x01
+1
drivers/usb/dwc3/gadget.c
··· 1584 1584 __dwc3_gadget_ep_disable(dwc->eps[0]); 1585 1585 1586 1586 err0: 1587 + dwc->gadget_driver = NULL; 1587 1588 spin_unlock_irqrestore(&dwc->lock, flags); 1588 1589 1589 1590 return ret;
+4 -1
drivers/usb/gadget/Kconfig
··· 193 193 Faraday usb device controller FUSB300 driver 194 194 195 195 config USB_FOTG210_UDC 196 + depends on HAS_DMA 196 197 tristate "Faraday FOTG210 USB Peripheral Controller" 197 198 help 198 199 Faraday USB2.0 OTG controller which can be configured as ··· 329 328 330 329 config USB_MV_UDC 331 330 tristate "Marvell USB2.0 Device Controller" 332 - depends on GENERIC_HARDIRQS 331 + depends on GENERIC_HARDIRQS && HAS_DMA 333 332 help 334 333 Marvell Socs (including PXA and MMP series) include a high speed 335 334 USB2.0 OTG controller, which can be configured as high speed or 336 335 full speed USB peripheral. 337 336 338 337 config USB_MV_U3D 338 + depends on HAS_DMA 339 339 tristate "MARVELL PXA2128 USB 3.0 controller" 340 340 help 341 341 MARVELL PXA2128 Processor series include a super speed USB3.0 device ··· 641 639 depends on USB_CONFIGFS 642 640 depends on NET 643 641 select USB_U_ETHER 642 + select USB_U_RNDIS 644 643 select USB_F_RNDIS 645 644 help 646 645 Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
+9 -7
drivers/usb/gadget/at91_udc.c
··· 870 870 if (udc->clocked) 871 871 return; 872 872 udc->clocked = 1; 873 - clk_enable(udc->iclk); 874 - clk_enable(udc->fclk); 873 + clk_prepare_enable(udc->iclk); 874 + clk_prepare_enable(udc->fclk); 875 875 } 876 876 877 877 static void clk_off(struct at91_udc *udc) ··· 880 880 return; 881 881 udc->clocked = 0; 882 882 udc->gadget.speed = USB_SPEED_UNKNOWN; 883 - clk_disable(udc->fclk); 884 - clk_disable(udc->iclk); 883 + clk_disable_unprepare(udc->fclk); 884 + clk_disable_unprepare(udc->iclk); 885 885 } 886 886 887 887 /* ··· 1725 1725 /* init software state */ 1726 1726 udc = &controller; 1727 1727 udc->gadget.dev.parent = dev; 1728 - if (pdev->dev.of_node) 1728 + if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) 1729 1729 at91udc_of_init(udc, pdev->dev.of_node); 1730 1730 else 1731 1731 memcpy(&udc->board, dev->platform_data, ··· 1782 1782 } 1783 1783 1784 1784 /* don't do anything until we have both gadget driver and VBUS */ 1785 - clk_enable(udc->iclk); 1785 + retval = clk_prepare_enable(udc->iclk); 1786 + if (retval) 1787 + goto fail1; 1786 1788 at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS); 1787 1789 at91_udp_write(udc, AT91_UDP_IDR, 0xffffffff); 1788 1790 /* Clear all pending interrupts - UDP may be used by bootloader. */ 1789 1791 at91_udp_write(udc, AT91_UDP_ICR, 0xffffffff); 1790 - clk_disable(udc->iclk); 1792 + clk_disable_unprepare(udc->iclk); 1791 1793 1792 1794 /* request UDC and maybe VBUS irqs */ 1793 1795 udc->udp_irq = platform_get_irq(pdev, 0);
+5 -2
drivers/usb/gadget/f_ecm.c
··· 959 959 mutex_init(&opts->lock); 960 960 opts->func_inst.free_func_inst = ecm_free_inst; 961 961 opts->net = gether_setup_default(); 962 - if (IS_ERR(opts->net)) 963 - return ERR_PTR(PTR_ERR(opts->net)); 962 + if (IS_ERR(opts->net)) { 963 + struct net_device *net = opts->net; 964 + kfree(opts); 965 + return ERR_CAST(net); 966 + } 964 967 965 968 config_group_init_type_name(&opts->func_inst.group, "", &ecm_func_type); 966 969
+5 -2
drivers/usb/gadget/f_eem.c
··· 593 593 mutex_init(&opts->lock); 594 594 opts->func_inst.free_func_inst = eem_free_inst; 595 595 opts->net = gether_setup_default(); 596 - if (IS_ERR(opts->net)) 597 - return ERR_CAST(opts->net); 596 + if (IS_ERR(opts->net)) { 597 + struct net_device *net = opts->net; 598 + kfree(opts); 599 + return ERR_CAST(net); 600 + } 598 601 599 602 config_group_init_type_name(&opts->func_inst.group, "", &eem_func_type); 600 603
+5 -2
drivers/usb/gadget/f_ncm.c
··· 1350 1350 mutex_init(&opts->lock); 1351 1351 opts->func_inst.free_func_inst = ncm_free_inst; 1352 1352 opts->net = gether_setup_default(); 1353 - if (IS_ERR(opts->net)) 1354 - return ERR_PTR(PTR_ERR(opts->net)); 1353 + if (IS_ERR(opts->net)) { 1354 + struct net_device *net = opts->net; 1355 + kfree(opts); 1356 + return ERR_CAST(net); 1357 + } 1355 1358 1356 1359 config_group_init_type_name(&opts->func_inst.group, "", &ncm_func_type); 1357 1360
+5 -2
drivers/usb/gadget/f_phonet.c
··· 656 656 657 657 opts->func_inst.free_func_inst = phonet_free_inst; 658 658 opts->net = gphonet_setup_default(); 659 - if (IS_ERR(opts->net)) 660 - return ERR_PTR(PTR_ERR(opts->net)); 659 + if (IS_ERR(opts->net)) { 660 + struct net_device *net = opts->net; 661 + kfree(opts); 662 + return ERR_CAST(net); 663 + } 661 664 662 665 config_group_init_type_name(&opts->func_inst.group, "", 663 666 &phonet_func_type);
+5 -2
drivers/usb/gadget/f_rndis.c
··· 963 963 mutex_init(&opts->lock); 964 964 opts->func_inst.free_func_inst = rndis_free_inst; 965 965 opts->net = gether_setup_default(); 966 - if (IS_ERR(opts->net)) 967 - return ERR_CAST(opts->net); 966 + if (IS_ERR(opts->net)) { 967 + struct net_device *net = opts->net; 968 + kfree(opts); 969 + return ERR_CAST(net); 970 + } 968 971 969 972 config_group_init_type_name(&opts->func_inst.group, "", 970 973 &rndis_func_type);
+5 -2
drivers/usb/gadget/f_subset.c
··· 505 505 mutex_init(&opts->lock); 506 506 opts->func_inst.free_func_inst = geth_free_inst; 507 507 opts->net = gether_setup_default(); 508 - if (IS_ERR(opts->net)) 509 - return ERR_CAST(opts->net); 508 + if (IS_ERR(opts->net)) { 509 + struct net_device *net = opts->net; 510 + kfree(opts); 511 + return ERR_CAST(net); 512 + } 510 513 511 514 config_group_init_type_name(&opts->func_inst.group, "", 512 515 &gether_func_type);
+2 -2
drivers/usb/gadget/fotg210-udc.c
··· 1074 1074 .udc_stop = fotg210_udc_stop, 1075 1075 }; 1076 1076 1077 - static int __exit fotg210_udc_remove(struct platform_device *pdev) 1077 + static int fotg210_udc_remove(struct platform_device *pdev) 1078 1078 { 1079 1079 struct fotg210_udc *fotg210 = dev_get_drvdata(&pdev->dev); 1080 1080 ··· 1088 1088 return 0; 1089 1089 } 1090 1090 1091 - static int __init fotg210_udc_probe(struct platform_device *pdev) 1091 + static int fotg210_udc_probe(struct platform_device *pdev) 1092 1092 { 1093 1093 struct resource *res, *ires; 1094 1094 struct fotg210_udc *fotg210 = NULL;
+2 -2
drivers/usb/gadget/mv_u3d_core.c
··· 1776 1776 kfree(u3d->eps); 1777 1777 1778 1778 if (u3d->irq) 1779 - free_irq(u3d->irq, &dev->dev); 1779 + free_irq(u3d->irq, u3d); 1780 1780 1781 1781 if (u3d->cap_regs) 1782 1782 iounmap(u3d->cap_regs); ··· 1974 1974 return 0; 1975 1975 1976 1976 err_unregister: 1977 - free_irq(u3d->irq, &dev->dev); 1977 + free_irq(u3d->irq, u3d); 1978 1978 err_request_irq: 1979 1979 err_get_irq: 1980 1980 kfree(u3d->status_req);
+6
drivers/usb/gadget/udc-core.c
··· 50 50 51 51 /* ------------------------------------------------------------------------- */ 52 52 53 + #ifdef CONFIG_HAS_DMA 54 + 53 55 int usb_gadget_map_request(struct usb_gadget *gadget, 54 56 struct usb_request *req, int is_in) 55 57 { ··· 100 98 } 101 99 } 102 100 EXPORT_SYMBOL_GPL(usb_gadget_unmap_request); 101 + 102 + #endif /* CONFIG_HAS_DMA */ 103 103 104 104 /* ------------------------------------------------------------------------- */ 105 105 ··· 198 194 dev_set_name(&gadget->dev, "gadget"); 199 195 gadget->dev.parent = parent; 200 196 197 + #ifdef CONFIG_HAS_DMA 201 198 dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask); 202 199 gadget->dev.dma_parms = parent->dma_parms; 203 200 gadget->dev.dma_mask = parent->dma_mask; 201 + #endif 204 202 205 203 if (release) 206 204 gadget->dev.release = release;
+1
drivers/usb/host/ehci-hub.c
··· 874 874 ehci->reset_done[wIndex] = jiffies 875 875 + msecs_to_jiffies(20); 876 876 usb_hcd_start_port_resume(&hcd->self, wIndex); 877 + set_bit(wIndex, &ehci->resuming_ports); 877 878 /* check the port again */ 878 879 mod_timer(&ehci_to_hcd(ehci)->rh_timer, 879 880 ehci->reset_done[wIndex]);
+1
drivers/usb/host/pci-quirks.h
··· 13 13 void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); 14 14 void sb800_prefetch(struct device *dev, int on); 15 15 #else 16 + struct pci_dev; 16 17 static inline void usb_amd_quirk_pll_disable(void) {} 17 18 static inline void usb_amd_quirk_pll_enable(void) {} 18 19 static inline void usb_amd_dev_put(void) {}
-1
drivers/usb/host/xhci-pci.c
··· 93 93 } 94 94 if (pdev->vendor == PCI_VENDOR_ID_INTEL && 95 95 pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) { 96 - xhci->quirks |= XHCI_SPURIOUS_SUCCESS; 97 96 xhci->quirks |= XHCI_EP_LIMIT_QUIRK; 98 97 xhci->limit_active_eps = 64; 99 98 xhci->quirks |= XHCI_SW_BW_CHECKING;
+1 -1
drivers/usb/host/xhci-ring.c
··· 434 434 435 435 /* A ring has pending URBs if its TD list is not empty */ 436 436 if (!(ep->ep_state & EP_HAS_STREAMS)) { 437 - if (!(list_empty(&ep->ring->td_list))) 437 + if (ep->ring && !(list_empty(&ep->ring->td_list))) 438 438 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0); 439 439 return; 440 440 }
+12 -5
drivers/usb/host/xhci.c
··· 329 329 return; 330 330 } 331 331 332 - static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) 332 + static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci) 333 333 { 334 334 int i; 335 335 ··· 1181 1181 } 1182 1182 1183 1183 xhci = hcd_to_xhci(hcd); 1184 - if (xhci->xhc_state & XHCI_STATE_HALTED) 1185 - return -ENODEV; 1186 - 1187 1184 if (check_virt_dev) { 1188 1185 if (!udev->slot_id || !xhci->devs[udev->slot_id]) { 1189 1186 printk(KERN_DEBUG "xHCI %s called with unaddressed " ··· 1195 1198 return -EINVAL; 1196 1199 } 1197 1200 } 1201 + 1202 + if (xhci->xhc_state & XHCI_STATE_HALTED) 1203 + return -ENODEV; 1198 1204 1199 1205 return 1; 1200 1206 } ··· 3898 3898 * Issue an Evaluate Context command to change the Maximum Exit Latency in the 3899 3899 * slot context. If that succeeds, store the new MEL in the xhci_virt_device. 3900 3900 */ 3901 - static int xhci_change_max_exit_latency(struct xhci_hcd *xhci, 3901 + static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci, 3902 3902 struct usb_device *udev, u16 max_exit_latency) 3903 3903 { 3904 3904 struct xhci_virt_device *virt_dev; ··· 4891 4891 xhci_print_registers(xhci); 4892 4892 4893 4893 get_quirks(dev, xhci); 4894 + 4895 + /* In xhci controllers which follow xhci 1.0 spec gives a spurious 4896 + * success event after a short transfer. This quirk will ignore such 4897 + * spurious event. 4898 + */ 4899 + if (xhci->hci_version > 0x96) 4900 + xhci->quirks |= XHCI_SPURIOUS_SUCCESS; 4894 4901 4895 4902 /* Make sure the HC is halted. */ 4896 4903 retval = xhci_halt(xhci);
+1
drivers/usb/misc/sisusbvga/sisusb.c
··· 3247 3247 { USB_DEVICE(0x0711, 0x0903) }, 3248 3248 { USB_DEVICE(0x0711, 0x0918) }, 3249 3249 { USB_DEVICE(0x0711, 0x0920) }, 3250 + { USB_DEVICE(0x0711, 0x0950) }, 3250 3251 { USB_DEVICE(0x182d, 0x021c) }, 3251 3252 { USB_DEVICE(0x182d, 0x0269) }, 3252 3253 { }
+1 -1
drivers/usb/phy/phy-omap-usb3.c
··· 71 71 {1250, 5, 4, 20, 0}, /* 12 MHz */ 72 72 {3125, 20, 4, 20, 0}, /* 16.8 MHz */ 73 73 {1172, 8, 4, 20, 65537}, /* 19.2 MHz */ 74 + {1000, 7, 4, 10, 0}, /* 20 MHz */ 74 75 {1250, 12, 4, 20, 0}, /* 26 MHz */ 75 76 {3125, 47, 4, 20, 92843}, /* 38.4 MHz */ 76 - {1000, 7, 4, 10, 0}, /* 20 MHz */ 77 77 78 78 }; 79 79
+1 -1
drivers/usb/phy/phy-samsung-usb2.c
··· 388 388 clk = devm_clk_get(dev, "otg"); 389 389 390 390 if (IS_ERR(clk)) { 391 - dev_err(dev, "Failed to get otg clock\n"); 391 + dev_err(dev, "Failed to get usbhost/otg clock\n"); 392 392 return PTR_ERR(clk); 393 393 } 394 394
-4
drivers/usb/renesas_usbhs/mod_gadget.c
··· 855 855 struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget); 856 856 struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv); 857 857 858 - if (!driver || 859 - !driver->unbind) 860 - return -EINVAL; 861 - 862 858 usbhsg_try_stop(priv, USBHSG_STATUS_REGISTERD); 863 859 gpriv->driver = NULL; 864 860
+4
drivers/usb/serial/cp210x.c
··· 53 53 { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ 54 54 { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ 55 55 { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */ 56 + { USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */ 56 57 { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ 57 58 { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ 58 59 { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ ··· 119 118 { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */ 120 119 { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */ 121 120 { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */ 121 + { USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */ 122 + { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */ 122 123 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ 123 124 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ 124 125 { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ ··· 151 148 { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ 152 149 { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ 153 150 { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ 151 + { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ 154 152 { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ 155 153 { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ 156 154 { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
+17 -8
drivers/usb/serial/mos7840.c
··· 905 905 status = mos7840_get_reg_sync(port, mos7840_port->SpRegOffset, &Data); 906 906 if (status < 0) { 907 907 dev_dbg(&port->dev, "Reading Spreg failed\n"); 908 - return -1; 908 + goto err; 909 909 } 910 910 Data |= 0x80; 911 911 status = mos7840_set_reg_sync(port, mos7840_port->SpRegOffset, Data); 912 912 if (status < 0) { 913 913 dev_dbg(&port->dev, "writing Spreg failed\n"); 914 - return -1; 914 + goto err; 915 915 } 916 916 917 917 Data &= ~0x80; 918 918 status = mos7840_set_reg_sync(port, mos7840_port->SpRegOffset, Data); 919 919 if (status < 0) { 920 920 dev_dbg(&port->dev, "writing Spreg failed\n"); 921 - return -1; 921 + goto err; 922 922 } 923 923 /* End of block to be checked */ 924 924 ··· 927 927 &Data); 928 928 if (status < 0) { 929 929 dev_dbg(&port->dev, "Reading Controlreg failed\n"); 930 - return -1; 930 + goto err; 931 931 } 932 932 Data |= 0x08; /* Driver done bit */ 933 933 Data |= 0x20; /* rx_disable */ ··· 935 935 mos7840_port->ControlRegOffset, Data); 936 936 if (status < 0) { 937 937 dev_dbg(&port->dev, "writing Controlreg failed\n"); 938 - return -1; 938 + goto err; 939 939 } 940 940 /* do register settings here */ 941 941 /* Set all regs to the device default values. */ ··· 946 946 status = mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data); 947 947 if (status < 0) { 948 948 dev_dbg(&port->dev, "disabling interrupts failed\n"); 949 - return -1; 949 + goto err; 950 950 } 951 951 /* Set FIFO_CONTROL_REGISTER to the default value */ 952 952 Data = 0x00; 953 953 status = mos7840_set_uart_reg(port, FIFO_CONTROL_REGISTER, Data); 954 954 if (status < 0) { 955 955 dev_dbg(&port->dev, "Writing FIFO_CONTROL_REGISTER failed\n"); 956 - return -1; 956 + goto err; 957 957 } 958 958 959 959 Data = 0xcf; 960 960 status = mos7840_set_uart_reg(port, FIFO_CONTROL_REGISTER, Data); 961 961 if (status < 0) { 962 962 dev_dbg(&port->dev, "Writing FIFO_CONTROL_REGISTER failed\n"); 963 - return -1; 963 + goto err; 964 964 } 965 965 966 966 Data = 0x03; ··· 1103 1103 /* mos7840_change_port_settings(mos7840_port,old_termios); */ 1104 1104 1105 1105 return 0; 1106 + err: 1107 + for (j = 0; j < NUM_URBS; ++j) { 1108 + urb = mos7840_port->write_urb_pool[j]; 1109 + if (!urb) 1110 + continue; 1111 + kfree(urb->transfer_buffer); 1112 + usb_free_urb(urb); 1113 + } 1114 + return status; 1106 1115 } 1107 1116 1108 1117 /*****************************************************************************
+13 -10
drivers/usb/serial/option.c
··· 341 341 #define OLIVETTI_VENDOR_ID 0x0b3c 342 342 #define OLIVETTI_PRODUCT_OLICARD100 0xc000 343 343 #define OLIVETTI_PRODUCT_OLICARD145 0xc003 344 + #define OLIVETTI_PRODUCT_OLICARD200 0xc005 344 345 345 346 /* Celot products */ 346 347 #define CELOT_VENDOR_ID 0x211f 347 348 #define CELOT_PRODUCT_CT680M 0x6801 348 - 349 - /* ONDA Communication vendor id */ 350 - #define ONDA_VENDOR_ID 0x1ee8 351 - 352 - /* ONDA MT825UP HSDPA 14.2 modem */ 353 - #define ONDA_MT825UP 0x000b 354 349 355 350 /* Samsung products */ 356 351 #define SAMSUNG_VENDOR_ID 0x04e8 ··· 439 444 440 445 /* Hyundai Petatel Inc. products */ 441 446 #define PETATEL_VENDOR_ID 0x1ff4 442 - #define PETATEL_PRODUCT_NP10T 0x600e 447 + #define PETATEL_PRODUCT_NP10T_600A 0x600a 448 + #define PETATEL_PRODUCT_NP10T_600E 0x600e 443 449 444 450 /* TP-LINK Incorporated products */ 445 451 #define TPLINK_VENDOR_ID 0x2357 ··· 778 782 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC650) }, 779 783 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, 780 784 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 785 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ 781 786 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ 782 787 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ 783 788 { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) }, ··· 814 817 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), 815 818 .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, 816 819 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) }, 817 - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff) }, 820 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff), 821 + .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, 818 822 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) }, 819 823 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff), 820 824 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, ··· 1254 1256 1255 1257 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, 1256 1258 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, 1259 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) }, 1257 1260 { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ 1258 - { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ 1259 1261 { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ 1260 1262 { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, 1261 1263 { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) }, ··· 1327 1329 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) }, 1328 1330 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, 1329 1331 { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, 1330 - { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) }, 1332 + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) }, 1333 + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) }, 1331 1334 { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180), 1335 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1336 + { USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */ 1332 1337 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1333 1338 { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) }, 1334 1339 { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */ ··· 1340 1339 { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, 1341 1340 { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, 1342 1341 { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, 1342 + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ 1343 + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ 1343 1344 { } /* Terminating entry */ 1344 1345 }; 1345 1346 MODULE_DEVICE_TABLE(usb, option_ids);
+1 -1
drivers/usb/serial/ti_usb_3410_5052.c
··· 371 371 usb_set_serial_data(serial, tdev); 372 372 373 373 /* determine device type */ 374 - if (usb_match_id(serial->interface, ti_id_table_3410)) 374 + if (serial->type == &ti_1port_device) 375 375 tdev->td_is_3410 = 1; 376 376 dev_dbg(&dev->dev, "%s - device type is %s\n", __func__, 377 377 tdev->td_is_3410 ? "3410" : "5052");
+7
drivers/usb/storage/unusual_devs.h
··· 665 665 USB_SC_DEVICE, USB_PR_DEVICE, NULL, 666 666 US_FL_FIX_INQUIRY ), 667 667 668 + /* Submitted by Ren Bigcren <bigcren.ren@sonymobile.com> */ 669 + UNUSUAL_DEV( 0x054c, 0x02a5, 0x0100, 0x0100, 670 + "Sony Corp.", 671 + "MicroVault Flash Drive", 672 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 673 + US_FL_NO_READ_CAPACITY_16 ), 674 + 668 675 /* floppy reports multiple luns */ 669 676 UNUSUAL_DEV( 0x055d, 0x2020, 0x0000, 0x0210, 670 677 "SAMSUNG",
-11
include/linux/usb.h
··· 367 367 368 368 /* ----------------------------------------------------------------------- */ 369 369 370 - /* This is arbitrary. 371 - * From USB 2.0 spec Table 11-13, offset 7, a hub can 372 - * have up to 255 ports. The most yet reported is 10. 373 - * 374 - * Current Wireless USB host hardware (Intel i1480 for example) allows 375 - * up to 22 devices to connect. Upcoming hardware might raise that 376 - * limit. Because the arrays need to add a bit for hub status data, we 377 - * do 31, so plus one evens out to four bytes. 378 - */ 379 - #define USB_MAXCHILDREN (31) 380 - 381 370 struct usb_tt; 382 371 383 372 enum usb_device_removable {
+11
include/uapi/linux/usb/ch11.h
··· 11 11 12 12 #include <linux/types.h> /* __u8 etc */ 13 13 14 + /* This is arbitrary. 15 + * From USB 2.0 spec Table 11-13, offset 7, a hub can 16 + * have up to 255 ports. The most yet reported is 10. 17 + * 18 + * Current Wireless USB host hardware (Intel i1480 for example) allows 19 + * up to 22 devices to connect. Upcoming hardware might raise that 20 + * limit. Because the arrays need to add a bit for hub status data, we 21 + * use 31, so plus one evens out to four bytes. 22 + */ 23 + #define USB_MAXCHILDREN 31 24 + 14 25 /* 15 26 * Hub request types 16 27 */