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.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
"Here are a few USB fixes for things that have people have reported
issues with recently"

* tag 'usb-3.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: ohci-at91: fix irq and iomem resource retrieval
usb: phy: fix driver dependencies
phy: kconfig: add depends on "USB_PHY" to OMAP_USB2 and TWL4030_USB
drivers: phy: tweaks to phy_create()
drivers: phy: Fix memory leak
xhci: Limit the spurious wakeup fix only to HP machines
usb: chipidea: fix nobody cared IRQ when booting with host role
usb: chipidea: host: Only disable the vbus regulator if it is not NULL
usb: serial: zte_ev: move support for ZTE AC2726 from zte_ev back to option
usb: cdc-wdm: manage_power should always set needs_remote_wakeup
usb: phy-tegra-usb.c: wrong pointer check for remap UTMI
usb: phy: twl6030-usb: signedness bug in twl6030_readb()
usb: dwc3: power off usb phy in error path
usb: dwc3: invoke phy_resume after phy_init

+55 -46
+2 -2
drivers/phy/Kconfig
··· 24 24 config OMAP_USB2 25 25 tristate "OMAP USB2 PHY Driver" 26 26 depends on ARCH_OMAP2PLUS 27 + depends on USB_PHY 27 28 select GENERIC_PHY 28 - select USB_PHY 29 29 select OMAP_CONTROL_USB 30 30 help 31 31 Enable this to support the transceiver that is part of SOC. This ··· 36 36 config TWL4030_USB 37 37 tristate "TWL4030 USB Transceiver Driver" 38 38 depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS 39 + depends on USB_PHY 39 40 select GENERIC_PHY 40 - select USB_PHY 41 41 help 42 42 Enable this to support the USB OTG transceiver on TWL4030 43 43 family chips (including the TWL5030 and TPS659x0 devices).
+10 -16
drivers/phy/phy-core.c
··· 437 437 int id; 438 438 struct phy *phy; 439 439 440 - if (!dev) { 441 - dev_WARN(dev, "no device provided for PHY\n"); 442 - ret = -EINVAL; 443 - goto err0; 444 - } 440 + if (WARN_ON(!dev)) 441 + return ERR_PTR(-EINVAL); 445 442 446 443 phy = kzalloc(sizeof(*phy), GFP_KERNEL); 447 - if (!phy) { 448 - ret = -ENOMEM; 449 - goto err0; 450 - } 444 + if (!phy) 445 + return ERR_PTR(-ENOMEM); 451 446 452 447 id = ida_simple_get(&phy_ida, 0, 0, GFP_KERNEL); 453 448 if (id < 0) { 454 449 dev_err(dev, "unable to get id\n"); 455 450 ret = id; 456 - goto err0; 451 + goto free_phy; 457 452 } 458 453 459 454 device_initialize(&phy->dev); ··· 463 468 464 469 ret = dev_set_name(&phy->dev, "phy-%s.%d", dev_name(dev), id); 465 470 if (ret) 466 - goto err1; 471 + goto put_dev; 467 472 468 473 ret = device_add(&phy->dev); 469 474 if (ret) 470 - goto err1; 475 + goto put_dev; 471 476 472 477 if (pm_runtime_enabled(dev)) { 473 478 pm_runtime_enable(&phy->dev); ··· 476 481 477 482 return phy; 478 483 479 - err1: 480 - ida_remove(&phy_ida, phy->id); 484 + put_dev: 481 485 put_device(&phy->dev); 486 + ida_remove(&phy_ida, phy->id); 487 + free_phy: 482 488 kfree(phy); 483 - 484 - err0: 485 489 return ERR_PTR(ret); 486 490 } 487 491 EXPORT_SYMBOL_GPL(phy_create);
+4
drivers/usb/chipidea/core.c
··· 642 642 : CI_ROLE_GADGET; 643 643 } 644 644 645 + /* only update vbus status for peripheral */ 646 + if (ci->role == CI_ROLE_GADGET) 647 + ci_handle_vbus_change(ci); 648 + 645 649 ret = ci_role_start(ci, ci->role); 646 650 if (ret) { 647 651 dev_err(dev, "can't start %s role\n", ci_role(ci)->name);
+2 -1
drivers/usb/chipidea/host.c
··· 88 88 return ret; 89 89 90 90 disable_reg: 91 - regulator_disable(ci->platdata->reg_vbus); 91 + if (ci->platdata->reg_vbus) 92 + regulator_disable(ci->platdata->reg_vbus); 92 93 93 94 put_hcd: 94 95 usb_put_hcd(hcd);
-3
drivers/usb/chipidea/udc.c
··· 1795 1795 pm_runtime_no_callbacks(&ci->gadget.dev); 1796 1796 pm_runtime_enable(&ci->gadget.dev); 1797 1797 1798 - /* Update ci->vbus_active */ 1799 - ci_handle_vbus_change(ci); 1800 - 1801 1798 return retval; 1802 1799 1803 1800 destroy_eps:
+3 -5
drivers/usb/class/cdc-wdm.c
··· 854 854 { 855 855 /* need autopm_get/put here to ensure the usbcore sees the new value */ 856 856 int rv = usb_autopm_get_interface(intf); 857 - if (rv < 0) 858 - goto err; 859 857 860 858 intf->needs_remote_wakeup = on; 861 - usb_autopm_put_interface(intf); 862 - err: 863 - return rv; 859 + if (!rv) 860 + usb_autopm_put_interface(intf); 861 + return 0; 864 862 } 865 863 866 864 static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
+5 -3
drivers/usb/dwc3/core.c
··· 455 455 if (IS_ERR(regs)) 456 456 return PTR_ERR(regs); 457 457 458 - usb_phy_set_suspend(dwc->usb2_phy, 0); 459 - usb_phy_set_suspend(dwc->usb3_phy, 0); 460 - 461 458 spin_lock_init(&dwc->lock); 462 459 platform_set_drvdata(pdev, dwc); 463 460 ··· 484 487 dev_err(dev, "failed to initialize core\n"); 485 488 goto err0; 486 489 } 490 + 491 + usb_phy_set_suspend(dwc->usb2_phy, 0); 492 + usb_phy_set_suspend(dwc->usb3_phy, 0); 487 493 488 494 ret = dwc3_event_buffers_setup(dwc); 489 495 if (ret) { ··· 569 569 dwc3_event_buffers_cleanup(dwc); 570 570 571 571 err1: 572 + usb_phy_set_suspend(dwc->usb2_phy, 1); 573 + usb_phy_set_suspend(dwc->usb3_phy, 1); 572 574 dwc3_core_exit(dwc); 573 575 574 576 err0:
+14 -10
drivers/usb/host/ohci-at91.c
··· 136 136 struct ohci_hcd *ohci; 137 137 int retval; 138 138 struct usb_hcd *hcd = NULL; 139 + struct device *dev = &pdev->dev; 140 + struct resource *res; 141 + int irq; 139 142 140 - if (pdev->num_resources != 2) { 141 - pr_debug("hcd probe: invalid num_resources"); 142 - return -ENODEV; 143 + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 144 + if (!res) { 145 + dev_dbg(dev, "hcd probe: missing memory resource\n"); 146 + return -ENXIO; 143 147 } 144 148 145 - if ((pdev->resource[0].flags != IORESOURCE_MEM) 146 - || (pdev->resource[1].flags != IORESOURCE_IRQ)) { 147 - pr_debug("hcd probe: invalid resource type\n"); 148 - return -ENODEV; 149 + irq = platform_get_irq(pdev, 0); 150 + if (irq < 0) { 151 + dev_dbg(dev, "hcd probe: missing irq resource\n"); 152 + return irq; 149 153 } 150 154 151 155 hcd = usb_create_hcd(driver, &pdev->dev, "at91"); 152 156 if (!hcd) 153 157 return -ENOMEM; 154 - hcd->rsrc_start = pdev->resource[0].start; 155 - hcd->rsrc_len = resource_size(&pdev->resource[0]); 158 + hcd->rsrc_start = res->start; 159 + hcd->rsrc_len = resource_size(res); 156 160 157 161 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { 158 162 pr_debug("request_mem_region failed\n"); ··· 203 199 ohci->num_ports = board->ports; 204 200 at91_start_hc(pdev); 205 201 206 - retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_SHARED); 202 + retval = usb_add_hcd(hcd, irq, IRQF_SHARED); 207 203 if (retval == 0) 208 204 return retval; 209 205
+6 -1
drivers/usb/host/xhci-pci.c
··· 128 128 * any other sleep) on Haswell machines with LPT and LPT-LP 129 129 * with the new Intel BIOS 130 130 */ 131 - xhci->quirks |= XHCI_SPURIOUS_WAKEUP; 131 + /* Limit the quirk to only known vendors, as this triggers 132 + * yet another BIOS bug on some other machines 133 + * https://bugzilla.kernel.org/show_bug.cgi?id=66171 134 + */ 135 + if (pdev->subsystem_vendor == PCI_VENDOR_ID_HP) 136 + xhci->quirks |= XHCI_SPURIOUS_WAKEUP; 132 137 } 133 138 if (pdev->vendor == PCI_VENDOR_ID_ETRON && 134 139 pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
+3 -1
drivers/usb/phy/Kconfig
··· 19 19 in host mode, low speed. 20 20 21 21 config FSL_USB2_OTG 22 - bool "Freescale USB OTG Transceiver Driver" 22 + tristate "Freescale USB OTG Transceiver Driver" 23 23 depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME 24 + depends on USB 24 25 select USB_OTG 25 26 select USB_PHY 26 27 help ··· 30 29 config ISP1301_OMAP 31 30 tristate "Philips ISP1301 with OMAP OTG" 32 31 depends on I2C && ARCH_OMAP_OTG 32 + depends on USB 33 33 select USB_PHY 34 34 help 35 35 If you say yes here you get support for the Philips ISP1301
+1 -1
drivers/usb/phy/phy-tegra-usb.c
··· 876 876 877 877 tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start, 878 878 resource_size(res)); 879 - if (!tegra_phy->regs) { 879 + if (!tegra_phy->pad_regs) { 880 880 dev_err(&pdev->dev, "Failed to remap UTMI Pad regs\n"); 881 881 return -ENOMEM; 882 882 }
+2 -1
drivers/usb/phy/phy-twl6030-usb.c
··· 127 127 128 128 static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address) 129 129 { 130 - u8 data, ret = 0; 130 + u8 data; 131 + int ret; 131 132 132 133 ret = twl_i2c_read_u8(module, &data, address); 133 134 if (ret >= 0)
+2
drivers/usb/serial/option.c
··· 251 251 #define ZTE_PRODUCT_MF628 0x0015 252 252 #define ZTE_PRODUCT_MF626 0x0031 253 253 #define ZTE_PRODUCT_MC2718 0xffe8 254 + #define ZTE_PRODUCT_AC2726 0xfff1 254 255 255 256 #define BENQ_VENDOR_ID 0x04a5 256 257 #define BENQ_PRODUCT_H10 0x4068 ··· 1454 1453 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, 1455 1454 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, 1456 1455 { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) }, 1456 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, 1457 1457 1458 1458 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, 1459 1459 { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
+1 -2
drivers/usb/serial/zte_ev.c
··· 281 281 { USB_DEVICE(0x19d2, 0xfffd) }, 282 282 { USB_DEVICE(0x19d2, 0xfffc) }, 283 283 { USB_DEVICE(0x19d2, 0xfffb) }, 284 - /* AC2726, AC8710_V3 */ 285 - { USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfff1, 0xff, 0xff, 0xff) }, 284 + /* AC8710_V3 */ 286 285 { USB_DEVICE(0x19d2, 0xfff6) }, 287 286 { USB_DEVICE(0x19d2, 0xfff7) }, 288 287 { USB_DEVICE(0x19d2, 0xfff8) },