aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/Kconfig8
-rw-r--r--drivers/usb/host/ehci-au1xxx.c1
-rw-r--r--drivers/usb/host/ehci-fsl.c7
-rw-r--r--drivers/usb/host/ehci-hub.c16
-rw-r--r--drivers/usb/host/ehci-ixp4xx.c4
-rw-r--r--drivers/usb/host/ehci-orion.c10
-rw-r--r--drivers/usb/host/ehci-pci.c4
-rw-r--r--drivers/usb/host/ehci-ppc-of.c2
-rw-r--r--drivers/usb/host/ehci-ppc-soc.c1
-rw-r--r--drivers/usb/host/ehci-ps3.c1
-rw-r--r--drivers/usb/host/ehci-sched.c67
-rw-r--r--drivers/usb/host/ehci.h5
-rw-r--r--drivers/usb/host/isp1760-hcd.c8
-rw-r--r--drivers/usb/host/isp1760-if.c4
14 files changed, 88 insertions, 50 deletions
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 1ef6df395e0c..228797e54f9c 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -300,8 +300,8 @@ config USB_R8A66597_HCD
300 module will be called r8a66597-hcd. 300 module will be called r8a66597-hcd.
301 301
302config SUPERH_ON_CHIP_R8A66597 302config SUPERH_ON_CHIP_R8A66597
303 boolean "Enable SuperH on-chip USB like the R8A66597" 303 boolean "Enable SuperH on-chip R8A66597 USB"
304 depends on USB_R8A66597_HCD && CPU_SUBTYPE_SH7366 304 depends on USB_R8A66597_HCD && (CPU_SUBTYPE_SH7366 || CPU_SUBTYPE_SH7723)
305 help 305 help
306 Renesas SuperH processor has USB like the R8A66597. 306 This driver enables support for the on-chip R8A66597 in the
307 This driver supported processor is SH7366. 307 SH7366 and SH7723 processors.
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
index 8b5f991e949c..08a4335401a9 100644
--- a/drivers/usb/host/ehci-au1xxx.c
+++ b/drivers/usb/host/ehci-au1xxx.c
@@ -223,6 +223,7 @@ static const struct hc_driver ehci_au1xxx_hc_driver = {
223 .bus_suspend = ehci_bus_suspend, 223 .bus_suspend = ehci_bus_suspend,
224 .bus_resume = ehci_bus_resume, 224 .bus_resume = ehci_bus_resume,
225 .relinquish_port = ehci_relinquish_port, 225 .relinquish_port = ehci_relinquish_port,
226 .port_handed_over = ehci_port_handed_over,
226}; 227};
227 228
228/*-------------------------------------------------------------------------*/ 229/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 6d9bed6c1f48..7370d6187c64 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -269,7 +269,7 @@ static int ehci_fsl_setup(struct usb_hcd *hcd)
269 if (retval) 269 if (retval)
270 return retval; 270 return retval;
271 271
272 ehci->is_tdi_rh_tt = 1; 272 hcd->has_tt = 1;
273 273
274 ehci->sbrn = 0x20; 274 ehci->sbrn = 0x20;
275 275
@@ -295,10 +295,6 @@ static const struct hc_driver ehci_fsl_hc_driver = {
295 */ 295 */
296 .reset = ehci_fsl_setup, 296 .reset = ehci_fsl_setup,
297 .start = ehci_run, 297 .start = ehci_run,
298#ifdef CONFIG_PM
299 .suspend = ehci_bus_suspend,
300 .resume = ehci_bus_resume,
301#endif
302 .stop = ehci_stop, 298 .stop = ehci_stop,
303 .shutdown = ehci_shutdown, 299 .shutdown = ehci_shutdown,
304 300
@@ -322,6 +318,7 @@ static const struct hc_driver ehci_fsl_hc_driver = {
322 .bus_suspend = ehci_bus_suspend, 318 .bus_suspend = ehci_bus_suspend,
323 .bus_resume = ehci_bus_resume, 319 .bus_resume = ehci_bus_resume,
324 .relinquish_port = ehci_relinquish_port, 320 .relinquish_port = ehci_relinquish_port,
321 .port_handed_over = ehci_port_handed_over,
325}; 322};
326 323
327static int ehci_fsl_drv_probe(struct platform_device *pdev) 324static int ehci_fsl_drv_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 382587c4457c..740835bb8575 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -609,7 +609,7 @@ static int ehci_hub_control (
609 } 609 }
610 break; 610 break;
611 case USB_PORT_FEAT_C_SUSPEND: 611 case USB_PORT_FEAT_C_SUSPEND:
612 /* we auto-clear this feature */ 612 clear_bit(wIndex, &ehci->port_c_suspend);
613 break; 613 break;
614 case USB_PORT_FEAT_POWER: 614 case USB_PORT_FEAT_POWER:
615 if (HCS_PPC (ehci->hcs_params)) 615 if (HCS_PPC (ehci->hcs_params))
@@ -688,7 +688,7 @@ static int ehci_hub_control (
688 /* resume completed? */ 688 /* resume completed? */
689 else if (time_after_eq(jiffies, 689 else if (time_after_eq(jiffies,
690 ehci->reset_done[wIndex])) { 690 ehci->reset_done[wIndex])) {
691 status |= 1 << USB_PORT_FEAT_C_SUSPEND; 691 set_bit(wIndex, &ehci->port_c_suspend);
692 ehci->reset_done[wIndex] = 0; 692 ehci->reset_done[wIndex] = 0;
693 693
694 /* stop resume signaling */ 694 /* stop resume signaling */
@@ -765,6 +765,8 @@ static int ehci_hub_control (
765 status |= 1 << USB_PORT_FEAT_RESET; 765 status |= 1 << USB_PORT_FEAT_RESET;
766 if (temp & PORT_POWER) 766 if (temp & PORT_POWER)
767 status |= 1 << USB_PORT_FEAT_POWER; 767 status |= 1 << USB_PORT_FEAT_POWER;
768 if (test_bit(wIndex, &ehci->port_c_suspend))
769 status |= 1 << USB_PORT_FEAT_C_SUSPEND;
768 770
769#ifndef VERBOSE_DEBUG 771#ifndef VERBOSE_DEBUG
770 if (status & ~0xffff) /* only if wPortChange is interesting */ 772 if (status & ~0xffff) /* only if wPortChange is interesting */
@@ -875,3 +877,13 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum)
875 set_owner(ehci, --portnum, PORT_OWNER); 877 set_owner(ehci, --portnum, PORT_OWNER);
876} 878}
877 879
880static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum)
881{
882 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
883 u32 __iomem *reg;
884
885 if (ehci_is_TDI(ehci))
886 return 0;
887 reg = &ehci->regs->port_status[portnum - 1];
888 return ehci_readl(ehci, reg) & PORT_OWNER;
889}
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c
index 601c8795a854..9d042f220097 100644
--- a/drivers/usb/host/ehci-ixp4xx.c
+++ b/drivers/usb/host/ehci-ixp4xx.c
@@ -26,7 +26,7 @@ static int ixp4xx_ehci_init(struct usb_hcd *hcd)
26 + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); 26 + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
27 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); 27 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
28 28
29 ehci->is_tdi_rh_tt = 1; 29 hcd->has_tt = 1;
30 ehci_reset(ehci); 30 ehci_reset(ehci);
31 31
32 retval = ehci_init(hcd); 32 retval = ehci_init(hcd);
@@ -58,6 +58,8 @@ static const struct hc_driver ixp4xx_ehci_hc_driver = {
58 .bus_suspend = ehci_bus_suspend, 58 .bus_suspend = ehci_bus_suspend,
59 .bus_resume = ehci_bus_resume, 59 .bus_resume = ehci_bus_resume,
60#endif 60#endif
61 .relinquish_port = ehci_relinquish_port,
62 .port_handed_over = ehci_port_handed_over,
61}; 63};
62 64
63static int ixp4xx_ehci_probe(struct platform_device *pdev) 65static int ixp4xx_ehci_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index d187d0313742..ab625f0ba1d9 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -115,6 +115,8 @@ static int ehci_orion_setup(struct usb_hcd *hcd)
115 if (retval) 115 if (retval)
116 return retval; 116 return retval;
117 117
118 hcd->has_tt = 1;
119
118 ehci_reset(ehci); 120 ehci_reset(ehci);
119 ehci_port_power(ehci, 0); 121 ehci_port_power(ehci, 0);
120 122
@@ -137,10 +139,6 @@ static const struct hc_driver ehci_orion_hc_driver = {
137 */ 139 */
138 .reset = ehci_orion_setup, 140 .reset = ehci_orion_setup,
139 .start = ehci_run, 141 .start = ehci_run,
140#ifdef CONFIG_PM
141 .suspend = ehci_bus_suspend,
142 .resume = ehci_bus_resume,
143#endif
144 .stop = ehci_stop, 142 .stop = ehci_stop,
145 .shutdown = ehci_shutdown, 143 .shutdown = ehci_shutdown,
146 144
@@ -163,6 +161,8 @@ static const struct hc_driver ehci_orion_hc_driver = {
163 .hub_control = ehci_hub_control, 161 .hub_control = ehci_hub_control,
164 .bus_suspend = ehci_bus_suspend, 162 .bus_suspend = ehci_bus_suspend,
165 .bus_resume = ehci_bus_resume, 163 .bus_resume = ehci_bus_resume,
164 .relinquish_port = ehci_relinquish_port,
165 .port_handed_over = ehci_port_handed_over,
166}; 166};
167 167
168static void __init 168static void __init
@@ -248,7 +248,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
248 ehci->regs = hcd->regs + 0x100 + 248 ehci->regs = hcd->regs + 0x100 +
249 HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); 249 HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
250 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); 250 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
251 ehci->is_tdi_rh_tt = 1; 251 hcd->has_tt = 1;
252 ehci->sbrn = 0x20; 252 ehci->sbrn = 0x20;
253 253
254 /* 254 /*
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 5bb7f6bb13f3..c46a58f9181d 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -129,7 +129,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
129 switch (pdev->vendor) { 129 switch (pdev->vendor) {
130 case PCI_VENDOR_ID_TDI: 130 case PCI_VENDOR_ID_TDI:
131 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { 131 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
132 ehci->is_tdi_rh_tt = 1;
133 hcd->has_tt = 1; 132 hcd->has_tt = 1;
134 tdi_reset(ehci); 133 tdi_reset(ehci);
135 } 134 }
@@ -379,7 +378,8 @@ static const struct hc_driver ehci_pci_hc_driver = {
379 .hub_control = ehci_hub_control, 378 .hub_control = ehci_hub_control,
380 .bus_suspend = ehci_bus_suspend, 379 .bus_suspend = ehci_bus_suspend,
381 .bus_resume = ehci_bus_resume, 380 .bus_resume = ehci_bus_resume,
382 .relinquish_port = ehci_relinquish_port, 381 .relinquish_port = ehci_relinquish_port,
382 .port_handed_over = ehci_port_handed_over,
383}; 383};
384 384
385/*-------------------------------------------------------------------------*/ 385/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index ee305b1f99ff..b018deed2e8f 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -76,6 +76,8 @@ static const struct hc_driver ehci_ppc_of_hc_driver = {
76 .bus_suspend = ehci_bus_suspend, 76 .bus_suspend = ehci_bus_suspend,
77 .bus_resume = ehci_bus_resume, 77 .bus_resume = ehci_bus_resume,
78#endif 78#endif
79 .relinquish_port = ehci_relinquish_port,
80 .port_handed_over = ehci_port_handed_over,
79}; 81};
80 82
81 83
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c
index 6c76036783a1..529590eb4037 100644
--- a/drivers/usb/host/ehci-ppc-soc.c
+++ b/drivers/usb/host/ehci-ppc-soc.c
@@ -163,6 +163,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = {
163 .bus_suspend = ehci_bus_suspend, 163 .bus_suspend = ehci_bus_suspend,
164 .bus_resume = ehci_bus_resume, 164 .bus_resume = ehci_bus_resume,
165 .relinquish_port = ehci_relinquish_port, 165 .relinquish_port = ehci_relinquish_port,
166 .port_handed_over = ehci_port_handed_over,
166}; 167};
167 168
168static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) 169static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
index 69782221bcf3..37e6abeb794c 100644
--- a/drivers/usb/host/ehci-ps3.c
+++ b/drivers/usb/host/ehci-ps3.c
@@ -73,6 +73,7 @@ static const struct hc_driver ps3_ehci_hc_driver = {
73 .bus_resume = ehci_bus_resume, 73 .bus_resume = ehci_bus_resume,
74#endif 74#endif
75 .relinquish_port = ehci_relinquish_port, 75 .relinquish_port = ehci_relinquish_port,
76 .port_handed_over = ehci_port_handed_over,
76}; 77};
77 78
78static int ps3_ehci_probe(struct ps3_system_bus_device *dev) 79static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index be575e46eac3..b7853c8bac0f 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1349,18 +1349,27 @@ iso_stream_schedule (
1349 /* when's the last uframe this urb could start? */ 1349 /* when's the last uframe this urb could start? */
1350 max = now + mod; 1350 max = now + mod;
1351 1351
1352 /* typical case: reuse current schedule. stream is still active, 1352 /* Typical case: reuse current schedule, stream is still active.
1353 * and no gaps from host falling behind (irq delays etc) 1353 * Hopefully there are no gaps from the host falling behind
1354 * (irq delays etc), but if there are we'll take the next
1355 * slot in the schedule, implicitly assuming URB_ISO_ASAP.
1354 */ 1356 */
1355 if (likely (!list_empty (&stream->td_list))) { 1357 if (likely (!list_empty (&stream->td_list))) {
1356 start = stream->next_uframe; 1358 start = stream->next_uframe;
1357 if (start < now) 1359 if (start < now)
1358 start += mod; 1360 start += mod;
1359 if (likely ((start + sched->span) < max)) 1361
1360 goto ready; 1362 /* Fell behind (by up to twice the slop amount)? */
1361 /* else fell behind; someday, try to reschedule */ 1363 if (start >= max - 2 * 8 * SCHEDULE_SLOP)
1362 status = -EL2NSYNC; 1364 start += stream->interval * DIV_ROUND_UP(
1363 goto fail; 1365 max - start, stream->interval) - mod;
1366
1367 /* Tried to schedule too far into the future? */
1368 if (unlikely((start + sched->span) >= max)) {
1369 status = -EFBIG;
1370 goto fail;
1371 }
1372 goto ready;
1364 } 1373 }
1365 1374
1366 /* need to schedule; when's the next (u)frame we could start? 1375 /* need to schedule; when's the next (u)frame we could start?
@@ -1613,6 +1622,9 @@ itd_complete (
1613 } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) { 1622 } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) {
1614 desc->status = 0; 1623 desc->status = 0;
1615 desc->actual_length = EHCI_ITD_LENGTH (t); 1624 desc->actual_length = EHCI_ITD_LENGTH (t);
1625 } else {
1626 /* URB was too late */
1627 desc->status = -EXDEV;
1616 } 1628 }
1617 } 1629 }
1618 1630
@@ -2095,7 +2107,7 @@ done:
2095static void 2107static void
2096scan_periodic (struct ehci_hcd *ehci) 2108scan_periodic (struct ehci_hcd *ehci)
2097{ 2109{
2098 unsigned frame, clock, now_uframe, mod; 2110 unsigned now_uframe, frame, clock, clock_frame, mod;
2099 unsigned modified; 2111 unsigned modified;
2100 2112
2101 mod = ehci->periodic_size << 3; 2113 mod = ehci->periodic_size << 3;
@@ -2111,6 +2123,7 @@ scan_periodic (struct ehci_hcd *ehci)
2111 else 2123 else
2112 clock = now_uframe + mod - 1; 2124 clock = now_uframe + mod - 1;
2113 clock %= mod; 2125 clock %= mod;
2126 clock_frame = clock >> 3;
2114 2127
2115 for (;;) { 2128 for (;;) {
2116 union ehci_shadow q, *q_p; 2129 union ehci_shadow q, *q_p;
@@ -2157,22 +2170,26 @@ restart:
2157 case Q_TYPE_ITD: 2170 case Q_TYPE_ITD:
2158 /* If this ITD is still active, leave it for 2171 /* If this ITD is still active, leave it for
2159 * later processing ... check the next entry. 2172 * later processing ... check the next entry.
2173 * No need to check for activity unless the
2174 * frame is current.
2160 */ 2175 */
2161 rmb (); 2176 if (frame == clock_frame && live) {
2162 for (uf = 0; uf < 8 && live; uf++) { 2177 rmb();
2163 if (0 == (q.itd->hw_transaction [uf] 2178 for (uf = 0; uf < 8; uf++) {
2164 & ITD_ACTIVE(ehci))) 2179 if (q.itd->hw_transaction[uf] &
2165 continue; 2180 ITD_ACTIVE(ehci))
2166 incomplete = true; 2181 break;
2167 q_p = &q.itd->itd_next; 2182 }
2168 hw_p = &q.itd->hw_next; 2183 if (uf < 8) {
2169 type = Q_NEXT_TYPE(ehci, 2184 incomplete = true;
2185 q_p = &q.itd->itd_next;
2186 hw_p = &q.itd->hw_next;
2187 type = Q_NEXT_TYPE(ehci,
2170 q.itd->hw_next); 2188 q.itd->hw_next);
2171 q = *q_p; 2189 q = *q_p;
2172 break; 2190 break;
2191 }
2173 } 2192 }
2174 if (uf < 8 && live)
2175 break;
2176 2193
2177 /* Take finished ITDs out of the schedule 2194 /* Take finished ITDs out of the schedule
2178 * and process them: recycle, maybe report 2195 * and process them: recycle, maybe report
@@ -2189,9 +2206,12 @@ restart:
2189 case Q_TYPE_SITD: 2206 case Q_TYPE_SITD:
2190 /* If this SITD is still active, leave it for 2207 /* If this SITD is still active, leave it for
2191 * later processing ... check the next entry. 2208 * later processing ... check the next entry.
2209 * No need to check for activity unless the
2210 * frame is current.
2192 */ 2211 */
2193 if ((q.sitd->hw_results & SITD_ACTIVE(ehci)) 2212 if (frame == clock_frame && live &&
2194 && live) { 2213 (q.sitd->hw_results &
2214 SITD_ACTIVE(ehci))) {
2195 incomplete = true; 2215 incomplete = true;
2196 q_p = &q.sitd->sitd_next; 2216 q_p = &q.sitd->sitd_next;
2197 hw_p = &q.sitd->hw_next; 2217 hw_p = &q.sitd->hw_next;
@@ -2260,6 +2280,7 @@ restart:
2260 2280
2261 /* rescan the rest of this frame, then ... */ 2281 /* rescan the rest of this frame, then ... */
2262 clock = now; 2282 clock = now;
2283 clock_frame = clock >> 3;
2263 } else { 2284 } else {
2264 now_uframe++; 2285 now_uframe++;
2265 now_uframe %= mod; 2286 now_uframe %= mod;
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index bf92d209a1a9..35a03095757e 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -97,6 +97,8 @@ struct ehci_hcd { /* one per controller */
97 dedicated to the companion controller */ 97 dedicated to the companion controller */
98 unsigned long owned_ports; /* which ports are 98 unsigned long owned_ports; /* which ports are
99 owned by the companion during a bus suspend */ 99 owned by the companion during a bus suspend */
100 unsigned long port_c_suspend; /* which ports have
101 the change-suspend feature turned on */
100 102
101 /* per-HC memory pools (could be per-bus, but ...) */ 103 /* per-HC memory pools (could be per-bus, but ...) */
102 struct dma_pool *qh_pool; /* qh per active urb */ 104 struct dma_pool *qh_pool; /* qh per active urb */
@@ -112,7 +114,6 @@ struct ehci_hcd { /* one per controller */
112 u32 command; 114 u32 command;
113 115
114 /* SILICON QUIRKS */ 116 /* SILICON QUIRKS */
115 unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */
116 unsigned no_selective_suspend:1; 117 unsigned no_selective_suspend:1;
117 unsigned has_fsl_port_bug:1; /* FreeScale */ 118 unsigned has_fsl_port_bug:1; /* FreeScale */
118 unsigned big_endian_mmio:1; 119 unsigned big_endian_mmio:1;
@@ -678,7 +679,7 @@ struct ehci_fstn {
678 * needed (mostly in root hub code). 679 * needed (mostly in root hub code).
679 */ 680 */
680 681
681#define ehci_is_TDI(e) ((e)->is_tdi_rh_tt) 682#define ehci_is_TDI(e) (ehci_to_hcd(e)->has_tt)
682 683
683/* Returns the speed of a device attached to a port on the root hub. */ 684/* Returns the speed of a device attached to a port on the root hub. */
684static inline unsigned int 685static inline unsigned int
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index c9cec8738261..65aa5ecf569a 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -2207,14 +2207,14 @@ struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq,
2207 goto err_put; 2207 goto err_put;
2208 } 2208 }
2209 2209
2210 ret = usb_add_hcd(hcd, irq, irqflags);
2211 if (ret)
2212 goto err_unmap;
2213
2214 hcd->irq = irq; 2210 hcd->irq = irq;
2215 hcd->rsrc_start = res_start; 2211 hcd->rsrc_start = res_start;
2216 hcd->rsrc_len = res_len; 2212 hcd->rsrc_len = res_len;
2217 2213
2214 ret = usb_add_hcd(hcd, irq, irqflags);
2215 if (ret)
2216 goto err_unmap;
2217
2218 return hcd; 2218 return hcd;
2219 2219
2220err_unmap: 2220err_unmap:
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 440bf94f0d4c..c9db3fe98726 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -104,8 +104,8 @@ static u32 nxp_pci_io_base;
104static u32 iolength; 104static u32 iolength;
105static u32 pci_mem_phy0; 105static u32 pci_mem_phy0;
106static u32 length; 106static u32 length;
107static u8 *chip_addr; 107static u8 __iomem *chip_addr;
108static u8 *iobase; 108static u8 __iomem *iobase;
109 109
110static int __devinit isp1761_pci_probe(struct pci_dev *dev, 110static int __devinit isp1761_pci_probe(struct pci_dev *dev,
111 const struct pci_device_id *id) 111 const struct pci_device_id *id)