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
@ -24,8 +24,8 @@ config PHY_EXYNOS_MIPI_VIDEO
|
||||
config OMAP_USB2
|
||||
tristate "OMAP USB2 PHY Driver"
|
||||
depends on ARCH_OMAP2PLUS
|
||||
depends on USB_PHY
|
||||
select GENERIC_PHY
|
||||
select USB_PHY
|
||||
select OMAP_CONTROL_USB
|
||||
help
|
||||
Enable this to support the transceiver that is part of SOC. This
|
||||
@ -36,8 +36,8 @@ config OMAP_USB2
|
||||
config TWL4030_USB
|
||||
tristate "TWL4030 USB Transceiver Driver"
|
||||
depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
|
||||
depends on USB_PHY
|
||||
select GENERIC_PHY
|
||||
select USB_PHY
|
||||
help
|
||||
Enable this to support the USB OTG transceiver on TWL4030
|
||||
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;
|
||||
struct phy *phy;
|
||||
|
||||
if (!dev) {
|
||||
dev_WARN(dev, "no device provided for PHY\n");
|
||||
ret = -EINVAL;
|
||||
goto err0;
|
||||
}
|
||||
if (WARN_ON(!dev))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
phy = kzalloc(sizeof(*phy), GFP_KERNEL);
|
||||
if (!phy) {
|
||||
ret = -ENOMEM;
|
||||
goto err0;
|
||||
}
|
||||
if (!phy)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
id = ida_simple_get(&phy_ida, 0, 0, GFP_KERNEL);
|
||||
if (id < 0) {
|
||||
dev_err(dev, "unable to get id\n");
|
||||
ret = id;
|
||||
goto err0;
|
||||
goto free_phy;
|
||||
}
|
||||
|
||||
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);
|
||||
if (ret)
|
||||
goto err1;
|
||||
goto put_dev;
|
||||
|
||||
ret = device_add(&phy->dev);
|
||||
if (ret)
|
||||
goto err1;
|
||||
goto put_dev;
|
||||
|
||||
if (pm_runtime_enabled(dev)) {
|
||||
pm_runtime_enable(&phy->dev);
|
||||
@ -481,12 +476,11 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops,
|
||||
|
||||
return phy;
|
||||
|
||||
err1:
|
||||
ida_remove(&phy_ida, phy->id);
|
||||
put_dev:
|
||||
put_device(&phy->dev);
|
||||
ida_remove(&phy_ida, phy->id);
|
||||
free_phy:
|
||||
kfree(phy);
|
||||
|
||||
err0:
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(phy_create);
|
||||
|
@ -642,6 +642,10 @@ static int ci_hdrc_probe(struct platform_device *pdev)
|
||||
: 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);
|
||||
if (ret) {
|
||||
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;
|
||||
|
||||
disable_reg:
|
||||
regulator_disable(ci->platdata->reg_vbus);
|
||||
if (ci->platdata->reg_vbus)
|
||||
regulator_disable(ci->platdata->reg_vbus);
|
||||
|
||||
put_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_enable(&ci->gadget.dev);
|
||||
|
||||
/* Update ci->vbus_active */
|
||||
ci_handle_vbus_change(ci);
|
||||
|
||||
return retval;
|
||||
|
||||
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 */
|
||||
int rv = usb_autopm_get_interface(intf);
|
||||
if (rv < 0)
|
||||
goto err;
|
||||
|
||||
intf->needs_remote_wakeup = on;
|
||||
usb_autopm_put_interface(intf);
|
||||
err:
|
||||
return rv;
|
||||
if (!rv)
|
||||
usb_autopm_put_interface(intf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
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))
|
||||
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);
|
||||
platform_set_drvdata(pdev, dwc);
|
||||
|
||||
@ -488,6 +485,9 @@ static int dwc3_probe(struct platform_device *pdev)
|
||||
goto err0;
|
||||
}
|
||||
|
||||
usb_phy_set_suspend(dwc->usb2_phy, 0);
|
||||
usb_phy_set_suspend(dwc->usb3_phy, 0);
|
||||
|
||||
ret = dwc3_event_buffers_setup(dwc);
|
||||
if (ret) {
|
||||
dev_err(dwc->dev, "failed to setup event buffers\n");
|
||||
@ -569,6 +569,8 @@ err2:
|
||||
dwc3_event_buffers_cleanup(dwc);
|
||||
|
||||
err1:
|
||||
usb_phy_set_suspend(dwc->usb2_phy, 1);
|
||||
usb_phy_set_suspend(dwc->usb3_phy, 1);
|
||||
dwc3_core_exit(dwc);
|
||||
|
||||
err0:
|
||||
|
@ -136,23 +136,27 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
|
||||
struct ohci_hcd *ohci;
|
||||
int retval;
|
||||
struct usb_hcd *hcd = NULL;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
int irq;
|
||||
|
||||
if (pdev->num_resources != 2) {
|
||||
pr_debug("hcd probe: invalid num_resources");
|
||||
return -ENODEV;
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res) {
|
||||
dev_dbg(dev, "hcd probe: missing memory resource\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if ((pdev->resource[0].flags != IORESOURCE_MEM)
|
||||
|| (pdev->resource[1].flags != IORESOURCE_IRQ)) {
|
||||
pr_debug("hcd probe: invalid resource type\n");
|
||||
return -ENODEV;
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
dev_dbg(dev, "hcd probe: missing irq resource\n");
|
||||
return irq;
|
||||
}
|
||||
|
||||
hcd = usb_create_hcd(driver, &pdev->dev, "at91");
|
||||
if (!hcd)
|
||||
return -ENOMEM;
|
||||
hcd->rsrc_start = pdev->resource[0].start;
|
||||
hcd->rsrc_len = resource_size(&pdev->resource[0]);
|
||||
hcd->rsrc_start = res->start;
|
||||
hcd->rsrc_len = resource_size(res);
|
||||
|
||||
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
|
||||
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;
|
||||
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)
|
||||
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
|
||||
* 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 &&
|
||||
pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
|
||||
|
@ -19,8 +19,9 @@ config AB8500_USB
|
||||
in host mode, low speed.
|
||||
|
||||
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
|
||||
select USB_OTG
|
||||
select USB_PHY
|
||||
help
|
||||
@ -29,6 +30,7 @@ config FSL_USB2_OTG
|
||||
config ISP1301_OMAP
|
||||
tristate "Philips ISP1301 with OMAP OTG"
|
||||
depends on I2C && ARCH_OMAP_OTG
|
||||
depends on USB
|
||||
select USB_PHY
|
||||
help
|
||||
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,
|
||||
resource_size(res));
|
||||
if (!tegra_phy->regs) {
|
||||
if (!tegra_phy->pad_regs) {
|
||||
dev_err(&pdev->dev, "Failed to remap UTMI Pad regs\n");
|
||||
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)
|
||||
{
|
||||
u8 data, ret = 0;
|
||||
u8 data;
|
||||
int ret;
|
||||
|
||||
ret = twl_i2c_read_u8(module, &data, address);
|
||||
if (ret >= 0)
|
||||
|
@ -251,6 +251,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
#define ZTE_PRODUCT_MF628 0x0015
|
||||
#define ZTE_PRODUCT_MF626 0x0031
|
||||
#define ZTE_PRODUCT_MC2718 0xffe8
|
||||
#define ZTE_PRODUCT_AC2726 0xfff1
|
||||
|
||||
#define BENQ_VENDOR_ID 0x04a5
|
||||
#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, 0x05) },
|
||||
{ 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(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, 0xfffc) },
|
||||
{ USB_DEVICE(0x19d2, 0xfffb) },
|
||||
/* AC2726, AC8710_V3 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x19d2, 0xfff1, 0xff, 0xff, 0xff) },
|
||||
/* AC8710_V3 */
|
||||
{ USB_DEVICE(0x19d2, 0xfff6) },
|
||||
{ USB_DEVICE(0x19d2, 0xfff7) },
|
||||
{ USB_DEVICE(0x19d2, 0xfff8) },
|
||||
|
Loading…
Reference in New Issue
Block a user