diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-26 21:40:19 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-26 21:40:19 -0400 |
commit | f35c69b736e4f910d7447346980145212c283570 (patch) | |
tree | 824b90cd870e6de07bbba19d761c1c74cf1fb4a7 /drivers/usb/host | |
parent | cd4373984a5903276f52777a6003425e023eaa7e (diff) | |
parent | e4aa937ec75df0eea0bee03bffa3303ad36c986b (diff) |
Merge 3.10-rc3 into char-misc-next
We want the changes in here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/Kconfig | 17 | ||||
-rw-r--r-- | drivers/usb/host/ehci-atmel.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 17 | ||||
-rw-r--r-- | drivers/usb/host/ehci-omap.c | 8 | ||||
-rw-r--r-- | drivers/usb/host/ehci-orion.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/ehci-s5p.c | 5 | ||||
-rw-r--r-- | drivers/usb/host/ehci-spear.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/isp1760-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/isp1760-if.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/ohci-exynos.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 34 | ||||
-rw-r--r-- | drivers/usb/host/ohci-nxp.c | 50 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap3.c | 8 | ||||
-rw-r--r-- | drivers/usb/host/ohci-pxa27x.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/ohci-spear.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/oxu210hp-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/uhci-hub.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/uhci-platform.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/uhci-q.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 17 |
23 files changed, 99 insertions, 124 deletions
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index de94f2699063..344d5e2f87d7 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -507,7 +507,7 @@ endif # USB_OHCI_HCD | |||
507 | 507 | ||
508 | config USB_UHCI_HCD | 508 | config USB_UHCI_HCD |
509 | tristate "UHCI HCD (most Intel and VIA) support" | 509 | tristate "UHCI HCD (most Intel and VIA) support" |
510 | depends on PCI || SPARC_LEON || ARCH_VT8500 | 510 | depends on PCI || USB_UHCI_SUPPORT_NON_PCI_HC |
511 | ---help--- | 511 | ---help--- |
512 | The Universal Host Controller Interface is a standard by Intel for | 512 | The Universal Host Controller Interface is a standard by Intel for |
513 | accessing the USB hardware in the PC (which is also called the USB | 513 | accessing the USB hardware in the PC (which is also called the USB |
@@ -524,26 +524,19 @@ config USB_UHCI_HCD | |||
524 | 524 | ||
525 | config USB_UHCI_SUPPORT_NON_PCI_HC | 525 | config USB_UHCI_SUPPORT_NON_PCI_HC |
526 | bool | 526 | bool |
527 | depends on USB_UHCI_HCD | 527 | default y if (SPARC_LEON || USB_UHCI_PLATFORM) |
528 | default y if (SPARC_LEON || ARCH_VT8500) | ||
529 | 528 | ||
530 | config USB_UHCI_PLATFORM | 529 | config USB_UHCI_PLATFORM |
531 | bool "Generic UHCI Platform Driver support" | 530 | bool |
532 | depends on USB_UHCI_SUPPORT_NON_PCI_HC | ||
533 | default y if ARCH_VT8500 | 531 | default y if ARCH_VT8500 |
534 | ---help--- | ||
535 | Enable support for generic UHCI platform devices that require no | ||
536 | additional configuration. | ||
537 | 532 | ||
538 | config USB_UHCI_BIG_ENDIAN_MMIO | 533 | config USB_UHCI_BIG_ENDIAN_MMIO |
539 | bool | 534 | bool |
540 | depends on USB_UHCI_SUPPORT_NON_PCI_HC && SPARC_LEON | 535 | default y if SPARC_LEON |
541 | default y | ||
542 | 536 | ||
543 | config USB_UHCI_BIG_ENDIAN_DESC | 537 | config USB_UHCI_BIG_ENDIAN_DESC |
544 | bool | 538 | bool |
545 | depends on USB_UHCI_SUPPORT_NON_PCI_HC && SPARC_LEON | 539 | default y if SPARC_LEON |
546 | default y | ||
547 | 540 | ||
548 | config USB_FHCI_HCD | 541 | config USB_FHCI_HCD |
549 | tristate "Freescale QE USB Host Controller support" | 542 | tristate "Freescale QE USB Host Controller support" |
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 66420097c242..02f4611faa62 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c | |||
@@ -63,8 +63,6 @@ static void atmel_stop_ehci(struct platform_device *pdev) | |||
63 | 63 | ||
64 | /*-------------------------------------------------------------------------*/ | 64 | /*-------------------------------------------------------------------------*/ |
65 | 65 | ||
66 | static u64 at91_ehci_dma_mask = DMA_BIT_MASK(32); | ||
67 | |||
68 | static int ehci_atmel_drv_probe(struct platform_device *pdev) | 66 | static int ehci_atmel_drv_probe(struct platform_device *pdev) |
69 | { | 67 | { |
70 | struct usb_hcd *hcd; | 68 | struct usb_hcd *hcd; |
@@ -93,7 +91,9 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev) | |||
93 | * Once we have dma capability bindings this can go away. | 91 | * Once we have dma capability bindings this can go away. |
94 | */ | 92 | */ |
95 | if (!pdev->dev.dma_mask) | 93 | if (!pdev->dev.dma_mask) |
96 | pdev->dev.dma_mask = &at91_ehci_dma_mask; | 94 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
95 | if (!pdev->dev.coherent_dma_mask) | ||
96 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
97 | 97 | ||
98 | hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); | 98 | hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); |
99 | if (!hcd) { | 99 | if (!hcd) { |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 312fc10da3c7..246e124e6ac5 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -1286,23 +1286,6 @@ MODULE_LICENSE ("GPL"); | |||
1286 | #define PLATFORM_DRIVER ehci_hcd_sead3_driver | 1286 | #define PLATFORM_DRIVER ehci_hcd_sead3_driver |
1287 | #endif | 1287 | #endif |
1288 | 1288 | ||
1289 | #if !IS_ENABLED(CONFIG_USB_EHCI_PCI) && \ | ||
1290 | !IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \ | ||
1291 | !IS_ENABLED(CONFIG_USB_CHIPIDEA_HOST) && \ | ||
1292 | !IS_ENABLED(CONFIG_USB_EHCI_MXC) && \ | ||
1293 | !IS_ENABLED(CONFIG_USB_EHCI_HCD_OMAP) && \ | ||
1294 | !IS_ENABLED(CONFIG_USB_EHCI_HCD_ORION) && \ | ||
1295 | !IS_ENABLED(CONFIG_USB_EHCI_HCD_SPEAR) && \ | ||
1296 | !IS_ENABLED(CONFIG_USB_EHCI_S5P) && \ | ||
1297 | !IS_ENABLED(CONFIG_USB_EHCI_HCD_AT91) && \ | ||
1298 | !IS_ENABLED(CONFIG_USB_EHCI_MSM) && \ | ||
1299 | !defined(PLATFORM_DRIVER) && \ | ||
1300 | !defined(PS3_SYSTEM_BUS_DRIVER) && \ | ||
1301 | !defined(OF_PLATFORM_DRIVER) && \ | ||
1302 | !defined(XILINX_OF_PLATFORM_DRIVER) | ||
1303 | #error "missing bus glue for ehci-hcd" | ||
1304 | #endif | ||
1305 | |||
1306 | static int __init ehci_hcd_init(void) | 1289 | static int __init ehci_hcd_init(void) |
1307 | { | 1290 | { |
1308 | int retval = 0; | 1291 | int retval = 0; |
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 3d1491b5f360..16d7150e8557 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c | |||
@@ -90,8 +90,6 @@ static const struct ehci_driver_overrides ehci_omap_overrides __initdata = { | |||
90 | .extra_priv_size = sizeof(struct omap_hcd), | 90 | .extra_priv_size = sizeof(struct omap_hcd), |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static u64 omap_ehci_dma_mask = DMA_BIT_MASK(32); | ||
94 | |||
95 | /** | 93 | /** |
96 | * ehci_hcd_omap_probe - initialize TI-based HCDs | 94 | * ehci_hcd_omap_probe - initialize TI-based HCDs |
97 | * | 95 | * |
@@ -146,8 +144,10 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) | |||
146 | * Since shared usb code relies on it, set it here for now. | 144 | * Since shared usb code relies on it, set it here for now. |
147 | * Once we have dma capability bindings this can go away. | 145 | * Once we have dma capability bindings this can go away. |
148 | */ | 146 | */ |
149 | if (!pdev->dev.dma_mask) | 147 | if (!dev->dma_mask) |
150 | pdev->dev.dma_mask = &omap_ehci_dma_mask; | 148 | dev->dma_mask = &dev->coherent_dma_mask; |
149 | if (!dev->coherent_dma_mask) | ||
150 | dev->coherent_dma_mask = DMA_BIT_MASK(32); | ||
151 | 151 | ||
152 | hcd = usb_create_hcd(&ehci_omap_hc_driver, dev, | 152 | hcd = usb_create_hcd(&ehci_omap_hc_driver, dev, |
153 | dev_name(dev)); | 153 | dev_name(dev)); |
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 54c579485150..efbc588b48c5 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -137,8 +137,6 @@ ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, | |||
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
140 | static u64 ehci_orion_dma_mask = DMA_BIT_MASK(32); | ||
141 | |||
142 | static int ehci_orion_drv_probe(struct platform_device *pdev) | 140 | static int ehci_orion_drv_probe(struct platform_device *pdev) |
143 | { | 141 | { |
144 | struct orion_ehci_data *pd = pdev->dev.platform_data; | 142 | struct orion_ehci_data *pd = pdev->dev.platform_data; |
@@ -183,7 +181,9 @@ static int ehci_orion_drv_probe(struct platform_device *pdev) | |||
183 | * now. Once we have dma capability bindings this can go away. | 181 | * now. Once we have dma capability bindings this can go away. |
184 | */ | 182 | */ |
185 | if (!pdev->dev.dma_mask) | 183 | if (!pdev->dev.dma_mask) |
186 | pdev->dev.dma_mask = &ehci_orion_dma_mask; | 184 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
185 | if (!pdev->dev.coherent_dma_mask) | ||
186 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
187 | 187 | ||
188 | if (!request_mem_region(res->start, resource_size(res), | 188 | if (!request_mem_region(res->start, resource_size(res), |
189 | ehci_orion_hc_driver.description)) { | 189 | ehci_orion_hc_driver.description)) { |
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 635775278c7f..379037f51a2f 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c | |||
@@ -71,8 +71,6 @@ static void s5p_setup_vbus_gpio(struct platform_device *pdev) | |||
71 | dev_err(dev, "can't request ehci vbus gpio %d", gpio); | 71 | dev_err(dev, "can't request ehci vbus gpio %d", gpio); |
72 | } | 72 | } |
73 | 73 | ||
74 | static u64 ehci_s5p_dma_mask = DMA_BIT_MASK(32); | ||
75 | |||
76 | static int s5p_ehci_probe(struct platform_device *pdev) | 74 | static int s5p_ehci_probe(struct platform_device *pdev) |
77 | { | 75 | { |
78 | struct s5p_ehci_platdata *pdata = pdev->dev.platform_data; | 76 | struct s5p_ehci_platdata *pdata = pdev->dev.platform_data; |
@@ -90,7 +88,7 @@ static int s5p_ehci_probe(struct platform_device *pdev) | |||
90 | * Once we move to full device tree support this will vanish off. | 88 | * Once we move to full device tree support this will vanish off. |
91 | */ | 89 | */ |
92 | if (!pdev->dev.dma_mask) | 90 | if (!pdev->dev.dma_mask) |
93 | pdev->dev.dma_mask = &ehci_s5p_dma_mask; | 91 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
94 | if (!pdev->dev.coherent_dma_mask) | 92 | if (!pdev->dev.coherent_dma_mask) |
95 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 93 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
96 | 94 | ||
@@ -107,6 +105,7 @@ static int s5p_ehci_probe(struct platform_device *pdev) | |||
107 | if (IS_ERR(phy)) { | 105 | if (IS_ERR(phy)) { |
108 | /* Fallback to pdata */ | 106 | /* Fallback to pdata */ |
109 | if (!pdata) { | 107 | if (!pdata) { |
108 | usb_put_hcd(hcd); | ||
110 | dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); | 109 | dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); |
111 | return -EPROBE_DEFER; | 110 | return -EPROBE_DEFER; |
112 | } else { | 111 | } else { |
diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index 61ecfb3d52f5..bd3e5cbc6240 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c | |||
@@ -58,8 +58,6 @@ static int ehci_spear_drv_resume(struct device *dev) | |||
58 | static SIMPLE_DEV_PM_OPS(ehci_spear_pm_ops, ehci_spear_drv_suspend, | 58 | static SIMPLE_DEV_PM_OPS(ehci_spear_pm_ops, ehci_spear_drv_suspend, |
59 | ehci_spear_drv_resume); | 59 | ehci_spear_drv_resume); |
60 | 60 | ||
61 | static u64 spear_ehci_dma_mask = DMA_BIT_MASK(32); | ||
62 | |||
63 | static int spear_ehci_hcd_drv_probe(struct platform_device *pdev) | 61 | static int spear_ehci_hcd_drv_probe(struct platform_device *pdev) |
64 | { | 62 | { |
65 | struct usb_hcd *hcd ; | 63 | struct usb_hcd *hcd ; |
@@ -84,7 +82,9 @@ static int spear_ehci_hcd_drv_probe(struct platform_device *pdev) | |||
84 | * Once we have dma capability bindings this can go away. | 82 | * Once we have dma capability bindings this can go away. |
85 | */ | 83 | */ |
86 | if (!pdev->dev.dma_mask) | 84 | if (!pdev->dev.dma_mask) |
87 | pdev->dev.dma_mask = &spear_ehci_dma_mask; | 85 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
86 | if (!pdev->dev.coherent_dma_mask) | ||
87 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
88 | 88 | ||
89 | usbh_clk = devm_clk_get(&pdev->dev, NULL); | 89 | usbh_clk = devm_clk_get(&pdev->dev, NULL); |
90 | if (IS_ERR(usbh_clk)) { | 90 | if (IS_ERR(usbh_clk)) { |
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index e3eddc31ac83..59d111bf44a9 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c | |||
@@ -637,8 +637,6 @@ static void tegra_ehci_set_phcd(struct usb_phy *x, bool enable) | |||
637 | writel(val, base + TEGRA_USB_PORTSC1); | 637 | writel(val, base + TEGRA_USB_PORTSC1); |
638 | } | 638 | } |
639 | 639 | ||
640 | static u64 tegra_ehci_dma_mask = DMA_BIT_MASK(32); | ||
641 | |||
642 | static int tegra_ehci_probe(struct platform_device *pdev) | 640 | static int tegra_ehci_probe(struct platform_device *pdev) |
643 | { | 641 | { |
644 | struct resource *res; | 642 | struct resource *res; |
@@ -661,7 +659,9 @@ static int tegra_ehci_probe(struct platform_device *pdev) | |||
661 | * Once we have dma capability bindings this can go away. | 659 | * Once we have dma capability bindings this can go away. |
662 | */ | 660 | */ |
663 | if (!pdev->dev.dma_mask) | 661 | if (!pdev->dev.dma_mask) |
664 | pdev->dev.dma_mask = &tegra_ehci_dma_mask; | 662 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
663 | if (!pdev->dev.coherent_dma_mask) | ||
664 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
665 | 665 | ||
666 | setup_vbus_gpio(pdev, pdata); | 666 | setup_vbus_gpio(pdev, pdata); |
667 | 667 | ||
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index 125e261f5bfc..2facee53eab1 100644 --- a/drivers/usb/host/isp1760-hcd.c +++ b/drivers/usb/host/isp1760-hcd.c | |||
@@ -1739,7 +1739,7 @@ static int isp1760_hub_status_data(struct usb_hcd *hcd, char *buf) | |||
1739 | int retval = 1; | 1739 | int retval = 1; |
1740 | unsigned long flags; | 1740 | unsigned long flags; |
1741 | 1741 | ||
1742 | /* if !USB_SUSPEND, root hub timers won't get shut down ... */ | 1742 | /* if !PM_RUNTIME, root hub timers won't get shut down ... */ |
1743 | if (!HC_IS_RUNNING(hcd->state)) | 1743 | if (!HC_IS_RUNNING(hcd->state)) |
1744 | return 0; | 1744 | return 0; |
1745 | 1745 | ||
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index bbb791bd7617..a13709ee4e5d 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
@@ -373,8 +373,10 @@ static int isp1760_plat_probe(struct platform_device *pdev) | |||
373 | irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 373 | irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
374 | if (!irq_res) { | 374 | if (!irq_res) { |
375 | pr_warning("isp1760: IRQ resource not available\n"); | 375 | pr_warning("isp1760: IRQ resource not available\n"); |
376 | return -ENODEV; | 376 | ret = -ENODEV; |
377 | goto cleanup; | ||
377 | } | 378 | } |
379 | |||
378 | irqflags |= irq_res->flags & IRQF_TRIGGER_MASK; | 380 | irqflags |= irq_res->flags & IRQF_TRIGGER_MASK; |
379 | 381 | ||
380 | if (priv) { | 382 | if (priv) { |
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index a0cb44f0e724..2ee1496dbc1d 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
@@ -504,8 +504,6 @@ static const struct of_device_id at91_ohci_dt_ids[] = { | |||
504 | 504 | ||
505 | MODULE_DEVICE_TABLE(of, at91_ohci_dt_ids); | 505 | MODULE_DEVICE_TABLE(of, at91_ohci_dt_ids); |
506 | 506 | ||
507 | static u64 at91_ohci_dma_mask = DMA_BIT_MASK(32); | ||
508 | |||
509 | static int ohci_at91_of_init(struct platform_device *pdev) | 507 | static int ohci_at91_of_init(struct platform_device *pdev) |
510 | { | 508 | { |
511 | struct device_node *np = pdev->dev.of_node; | 509 | struct device_node *np = pdev->dev.of_node; |
@@ -522,7 +520,9 @@ static int ohci_at91_of_init(struct platform_device *pdev) | |||
522 | * Once we have dma capability bindings this can go away. | 520 | * Once we have dma capability bindings this can go away. |
523 | */ | 521 | */ |
524 | if (!pdev->dev.dma_mask) | 522 | if (!pdev->dev.dma_mask) |
525 | pdev->dev.dma_mask = &at91_ohci_dma_mask; | 523 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
524 | if (!pdev->dev.coherent_dma_mask) | ||
525 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
526 | 526 | ||
527 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 527 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
528 | if (!pdata) | 528 | if (!pdata) |
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 07592c00af26..b0b542c14e31 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c | |||
@@ -98,8 +98,6 @@ static const struct hc_driver exynos_ohci_hc_driver = { | |||
98 | .start_port_reset = ohci_start_port_reset, | 98 | .start_port_reset = ohci_start_port_reset, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static u64 ohci_exynos_dma_mask = DMA_BIT_MASK(32); | ||
102 | |||
103 | static int exynos_ohci_probe(struct platform_device *pdev) | 101 | static int exynos_ohci_probe(struct platform_device *pdev) |
104 | { | 102 | { |
105 | struct exynos4_ohci_platdata *pdata = pdev->dev.platform_data; | 103 | struct exynos4_ohci_platdata *pdata = pdev->dev.platform_data; |
@@ -117,7 +115,7 @@ static int exynos_ohci_probe(struct platform_device *pdev) | |||
117 | * Once we move to full device tree support this will vanish off. | 115 | * Once we move to full device tree support this will vanish off. |
118 | */ | 116 | */ |
119 | if (!pdev->dev.dma_mask) | 117 | if (!pdev->dev.dma_mask) |
120 | pdev->dev.dma_mask = &ohci_exynos_dma_mask; | 118 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
121 | if (!pdev->dev.coherent_dma_mask) | 119 | if (!pdev->dev.coherent_dma_mask) |
122 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 120 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
123 | 121 | ||
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 9e6de9586ae4..fc627fd54116 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -233,14 +233,14 @@ static int ohci_urb_enqueue ( | |||
233 | urb->start_frame = frame; | 233 | urb->start_frame = frame; |
234 | } | 234 | } |
235 | } else if (ed->type == PIPE_ISOCHRONOUS) { | 235 | } else if (ed->type == PIPE_ISOCHRONOUS) { |
236 | u16 next = ohci_frame_no(ohci) + 2; | 236 | u16 next = ohci_frame_no(ohci) + 1; |
237 | u16 frame = ed->last_iso + ed->interval; | 237 | u16 frame = ed->last_iso + ed->interval; |
238 | 238 | ||
239 | /* Behind the scheduling threshold? */ | 239 | /* Behind the scheduling threshold? */ |
240 | if (unlikely(tick_before(frame, next))) { | 240 | if (unlikely(tick_before(frame, next))) { |
241 | 241 | ||
242 | /* USB_ISO_ASAP: Round up to the first available slot */ | 242 | /* USB_ISO_ASAP: Round up to the first available slot */ |
243 | if (urb->transfer_flags & URB_ISO_ASAP) | 243 | if (urb->transfer_flags & URB_ISO_ASAP) { |
244 | frame += (next - frame + ed->interval - 1) & | 244 | frame += (next - frame + ed->interval - 1) & |
245 | -ed->interval; | 245 | -ed->interval; |
246 | 246 | ||
@@ -248,21 +248,25 @@ static int ohci_urb_enqueue ( | |||
248 | * Not ASAP: Use the next slot in the stream. If | 248 | * Not ASAP: Use the next slot in the stream. If |
249 | * the entire URB falls before the threshold, fail. | 249 | * the entire URB falls before the threshold, fail. |
250 | */ | 250 | */ |
251 | else if (tick_before(frame + ed->interval * | 251 | } else { |
252 | if (tick_before(frame + ed->interval * | ||
252 | (urb->number_of_packets - 1), next)) { | 253 | (urb->number_of_packets - 1), next)) { |
253 | retval = -EXDEV; | 254 | retval = -EXDEV; |
254 | usb_hcd_unlink_urb_from_ep(hcd, urb); | 255 | usb_hcd_unlink_urb_from_ep(hcd, urb); |
255 | goto fail; | 256 | goto fail; |
256 | } | 257 | } |
257 | 258 | ||
258 | /* | 259 | /* |
259 | * Some OHCI hardware doesn't handle late TDs | 260 | * Some OHCI hardware doesn't handle late TDs |
260 | * correctly. After retiring them it proceeds to | 261 | * correctly. After retiring them it proceeds |
261 | * the next ED instead of the next TD. Therefore | 262 | * to the next ED instead of the next TD. |
262 | * we have to omit the late TDs entirely. | 263 | * Therefore we have to omit the late TDs |
263 | */ | 264 | * entirely. |
264 | urb_priv->td_cnt = DIV_ROUND_UP(next - frame, | 265 | */ |
265 | ed->interval); | 266 | urb_priv->td_cnt = DIV_ROUND_UP( |
267 | (u16) (next - frame), | ||
268 | ed->interval); | ||
269 | } | ||
266 | } | 270 | } |
267 | urb->start_frame = frame; | 271 | urb->start_frame = frame; |
268 | } | 272 | } |
diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index f4988fbe78e7..5d7eb72c5064 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c | |||
@@ -223,8 +223,7 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
223 | 223 | ||
224 | isp1301_i2c_client = isp1301_get_client(isp1301_node); | 224 | isp1301_i2c_client = isp1301_get_client(isp1301_node); |
225 | if (!isp1301_i2c_client) { | 225 | if (!isp1301_i2c_client) { |
226 | ret = -EPROBE_DEFER; | 226 | return -EPROBE_DEFER; |
227 | goto out; | ||
228 | } | 227 | } |
229 | 228 | ||
230 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 229 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
@@ -234,7 +233,7 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
234 | if (usb_disabled()) { | 233 | if (usb_disabled()) { |
235 | dev_err(&pdev->dev, "USB is disabled\n"); | 234 | dev_err(&pdev->dev, "USB is disabled\n"); |
236 | ret = -ENODEV; | 235 | ret = -ENODEV; |
237 | goto out; | 236 | goto fail_disable; |
238 | } | 237 | } |
239 | 238 | ||
240 | /* Enable AHB slave USB clock, needed for further USB clock control */ | 239 | /* Enable AHB slave USB clock, needed for further USB clock control */ |
@@ -245,19 +244,19 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
245 | if (IS_ERR(usb_pll_clk)) { | 244 | if (IS_ERR(usb_pll_clk)) { |
246 | dev_err(&pdev->dev, "failed to acquire USB PLL\n"); | 245 | dev_err(&pdev->dev, "failed to acquire USB PLL\n"); |
247 | ret = PTR_ERR(usb_pll_clk); | 246 | ret = PTR_ERR(usb_pll_clk); |
248 | goto out1; | 247 | goto fail_pll; |
249 | } | 248 | } |
250 | 249 | ||
251 | ret = clk_enable(usb_pll_clk); | 250 | ret = clk_enable(usb_pll_clk); |
252 | if (ret < 0) { | 251 | if (ret < 0) { |
253 | dev_err(&pdev->dev, "failed to start USB PLL\n"); | 252 | dev_err(&pdev->dev, "failed to start USB PLL\n"); |
254 | goto out2; | 253 | goto fail_pllen; |
255 | } | 254 | } |
256 | 255 | ||
257 | ret = clk_set_rate(usb_pll_clk, 48000); | 256 | ret = clk_set_rate(usb_pll_clk, 48000); |
258 | if (ret < 0) { | 257 | if (ret < 0) { |
259 | dev_err(&pdev->dev, "failed to set USB clock rate\n"); | 258 | dev_err(&pdev->dev, "failed to set USB clock rate\n"); |
260 | goto out3; | 259 | goto fail_rate; |
261 | } | 260 | } |
262 | 261 | ||
263 | /* Enable USB device clock */ | 262 | /* Enable USB device clock */ |
@@ -265,13 +264,13 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
265 | if (IS_ERR(usb_dev_clk)) { | 264 | if (IS_ERR(usb_dev_clk)) { |
266 | dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n"); | 265 | dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n"); |
267 | ret = PTR_ERR(usb_dev_clk); | 266 | ret = PTR_ERR(usb_dev_clk); |
268 | goto out4; | 267 | goto fail_dev; |
269 | } | 268 | } |
270 | 269 | ||
271 | ret = clk_enable(usb_dev_clk); | 270 | ret = clk_enable(usb_dev_clk); |
272 | if (ret < 0) { | 271 | if (ret < 0) { |
273 | dev_err(&pdev->dev, "failed to start USB DEV Clock\n"); | 272 | dev_err(&pdev->dev, "failed to start USB DEV Clock\n"); |
274 | goto out5; | 273 | goto fail_deven; |
275 | } | 274 | } |
276 | 275 | ||
277 | /* Enable USB otg clocks */ | 276 | /* Enable USB otg clocks */ |
@@ -279,7 +278,7 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
279 | if (IS_ERR(usb_otg_clk)) { | 278 | if (IS_ERR(usb_otg_clk)) { |
280 | dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n"); | 279 | dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n"); |
281 | ret = PTR_ERR(usb_otg_clk); | 280 | ret = PTR_ERR(usb_otg_clk); |
282 | goto out6; | 281 | goto fail_otg; |
283 | } | 282 | } |
284 | 283 | ||
285 | __raw_writel(__raw_readl(USB_CTRL) | USB_HOST_NEED_CLK_EN, USB_CTRL); | 284 | __raw_writel(__raw_readl(USB_CTRL) | USB_HOST_NEED_CLK_EN, USB_CTRL); |
@@ -287,7 +286,7 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
287 | ret = clk_enable(usb_otg_clk); | 286 | ret = clk_enable(usb_otg_clk); |
288 | if (ret < 0) { | 287 | if (ret < 0) { |
289 | dev_err(&pdev->dev, "failed to start USB DEV Clock\n"); | 288 | dev_err(&pdev->dev, "failed to start USB DEV Clock\n"); |
290 | goto out7; | 289 | goto fail_otgen; |
291 | } | 290 | } |
292 | 291 | ||
293 | isp1301_configure(); | 292 | isp1301_configure(); |
@@ -296,20 +295,14 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
296 | if (!hcd) { | 295 | if (!hcd) { |
297 | dev_err(&pdev->dev, "Failed to allocate HC buffer\n"); | 296 | dev_err(&pdev->dev, "Failed to allocate HC buffer\n"); |
298 | ret = -ENOMEM; | 297 | ret = -ENOMEM; |
299 | goto out8; | 298 | goto fail_hcd; |
300 | } | 299 | } |
301 | 300 | ||
302 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 301 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
303 | if (!res) { | ||
304 | dev_err(&pdev->dev, "Failed to get MEM resource\n"); | ||
305 | ret = -ENOMEM; | ||
306 | goto out8; | ||
307 | } | ||
308 | |||
309 | hcd->regs = devm_ioremap_resource(&pdev->dev, res); | 302 | hcd->regs = devm_ioremap_resource(&pdev->dev, res); |
310 | if (IS_ERR(hcd->regs)) { | 303 | if (IS_ERR(hcd->regs)) { |
311 | ret = PTR_ERR(hcd->regs); | 304 | ret = PTR_ERR(hcd->regs); |
312 | goto out8; | 305 | goto fail_resource; |
313 | } | 306 | } |
314 | hcd->rsrc_start = res->start; | 307 | hcd->rsrc_start = res->start; |
315 | hcd->rsrc_len = resource_size(res); | 308 | hcd->rsrc_len = resource_size(res); |
@@ -317,7 +310,7 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
317 | irq = platform_get_irq(pdev, 0); | 310 | irq = platform_get_irq(pdev, 0); |
318 | if (irq < 0) { | 311 | if (irq < 0) { |
319 | ret = -ENXIO; | 312 | ret = -ENXIO; |
320 | goto out8; | 313 | goto fail_resource; |
321 | } | 314 | } |
322 | 315 | ||
323 | nxp_start_hc(); | 316 | nxp_start_hc(); |
@@ -331,23 +324,24 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev) | |||
331 | return ret; | 324 | return ret; |
332 | 325 | ||
333 | nxp_stop_hc(); | 326 | nxp_stop_hc(); |
334 | out8: | 327 | fail_resource: |
335 | usb_put_hcd(hcd); | 328 | usb_put_hcd(hcd); |
336 | out7: | 329 | fail_hcd: |
337 | clk_disable(usb_otg_clk); | 330 | clk_disable(usb_otg_clk); |
338 | out6: | 331 | fail_otgen: |
339 | clk_put(usb_otg_clk); | 332 | clk_put(usb_otg_clk); |
340 | out5: | 333 | fail_otg: |
341 | clk_disable(usb_dev_clk); | 334 | clk_disable(usb_dev_clk); |
342 | out4: | 335 | fail_deven: |
343 | clk_put(usb_dev_clk); | 336 | clk_put(usb_dev_clk); |
344 | out3: | 337 | fail_dev: |
338 | fail_rate: | ||
345 | clk_disable(usb_pll_clk); | 339 | clk_disable(usb_pll_clk); |
346 | out2: | 340 | fail_pllen: |
347 | clk_put(usb_pll_clk); | 341 | clk_put(usb_pll_clk); |
348 | out1: | 342 | fail_pll: |
343 | fail_disable: | ||
349 | isp1301_i2c_client = NULL; | 344 | isp1301_i2c_client = NULL; |
350 | out: | ||
351 | return ret; | 345 | return ret; |
352 | } | 346 | } |
353 | 347 | ||
diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c index ddfc31427bc0..8663851c8d8e 100644 --- a/drivers/usb/host/ohci-omap3.c +++ b/drivers/usb/host/ohci-omap3.c | |||
@@ -114,8 +114,6 @@ static const struct hc_driver ohci_omap3_hc_driver = { | |||
114 | 114 | ||
115 | /*-------------------------------------------------------------------------*/ | 115 | /*-------------------------------------------------------------------------*/ |
116 | 116 | ||
117 | static u64 omap_ohci_dma_mask = DMA_BIT_MASK(32); | ||
118 | |||
119 | /* | 117 | /* |
120 | * configure so an HC device and id are always provided | 118 | * configure so an HC device and id are always provided |
121 | * always called with process context; sleeping is OK | 119 | * always called with process context; sleeping is OK |
@@ -168,8 +166,10 @@ static int ohci_hcd_omap3_probe(struct platform_device *pdev) | |||
168 | * Since shared usb code relies on it, set it here for now. | 166 | * Since shared usb code relies on it, set it here for now. |
169 | * Once we have dma capability bindings this can go away. | 167 | * Once we have dma capability bindings this can go away. |
170 | */ | 168 | */ |
171 | if (!pdev->dev.dma_mask) | 169 | if (!dev->dma_mask) |
172 | pdev->dev.dma_mask = &omap_ohci_dma_mask; | 170 | dev->dma_mask = &dev->coherent_dma_mask; |
171 | if (!dev->coherent_dma_mask) | ||
172 | dev->coherent_dma_mask = DMA_BIT_MASK(32); | ||
173 | 173 | ||
174 | hcd = usb_create_hcd(&ohci_omap3_hc_driver, dev, | 174 | hcd = usb_create_hcd(&ohci_omap3_hc_driver, dev, |
175 | dev_name(dev)); | 175 | dev_name(dev)); |
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index efe71f3ca477..279b2ef17411 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -282,8 +282,6 @@ static const struct of_device_id pxa_ohci_dt_ids[] = { | |||
282 | 282 | ||
283 | MODULE_DEVICE_TABLE(of, pxa_ohci_dt_ids); | 283 | MODULE_DEVICE_TABLE(of, pxa_ohci_dt_ids); |
284 | 284 | ||
285 | static u64 pxa_ohci_dma_mask = DMA_BIT_MASK(32); | ||
286 | |||
287 | static int ohci_pxa_of_init(struct platform_device *pdev) | 285 | static int ohci_pxa_of_init(struct platform_device *pdev) |
288 | { | 286 | { |
289 | struct device_node *np = pdev->dev.of_node; | 287 | struct device_node *np = pdev->dev.of_node; |
@@ -298,7 +296,9 @@ static int ohci_pxa_of_init(struct platform_device *pdev) | |||
298 | * Once we have dma capability bindings this can go away. | 296 | * Once we have dma capability bindings this can go away. |
299 | */ | 297 | */ |
300 | if (!pdev->dev.dma_mask) | 298 | if (!pdev->dev.dma_mask) |
301 | pdev->dev.dma_mask = &pxa_ohci_dma_mask; | 299 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
300 | if (!pdev->dev.coherent_dma_mask) | ||
301 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
302 | 302 | ||
303 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 303 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
304 | if (!pdata) | 304 | if (!pdata) |
diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c index 9020bf0e2eca..3e19e0170d11 100644 --- a/drivers/usb/host/ohci-spear.c +++ b/drivers/usb/host/ohci-spear.c | |||
@@ -91,8 +91,6 @@ static const struct hc_driver ohci_spear_hc_driver = { | |||
91 | .start_port_reset = ohci_start_port_reset, | 91 | .start_port_reset = ohci_start_port_reset, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static u64 spear_ohci_dma_mask = DMA_BIT_MASK(32); | ||
95 | |||
96 | static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) | 94 | static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) |
97 | { | 95 | { |
98 | const struct hc_driver *driver = &ohci_spear_hc_driver; | 96 | const struct hc_driver *driver = &ohci_spear_hc_driver; |
@@ -114,7 +112,9 @@ static int spear_ohci_hcd_drv_probe(struct platform_device *pdev) | |||
114 | * Once we have dma capability bindings this can go away. | 112 | * Once we have dma capability bindings this can go away. |
115 | */ | 113 | */ |
116 | if (!pdev->dev.dma_mask) | 114 | if (!pdev->dev.dma_mask) |
117 | pdev->dev.dma_mask = &spear_ohci_dma_mask; | 115 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
116 | if (!pdev->dev.coherent_dma_mask) | ||
117 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
118 | 118 | ||
119 | usbh_clk = devm_clk_get(&pdev->dev, NULL); | 119 | usbh_clk = devm_clk_get(&pdev->dev, NULL); |
120 | if (IS_ERR(usbh_clk)) { | 120 | if (IS_ERR(usbh_clk)) { |
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 4f0f0339532f..0f401dbfaf07 100644 --- a/drivers/usb/host/oxu210hp-hcd.c +++ b/drivers/usb/host/oxu210hp-hcd.c | |||
@@ -3084,7 +3084,7 @@ static int oxu_hub_status_data(struct usb_hcd *hcd, char *buf) | |||
3084 | int ports, i, retval = 1; | 3084 | int ports, i, retval = 1; |
3085 | unsigned long flags; | 3085 | unsigned long flags; |
3086 | 3086 | ||
3087 | /* if !USB_SUSPEND, root hub timers won't get shut down ... */ | 3087 | /* if !PM_RUNTIME, root hub timers won't get shut down ... */ |
3088 | if (!HC_IS_RUNNING(hcd->state)) | 3088 | if (!HC_IS_RUNNING(hcd->state)) |
3089 | return 0; | 3089 | return 0; |
3090 | 3090 | ||
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index ad4483efb6d6..b2ec7fe758dd 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * and usb-storage. | 22 | * and usb-storage. |
23 | * | 23 | * |
24 | * TODO: | 24 | * TODO: |
25 | * - usb suspend/resume triggered by sl811 (with USB_SUSPEND) | 25 | * - usb suspend/resume triggered by sl811 (with PM_RUNTIME) |
26 | * - various issues noted in the code | 26 | * - various issues noted in the code |
27 | * - performance work; use both register banks; ... | 27 | * - performance work; use both register banks; ... |
28 | * - use urb->iso_frame_desc[] with ISO transfers | 28 | * - use urb->iso_frame_desc[] with ISO transfers |
diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index f87bee6d2789..9189bc984c98 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c | |||
@@ -225,7 +225,8 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf) | |||
225 | /* auto-stop if nothing connected for 1 second */ | 225 | /* auto-stop if nothing connected for 1 second */ |
226 | if (any_ports_active(uhci)) | 226 | if (any_ports_active(uhci)) |
227 | uhci->rh_state = UHCI_RH_RUNNING; | 227 | uhci->rh_state = UHCI_RH_RUNNING; |
228 | else if (time_after_eq(jiffies, uhci->auto_stop_time)) | 228 | else if (time_after_eq(jiffies, uhci->auto_stop_time) && |
229 | !uhci->wait_for_hp) | ||
229 | suspend_rh(uhci, UHCI_RH_AUTO_STOPPED); | 230 | suspend_rh(uhci, UHCI_RH_AUTO_STOPPED); |
230 | break; | 231 | break; |
231 | 232 | ||
diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c index 8c4dace4b14a..f1db61ada6a8 100644 --- a/drivers/usb/host/uhci-platform.c +++ b/drivers/usb/host/uhci-platform.c | |||
@@ -60,8 +60,6 @@ static const struct hc_driver uhci_platform_hc_driver = { | |||
60 | .hub_control = uhci_hub_control, | 60 | .hub_control = uhci_hub_control, |
61 | }; | 61 | }; |
62 | 62 | ||
63 | static u64 platform_uhci_dma_mask = DMA_BIT_MASK(32); | ||
64 | |||
65 | static int uhci_hcd_platform_probe(struct platform_device *pdev) | 63 | static int uhci_hcd_platform_probe(struct platform_device *pdev) |
66 | { | 64 | { |
67 | struct usb_hcd *hcd; | 65 | struct usb_hcd *hcd; |
@@ -78,7 +76,9 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev) | |||
78 | * Once we have dma capability bindings this can go away. | 76 | * Once we have dma capability bindings this can go away. |
79 | */ | 77 | */ |
80 | if (!pdev->dev.dma_mask) | 78 | if (!pdev->dev.dma_mask) |
81 | pdev->dev.dma_mask = &platform_uhci_dma_mask; | 79 | pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; |
80 | if (!pdev->dev.coherent_dma_mask) | ||
81 | pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
82 | 82 | ||
83 | hcd = usb_create_hcd(&uhci_platform_hc_driver, &pdev->dev, | 83 | hcd = usb_create_hcd(&uhci_platform_hc_driver, &pdev->dev, |
84 | pdev->name); | 84 | pdev->name); |
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index f0976d8190bc..041c6ddb695c 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c | |||
@@ -1287,7 +1287,7 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, | |||
1287 | return -EINVAL; /* Can't change the period */ | 1287 | return -EINVAL; /* Can't change the period */ |
1288 | 1288 | ||
1289 | } else { | 1289 | } else { |
1290 | next = uhci->frame_number + 2; | 1290 | next = uhci->frame_number + 1; |
1291 | 1291 | ||
1292 | /* Find the next unused frame */ | 1292 | /* Find the next unused frame */ |
1293 | if (list_empty(&qh->queue)) { | 1293 | if (list_empty(&qh->queue)) { |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 965b539bc474..2cfc465925bd 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1423,15 +1423,17 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
1423 | ep_ctx->ep_info2 |= cpu_to_le32(xhci_get_endpoint_type(udev, ep)); | 1423 | ep_ctx->ep_info2 |= cpu_to_le32(xhci_get_endpoint_type(udev, ep)); |
1424 | 1424 | ||
1425 | /* Set the max packet size and max burst */ | 1425 | /* Set the max packet size and max burst */ |
1426 | max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&ep->desc)); | ||
1427 | max_burst = 0; | ||
1426 | switch (udev->speed) { | 1428 | switch (udev->speed) { |
1427 | case USB_SPEED_SUPER: | 1429 | case USB_SPEED_SUPER: |
1428 | max_packet = usb_endpoint_maxp(&ep->desc); | ||
1429 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet)); | ||
1430 | /* dig out max burst from ep companion desc */ | 1430 | /* dig out max burst from ep companion desc */ |
1431 | max_packet = ep->ss_ep_comp.bMaxBurst; | 1431 | max_burst = ep->ss_ep_comp.bMaxBurst; |
1432 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_BURST(max_packet)); | ||
1433 | break; | 1432 | break; |
1434 | case USB_SPEED_HIGH: | 1433 | case USB_SPEED_HIGH: |
1434 | /* Some devices get this wrong */ | ||
1435 | if (usb_endpoint_xfer_bulk(&ep->desc)) | ||
1436 | max_packet = 512; | ||
1435 | /* bits 11:12 specify the number of additional transaction | 1437 | /* bits 11:12 specify the number of additional transaction |
1436 | * opportunities per microframe (USB 2.0, section 9.6.6) | 1438 | * opportunities per microframe (USB 2.0, section 9.6.6) |
1437 | */ | 1439 | */ |
@@ -1439,17 +1441,16 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
1439 | usb_endpoint_xfer_int(&ep->desc)) { | 1441 | usb_endpoint_xfer_int(&ep->desc)) { |
1440 | max_burst = (usb_endpoint_maxp(&ep->desc) | 1442 | max_burst = (usb_endpoint_maxp(&ep->desc) |
1441 | & 0x1800) >> 11; | 1443 | & 0x1800) >> 11; |
1442 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_BURST(max_burst)); | ||
1443 | } | 1444 | } |
1444 | /* Fall through */ | 1445 | break; |
1445 | case USB_SPEED_FULL: | 1446 | case USB_SPEED_FULL: |
1446 | case USB_SPEED_LOW: | 1447 | case USB_SPEED_LOW: |
1447 | max_packet = GET_MAX_PACKET(usb_endpoint_maxp(&ep->desc)); | ||
1448 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet)); | ||
1449 | break; | 1448 | break; |
1450 | default: | 1449 | default: |
1451 | BUG(); | 1450 | BUG(); |
1452 | } | 1451 | } |
1452 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet) | | ||
1453 | MAX_BURST(max_burst)); | ||
1453 | max_esit_payload = xhci_get_max_esit_payload(xhci, udev, ep); | 1454 | max_esit_payload = xhci_get_max_esit_payload(xhci, udev, ep); |
1454 | ep_ctx->tx_info = cpu_to_le32(MAX_ESIT_PAYLOAD_FOR_EP(max_esit_payload)); | 1455 | ep_ctx->tx_info = cpu_to_le32(MAX_ESIT_PAYLOAD_FOR_EP(max_esit_payload)); |
1455 | 1456 | ||