USB: fixes for 3.13-rc5
Here are a few USB fixes for things that have people have reported issues with recently. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEABECAAYFAlKx3L0ACgkQMUfUDdst+ymhNwCfQkxBaaJzNAp9gIlt/KKoNxGY zd8An1Eve0qmA2BjsO/SRzOBwUg/H6Rg =RFoo -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
a36c160cbb
14 changed files with 55 additions and 46 deletions
|
@ -24,8 +24,8 @@ config PHY_EXYNOS_MIPI_VIDEO
|
||||||
config OMAP_USB2
|
config OMAP_USB2
|
||||||
tristate "OMAP USB2 PHY Driver"
|
tristate "OMAP USB2 PHY Driver"
|
||||||
depends on ARCH_OMAP2PLUS
|
depends on ARCH_OMAP2PLUS
|
||||||
|
depends on USB_PHY
|
||||||
select GENERIC_PHY
|
select GENERIC_PHY
|
||||||
select USB_PHY
|
|
||||||
select OMAP_CONTROL_USB
|
select OMAP_CONTROL_USB
|
||||||
help
|
help
|
||||||
Enable this to support the transceiver that is part of SOC. This
|
Enable this to support the transceiver that is part of SOC. This
|
||||||
|
@ -36,8 +36,8 @@ config OMAP_USB2
|
||||||
config TWL4030_USB
|
config TWL4030_USB
|
||||||
tristate "TWL4030 USB Transceiver Driver"
|
tristate "TWL4030 USB Transceiver Driver"
|
||||||
depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
|
depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
|
||||||
|
depends on USB_PHY
|
||||||
select GENERIC_PHY
|
select GENERIC_PHY
|
||||||
select USB_PHY
|
|
||||||
help
|
help
|
||||||
Enable this to support the USB OTG transceiver on TWL4030
|
Enable this to support the USB OTG transceiver on TWL4030
|
||||||
family chips (including the TWL5030 and TPS659x0 devices).
|
family chips (including the TWL5030 and TPS659x0 devices).
|
||||||
|
|
|
@ -437,23 +437,18 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
|
||||||
int id;
|
int id;
|
||||||
struct phy *phy;
|
struct phy *phy;
|
||||||
|
|
||||||
if (!dev) {
|
if (WARN_ON(!dev))
|
||||||
dev_WARN(dev, "no device provided for PHY\n");
|
return ERR_PTR(-EINVAL);
|
||||||
ret = -EINVAL;
|
|
||||||
goto err0;
|
|
||||||
}
|
|
||||||
|
|
||||||
phy = kzalloc(sizeof(*phy), GFP_KERNEL);
|
phy = kzalloc(sizeof(*phy), GFP_KERNEL);
|
||||||
if (!phy) {
|
if (!phy)
|
||||||
ret = -ENOMEM;
|
return ERR_PTR(-ENOMEM);
|
||||||
goto err0;
|
|
||||||
}
|
|
||||||
|
|
||||||
id = ida_simple_get(&phy_ida, 0, 0, GFP_KERNEL);
|
id = ida_simple_get(&phy_ida, 0, 0, GFP_KERNEL);
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
dev_err(dev, "unable to get id\n");
|
dev_err(dev, "unable to get id\n");
|
||||||
ret = id;
|
ret = id;
|
||||||
goto err0;
|
goto free_phy;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_initialize(&phy->dev);
|
device_initialize(&phy->dev);
|
||||||
|
@ -468,11 +463,11 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
|
||||||
|
|
||||||
ret = dev_set_name(&phy->dev, "phy-%s.%d", dev_name(dev), id);
|
ret = dev_set_name(&phy->dev, "phy-%s.%d", dev_name(dev), id);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err1;
|
goto put_dev;
|
||||||
|
|
||||||
ret = device_add(&phy->dev);
|
ret = device_add(&phy->dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err1;
|
goto put_dev;
|
||||||
|
|
||||||
if (pm_runtime_enabled(dev)) {
|
if (pm_runtime_enabled(dev)) {
|
||||||
pm_runtime_enable(&phy->dev);
|
pm_runtime_enable(&phy->dev);
|
||||||
|
@ -481,12 +476,11 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
|
||||||
|
|
||||||
return phy;
|
return phy;
|
||||||
|
|
||||||
err1:
|
put_dev:
|
||||||
ida_remove(&phy_ida, phy->id);
|
|
||||||
put_device(&phy->dev);
|
put_device(&phy->dev);
|
||||||
|
ida_remove(&phy_ida, phy->id);
|
||||||
|
free_phy:
|
||||||
kfree(phy);
|
kfree(phy);
|
||||||
|
|
||||||
err0:
|
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(phy_create);
|
EXPORT_SYMBOL_GPL(phy_create);
|
||||||
|
|
|
@ -642,6 +642,10 @@ static int ci_hdrc_probe(struct platform_device *pdev)
|
||||||
: CI_ROLE_GADGET;
|
: CI_ROLE_GADGET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* only update vbus status for peripheral */
|
||||||
|
if (ci->role == CI_ROLE_GADGET)
|
||||||
|
ci_handle_vbus_change(ci);
|
||||||
|
|
||||||
ret = ci_role_start(ci, ci->role);
|
ret = ci_role_start(ci, ci->role);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "can't start %s role\n", ci_role(ci)->name);
|
dev_err(dev, "can't start %s role\n", ci_role(ci)->name);
|
||||||
|
|
|
@ -88,7 +88,8 @@ static int host_start(struct ci_hdrc *ci)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
disable_reg:
|
disable_reg:
|
||||||
regulator_disable(ci->platdata->reg_vbus);
|
if (ci->platdata->reg_vbus)
|
||||||
|
regulator_disable(ci->platdata->reg_vbus);
|
||||||
|
|
||||||
put_hcd:
|
put_hcd:
|
||||||
usb_put_hcd(hcd);
|
usb_put_hcd(hcd);
|
||||||
|
|
|
@ -1795,9 +1795,6 @@ static int udc_start(struct ci_hdrc *ci)
|
||||||
pm_runtime_no_callbacks(&ci->gadget.dev);
|
pm_runtime_no_callbacks(&ci->gadget.dev);
|
||||||
pm_runtime_enable(&ci->gadget.dev);
|
pm_runtime_enable(&ci->gadget.dev);
|
||||||
|
|
||||||
/* Update ci->vbus_active */
|
|
||||||
ci_handle_vbus_change(ci);
|
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
destroy_eps:
|
destroy_eps:
|
||||||
|
|
|
@ -854,13 +854,11 @@ static int wdm_manage_power(struct usb_interface *intf, int on)
|
||||||
{
|
{
|
||||||
/* need autopm_get/put here to ensure the usbcore sees the new value */
|
/* need autopm_get/put here to ensure the usbcore sees the new value */
|
||||||
int rv = usb_autopm_get_interface(intf);
|
int rv = usb_autopm_get_interface(intf);
|
||||||
if (rv < 0)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
intf->needs_remote_wakeup = on;
|
intf->needs_remote_wakeup = on;
|
||||||
usb_autopm_put_interface(intf);
|
if (!rv)
|
||||||
err:
|
usb_autopm_put_interface(intf);
|
||||||
return rv;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||||
|
|
|
@ -455,9 +455,6 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||||
if (IS_ERR(regs))
|
if (IS_ERR(regs))
|
||||||
return PTR_ERR(regs);
|
return PTR_ERR(regs);
|
||||||
|
|
||||||
usb_phy_set_suspend(dwc->usb2_phy, 0);
|
|
||||||
usb_phy_set_suspend(dwc->usb3_phy, 0);
|
|
||||||
|
|
||||||
spin_lock_init(&dwc->lock);
|
spin_lock_init(&dwc->lock);
|
||||||
platform_set_drvdata(pdev, dwc);
|
platform_set_drvdata(pdev, dwc);
|
||||||
|
|
||||||
|
@ -488,6 +485,9 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usb_phy_set_suspend(dwc->usb2_phy, 0);
|
||||||
|
usb_phy_set_suspend(dwc->usb3_phy, 0);
|
||||||
|
|
||||||
ret = dwc3_event_buffers_setup(dwc);
|
ret = dwc3_event_buffers_setup(dwc);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dwc->dev, "failed to setup event buffers\n");
|
dev_err(dwc->dev, "failed to setup event buffers\n");
|
||||||
|
@ -569,6 +569,8 @@ err2:
|
||||||
dwc3_event_buffers_cleanup(dwc);
|
dwc3_event_buffers_cleanup(dwc);
|
||||||
|
|
||||||
err1:
|
err1:
|
||||||
|
usb_phy_set_suspend(dwc->usb2_phy, 1);
|
||||||
|
usb_phy_set_suspend(dwc->usb3_phy, 1);
|
||||||
dwc3_core_exit(dwc);
|
dwc3_core_exit(dwc);
|
||||||
|
|
||||||
err0:
|
err0:
|
||||||
|
|
|
@ -136,23 +136,27 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
|
||||||
struct ohci_hcd *ohci;
|
struct ohci_hcd *ohci;
|
||||||
int retval;
|
int retval;
|
||||||
struct usb_hcd *hcd = NULL;
|
struct usb_hcd *hcd = NULL;
|
||||||
|
struct device *dev = &pdev->dev;
|
||||||
|
struct resource *res;
|
||||||
|
int irq;
|
||||||
|
|
||||||
if (pdev->num_resources != 2) {
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
pr_debug("hcd probe: invalid num_resources");
|
if (!res) {
|
||||||
return -ENODEV;
|
dev_dbg(dev, "hcd probe: missing memory resource\n");
|
||||||
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pdev->resource[0].flags != IORESOURCE_MEM)
|
irq = platform_get_irq(pdev, 0);
|
||||||
|| (pdev->resource[1].flags != IORESOURCE_IRQ)) {
|
if (irq < 0) {
|
||||||
pr_debug("hcd probe: invalid resource type\n");
|
dev_dbg(dev, "hcd probe: missing irq resource\n");
|
||||||
return -ENODEV;
|
return irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
hcd = usb_create_hcd(driver, &pdev->dev, "at91");
|
hcd = usb_create_hcd(driver, &pdev->dev, "at91");
|
||||||
if (!hcd)
|
if (!hcd)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
hcd->rsrc_start = pdev->resource[0].start;
|
hcd->rsrc_start = res->start;
|
||||||
hcd->rsrc_len = resource_size(&pdev->resource[0]);
|
hcd->rsrc_len = resource_size(res);
|
||||||
|
|
||||||
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
|
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
|
||||||
pr_debug("request_mem_region failed\n");
|
pr_debug("request_mem_region failed\n");
|
||||||
|
@ -199,7 +203,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
|
||||||
ohci->num_ports = board->ports;
|
ohci->num_ports = board->ports;
|
||||||
at91_start_hc(pdev);
|
at91_start_hc(pdev);
|
||||||
|
|
||||||
retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_SHARED);
|
retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
||||||
if (retval == 0)
|
if (retval == 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,12 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||||
* any other sleep) on Haswell machines with LPT and LPT-LP
|
* any other sleep) on Haswell machines with LPT and LPT-LP
|
||||||
* with the new Intel BIOS
|
* with the new Intel BIOS
|
||||||
*/
|
*/
|
||||||
xhci->quirks |= XHCI_SPURIOUS_WAKEUP;
|
/* Limit the quirk to only known vendors, as this triggers
|
||||||
|
* yet another BIOS bug on some other machines
|
||||||
|
* https://bugzilla.kernel.org/show_bug.cgi?id=66171
|
||||||
|
*/
|
||||||
|
if (pdev->subsystem_vendor == PCI_VENDOR_ID_HP)
|
||||||
|
xhci->quirks |= XHCI_SPURIOUS_WAKEUP;
|
||||||
}
|
}
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
|
if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
|
||||||
pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
|
pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
|
||||||
|
|
|
@ -19,8 +19,9 @@ config AB8500_USB
|
||||||
in host mode, low speed.
|
in host mode, low speed.
|
||||||
|
|
||||||
config FSL_USB2_OTG
|
config FSL_USB2_OTG
|
||||||
bool "Freescale USB OTG Transceiver Driver"
|
tristate "Freescale USB OTG Transceiver Driver"
|
||||||
depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME
|
depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME
|
||||||
|
depends on USB
|
||||||
select USB_OTG
|
select USB_OTG
|
||||||
select USB_PHY
|
select USB_PHY
|
||||||
help
|
help
|
||||||
|
@ -29,6 +30,7 @@ config FSL_USB2_OTG
|
||||||
config ISP1301_OMAP
|
config ISP1301_OMAP
|
||||||
tristate "Philips ISP1301 with OMAP OTG"
|
tristate "Philips ISP1301 with OMAP OTG"
|
||||||
depends on I2C && ARCH_OMAP_OTG
|
depends on I2C && ARCH_OMAP_OTG
|
||||||
|
depends on USB
|
||||||
select USB_PHY
|
select USB_PHY
|
||||||
help
|
help
|
||||||
If you say yes here you get support for the Philips ISP1301
|
If you say yes here you get support for the Philips ISP1301
|
||||||
|
|
|
@ -876,7 +876,7 @@ static int utmi_phy_probe(struct tegra_usb_phy *tegra_phy,
|
||||||
|
|
||||||
tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start,
|
tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start,
|
||||||
resource_size(res));
|
resource_size(res));
|
||||||
if (!tegra_phy->regs) {
|
if (!tegra_phy->pad_regs) {
|
||||||
dev_err(&pdev->dev, "Failed to remap UTMI Pad regs\n");
|
dev_err(&pdev->dev, "Failed to remap UTMI Pad regs\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,8 @@ static inline int twl6030_writeb(struct twl6030_usb *twl, u8 module,
|
||||||
|
|
||||||
static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address)
|
static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address)
|
||||||
{
|
{
|
||||||
u8 data, ret = 0;
|
u8 data;
|
||||||
|
int ret;
|
||||||
|
|
||||||
ret = twl_i2c_read_u8(module, &data, address);
|
ret = twl_i2c_read_u8(module, &data, address);
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
|
|
|
@ -251,6 +251,7 @@ static void option_instat_callback(struct urb *urb);
|
||||||
#define ZTE_PRODUCT_MF628 0x0015
|
#define ZTE_PRODUCT_MF628 0x0015
|
||||||
#define ZTE_PRODUCT_MF626 0x0031
|
#define ZTE_PRODUCT_MF626 0x0031
|
||||||
#define ZTE_PRODUCT_MC2718 0xffe8
|
#define ZTE_PRODUCT_MC2718 0xffe8
|
||||||
|
#define ZTE_PRODUCT_AC2726 0xfff1
|
||||||
|
|
||||||
#define BENQ_VENDOR_ID 0x04a5
|
#define BENQ_VENDOR_ID 0x04a5
|
||||||
#define BENQ_PRODUCT_H10 0x4068
|
#define BENQ_PRODUCT_H10 0x4068
|
||||||
|
@ -1453,6 +1454,7 @@ static const struct usb_device_id option_ids[] = {
|
||||||
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
|
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) },
|
||||||
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
|
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) },
|
||||||
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
|
{ USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
|
||||||
|
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
|
||||||
|
|
||||||
{ USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
|
{ USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
|
||||||
{ USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
|
{ USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
|
||||||
|
|
|
@ -281,8 +281,7 @@ static const struct usb_device_id id_table[] = {
|
||||||
{ USB_DEVICE(0x19d2, 0xfffd) },
|
{ USB_DEVICE(0x19d2, 0xfffd) },
|
||||||
{ USB_DEVICE(0x19d2, 0xfffc) },
|
{ USB_DEVICE(0x19d2, 0xfffc) },
|
||||||
{ USB_DEVICE(0x19d2, 0xfffb) },
|
{ USB_DEVICE(0x19d2, 0xfffb) },
|
||||||
/* AC2726, AC8710_V3 */
|
/* AC8710_V3 */
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfff1, 0xff, 0xff, 0xff) },
|
|
||||||
{ USB_DEVICE(0x19d2, 0xfff6) },
|
{ USB_DEVICE(0x19d2, 0xfff6) },
|
||||||
{ USB_DEVICE(0x19d2, 0xfff7) },
|
{ USB_DEVICE(0x19d2, 0xfff7) },
|
||||||
{ USB_DEVICE(0x19d2, 0xfff8) },
|
{ USB_DEVICE(0x19d2, 0xfff8) },
|
||||||
|
|
Loading…
Add table
Reference in a new issue