diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 3 | ||||
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 61800f77dac8..ced846ac4141 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1330,6 +1330,8 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, | |||
1330 | */ | 1330 | */ |
1331 | 1331 | ||
1332 | if (usb_endpoint_xfer_control(&urb->ep->desc)) { | 1332 | if (usb_endpoint_xfer_control(&urb->ep->desc)) { |
1333 | if (hcd->self.uses_pio_for_control) | ||
1334 | return ret; | ||
1333 | if (hcd->self.uses_dma) { | 1335 | if (hcd->self.uses_dma) { |
1334 | urb->setup_dma = dma_map_single( | 1336 | urb->setup_dma = dma_map_single( |
1335 | hcd->self.controller, | 1337 | hcd->self.controller, |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index e6669fc3b804..99beebce8550 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2116,12 +2116,15 @@ bad_config: | |||
2116 | * Otherwise, wait till the gadget driver hooks up. | 2116 | * Otherwise, wait till the gadget driver hooks up. |
2117 | */ | 2117 | */ |
2118 | if (!is_otg_enabled(musb) && is_host_enabled(musb)) { | 2118 | if (!is_otg_enabled(musb) && is_host_enabled(musb)) { |
2119 | struct usb_hcd *hcd = musb_to_hcd(musb); | ||
2120 | |||
2119 | MUSB_HST_MODE(musb); | 2121 | MUSB_HST_MODE(musb); |
2120 | musb->xceiv->default_a = 1; | 2122 | musb->xceiv->default_a = 1; |
2121 | musb->xceiv->state = OTG_STATE_A_IDLE; | 2123 | musb->xceiv->state = OTG_STATE_A_IDLE; |
2122 | 2124 | ||
2123 | status = usb_add_hcd(musb_to_hcd(musb), -1, 0); | 2125 | status = usb_add_hcd(musb_to_hcd(musb), -1, 0); |
2124 | 2126 | ||
2127 | hcd->self.uses_pio_for_control = 1; | ||
2125 | DBG(1, "%s mode, status %d, devctl %02x %c\n", | 2128 | DBG(1, "%s mode, status %d, devctl %02x %c\n", |
2126 | "HOST", status, | 2129 | "HOST", status, |
2127 | musb_readb(musb->mregs, MUSB_DEVCTL), | 2130 | musb_readb(musb->mregs, MUSB_DEVCTL), |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index c8de0e123f2c..9d6ade82b9f2 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1833,6 +1833,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver, | |||
1833 | spin_unlock_irqrestore(&musb->lock, flags); | 1833 | spin_unlock_irqrestore(&musb->lock, flags); |
1834 | 1834 | ||
1835 | if (is_otg_enabled(musb)) { | 1835 | if (is_otg_enabled(musb)) { |
1836 | struct usb_hcd *hcd = musb_to_hcd(musb); | ||
1837 | |||
1836 | DBG(3, "OTG startup...\n"); | 1838 | DBG(3, "OTG startup...\n"); |
1837 | 1839 | ||
1838 | /* REVISIT: funcall to other code, which also | 1840 | /* REVISIT: funcall to other code, which also |
@@ -1847,6 +1849,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver, | |||
1847 | musb->gadget_driver = NULL; | 1849 | musb->gadget_driver = NULL; |
1848 | musb->g.dev.driver = NULL; | 1850 | musb->g.dev.driver = NULL; |
1849 | spin_unlock_irqrestore(&musb->lock, flags); | 1851 | spin_unlock_irqrestore(&musb->lock, flags); |
1852 | } else { | ||
1853 | hcd->self.uses_pio_for_control = 1; | ||
1850 | } | 1854 | } |
1851 | } | 1855 | } |
1852 | } | 1856 | } |