Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
xHCI: Clear PLC in xhci_bus_resume()
USB: fix regression in usbip by setting has_tt flag
usb/isp1760: Report correct urb status after unlink
omap:usb: add regulator support for EHCI
mfd: Fix usbhs_enable error handling
usb: musb: gadget: Fix out-of-sync runtime pm calls
usb: musb: omap2430: Fix retention idle on musb peripheral only boards

+45 -14
+3 -6
drivers/mfd/omap-usb-host.c
··· 25 25 #include <linux/dma-mapping.h> 26 26 #include <linux/spinlock.h> 27 27 #include <linux/gpio.h> 28 - #include <linux/regulator/consumer.h> 29 28 #include <plat/usb.h> 30 29 31 30 #define USBHS_DRIVER_NAME "usbhs-omap" ··· 699 700 dev_dbg(dev, "starting TI HSUSB Controller\n"); 700 701 if (!pdata) { 701 702 dev_dbg(dev, "missing platform_data\n"); 702 - ret = -ENODEV; 703 - goto end_enable; 703 + return -ENODEV; 704 704 } 705 705 706 706 spin_lock_irqsave(&omap->lock, flags); ··· 913 915 914 916 end_count: 915 917 omap->count++; 916 - goto end_enable; 918 + spin_unlock_irqrestore(&omap->lock, flags); 919 + return 0; 917 920 918 921 err_tll: 919 922 if (pdata->ehci_data->phy_reset) { ··· 930 931 clk_disable(omap->usbhost_fs_fck); 931 932 clk_disable(omap->usbhost_hs_fck); 932 933 clk_disable(omap->usbhost_ick); 933 - 934 - end_enable: 935 934 spin_unlock_irqrestore(&omap->lock, flags); 936 935 return ret; 937 936 }
+1 -1
drivers/staging/usbip/vhci_hcd.c
··· 1139 1139 usbip_uerr("create hcd failed\n"); 1140 1140 return -ENOMEM; 1141 1141 } 1142 - 1142 + hcd->has_tt = 1; 1143 1143 1144 1144 /* this is private data for vhci_hcd */ 1145 1145 the_controller = hcd_to_vhci(hcd);
+20
drivers/usb/host/ehci-omap.c
··· 40 40 #include <linux/slab.h> 41 41 #include <linux/usb/ulpi.h> 42 42 #include <plat/usb.h> 43 + #include <linux/regulator/consumer.h> 43 44 44 45 /* EHCI Register Set */ 45 46 #define EHCI_INSNREG04 (0xA0) ··· 119 118 struct ehci_hcd *omap_ehci; 120 119 int ret = -ENODEV; 121 120 int irq; 121 + int i; 122 + char supply[7]; 122 123 123 124 if (usb_disabled()) 124 125 return -ENODEV; ··· 160 157 hcd->rsrc_start = res->start; 161 158 hcd->rsrc_len = resource_size(res); 162 159 hcd->regs = regs; 160 + 161 + /* get ehci regulator and enable */ 162 + for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { 163 + if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) { 164 + pdata->regulator[i] = NULL; 165 + continue; 166 + } 167 + snprintf(supply, sizeof(supply), "hsusb%d", i); 168 + pdata->regulator[i] = regulator_get(dev, supply); 169 + if (IS_ERR(pdata->regulator[i])) { 170 + pdata->regulator[i] = NULL; 171 + dev_dbg(dev, 172 + "failed to get ehci port%d regulator\n", i); 173 + } else { 174 + regulator_enable(pdata->regulator[i]); 175 + } 176 + } 163 177 164 178 ret = omap_usbhs_enable(dev); 165 179 if (ret) {
+1
drivers/usb/host/isp1760-hcd.c
··· 1633 1633 ints[i].qh = NULL; 1634 1634 ints[i].qtd = NULL; 1635 1635 1636 + urb->status = status; 1636 1637 isp1760_urb_done(hcd, urb); 1637 1638 if (qtd) 1638 1639 pe(hcd, qh, qtd);
+17 -2
drivers/usb/host/xhci-hub.c
··· 777 777 if (t1 != t2) 778 778 xhci_writel(xhci, t2, port_array[port_index]); 779 779 780 - if (DEV_HIGHSPEED(t1)) { 780 + if (hcd->speed != HCD_USB3) { 781 781 /* enable remote wake up for USB 2.0 */ 782 782 u32 __iomem *addr; 783 783 u32 tmp; ··· 866 866 temp |= PORT_LINK_STROBE | XDEV_U0; 867 867 xhci_writel(xhci, temp, port_array[port_index]); 868 868 } 869 + /* wait for the port to enter U0 and report port link 870 + * state change. 871 + */ 872 + spin_unlock_irqrestore(&xhci->lock, flags); 873 + msleep(20); 874 + spin_lock_irqsave(&xhci->lock, flags); 875 + 876 + /* Clear PLC */ 877 + temp = xhci_readl(xhci, port_array[port_index]); 878 + if (temp & PORT_PLC) { 879 + temp = xhci_port_state_to_neutral(temp); 880 + temp |= PORT_PLC; 881 + xhci_writel(xhci, temp, port_array[port_index]); 882 + } 883 + 869 884 slot_id = xhci_find_slot_id_by_port(hcd, 870 885 xhci, port_index + 1); 871 886 if (slot_id) ··· 888 873 } else 889 874 xhci_writel(xhci, temp, port_array[port_index]); 890 875 891 - if (DEV_HIGHSPEED(temp)) { 876 + if (hcd->speed != HCD_USB3) { 892 877 /* disable remote wake up for USB 2.0 */ 893 878 u32 __iomem *addr; 894 879 u32 tmp;
+2 -4
drivers/usb/musb/musb_gadget.c
··· 1887 1887 otg_set_vbus(musb->xceiv, 1); 1888 1888 1889 1889 hcd->self.uses_pio_for_control = 1; 1890 - 1891 - if (musb->xceiv->last_event == USB_EVENT_NONE) 1892 - pm_runtime_put(musb->controller); 1893 - 1894 1890 } 1891 + if (musb->xceiv->last_event == USB_EVENT_NONE) 1892 + pm_runtime_put(musb->controller); 1895 1893 1896 1894 return 0; 1897 1895
+1 -1
drivers/usb/musb/omap2430.c
··· 270 270 DBG(4, "VBUS Disconnect\n"); 271 271 272 272 #ifdef CONFIG_USB_GADGET_MUSB_HDRC 273 - if (is_otg_enabled(musb)) 273 + if (is_otg_enabled(musb) || is_peripheral_enabled(musb)) 274 274 if (musb->gadget_driver) 275 275 #endif 276 276 {