aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-11 04:46:50 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-11 04:46:50 -0400
commit0c81b2a1448bc6a2a9b2d6469fb0669fb4b25e5b (patch)
tree6f82579cae6d6e39fa9f837a3c349ded51e19d14 /drivers/usb/host
parent0729fbf3bc70870370b4f43d652f05a468dc68b8 (diff)
parent70ff05554f91a1edda1f11684da1dbde09e2feea (diff)
Merge branch 'linus' into core/rcu
Conflicts: include/linux/rculist.h kernel/rcupreempt.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci.h19
-rw-r--r--drivers/usb/host/ohci-at91.c1
-rw-r--r--drivers/usb/host/ohci-au1xxx.c1
-rw-r--r--drivers/usb/host/ohci-ep93xx.c1
-rw-r--r--drivers/usb/host/ohci-hcd.c15
-rw-r--r--drivers/usb/host/ohci-hub.c53
-rw-r--r--drivers/usb/host/ohci-lh7a404.c1
-rw-r--r--drivers/usb/host/ohci-omap.c1
-rw-r--r--drivers/usb/host/ohci-pci.c1
-rw-r--r--drivers/usb/host/ohci-pnx4008.c1
-rw-r--r--drivers/usb/host/ohci-pnx8550.c1
-rw-r--r--drivers/usb/host/ohci-ppc-of.c1
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c1
-rw-r--r--drivers/usb/host/ohci-ps3.c1
-rw-r--r--drivers/usb/host/ohci-pxa27x.c1
-rw-r--r--drivers/usb/host/ohci-q.c12
-rw-r--r--drivers/usb/host/ohci-s3c2410.c1
-rw-r--r--drivers/usb/host/ohci-sa1111.c1
-rw-r--r--drivers/usb/host/ohci-sh.c1
-rw-r--r--drivers/usb/host/ohci-sm501.c1
-rw-r--r--drivers/usb/host/ohci-ssb.c1
-rw-r--r--drivers/usb/host/u132-hcd.c11
22 files changed, 86 insertions, 41 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 35a03095757e..90245fd8bac4 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -177,6 +177,15 @@ timer_action_done (struct ehci_hcd *ehci, enum ehci_timer_action action)
177static inline void 177static inline void
178timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) 178timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
179{ 179{
180 /* Don't override timeouts which shrink or (later) disable
181 * the async ring; just the I/O watchdog. Note that if a
182 * SHRINK were pending, OFF would never be requested.
183 */
184 if (timer_pending(&ehci->watchdog)
185 && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
186 & ehci->actions))
187 return;
188
180 if (!test_and_set_bit (action, &ehci->actions)) { 189 if (!test_and_set_bit (action, &ehci->actions)) {
181 unsigned long t; 190 unsigned long t;
182 191
@@ -192,15 +201,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
192 t = EHCI_SHRINK_JIFFIES; 201 t = EHCI_SHRINK_JIFFIES;
193 break; 202 break;
194 } 203 }
195 t += jiffies; 204 mod_timer(&ehci->watchdog, t + jiffies);
196 // all timings except IAA watchdog can be overridden.
197 // async queue SHRINK often precedes IAA. while it's ready
198 // to go OFF neither can matter, and afterwards the IO
199 // watchdog stops unless there's still periodic traffic.
200 if (time_before_eq(t, ehci->watchdog.expires)
201 && timer_pending (&ehci->watchdog))
202 return;
203 mod_timer (&ehci->watchdog, t);
204 } 205 }
205} 206}
206 207
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index c96db1153dcf..e534f9de0f05 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -261,6 +261,7 @@ static const struct hc_driver ohci_at91_hc_driver = {
261 */ 261 */
262 .hub_status_data = ohci_hub_status_data, 262 .hub_status_data = ohci_hub_status_data,
263 .hub_control = ohci_hub_control, 263 .hub_control = ohci_hub_control,
264 .hub_irq_enable = ohci_rhsc_enable,
264#ifdef CONFIG_PM 265#ifdef CONFIG_PM
265 .bus_suspend = ohci_bus_suspend, 266 .bus_suspend = ohci_bus_suspend,
266 .bus_resume = ohci_bus_resume, 267 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
index 1b9abdba920b..f90fe0c7373f 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -288,6 +288,7 @@ static const struct hc_driver ohci_au1xxx_hc_driver = {
288 */ 288 */
289 .hub_status_data = ohci_hub_status_data, 289 .hub_status_data = ohci_hub_status_data,
290 .hub_control = ohci_hub_control, 290 .hub_control = ohci_hub_control,
291 .hub_irq_enable = ohci_rhsc_enable,
291#ifdef CONFIG_PM 292#ifdef CONFIG_PM
292 .bus_suspend = ohci_bus_suspend, 293 .bus_suspend = ohci_bus_suspend,
293 .bus_resume = ohci_bus_resume, 294 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c
index 06aadfb0ec29..5adaf36e47d0 100644
--- a/drivers/usb/host/ohci-ep93xx.c
+++ b/drivers/usb/host/ohci-ep93xx.c
@@ -135,6 +135,7 @@ static struct hc_driver ohci_ep93xx_hc_driver = {
135 .get_frame_number = ohci_get_frame, 135 .get_frame_number = ohci_get_frame,
136 .hub_status_data = ohci_hub_status_data, 136 .hub_status_data = ohci_hub_status_data,
137 .hub_control = ohci_hub_control, 137 .hub_control = ohci_hub_control,
138 .hub_irq_enable = ohci_rhsc_enable,
138#ifdef CONFIG_PM 139#ifdef CONFIG_PM
139 .bus_suspend = ohci_bus_suspend, 140 .bus_suspend = ohci_bus_suspend,
140 .bus_resume = ohci_bus_resume, 141 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 33f1c1c32edf..a8160d65f32b 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1054,7 +1054,7 @@ MODULE_LICENSE ("GPL");
1054 1054
1055#ifdef CONFIG_MFD_SM501 1055#ifdef CONFIG_MFD_SM501
1056#include "ohci-sm501.c" 1056#include "ohci-sm501.c"
1057#define PLATFORM_DRIVER ohci_hcd_sm501_driver 1057#define SM501_OHCI_DRIVER ohci_hcd_sm501_driver
1058#endif 1058#endif
1059 1059
1060#if !defined(PCI_DRIVER) && \ 1060#if !defined(PCI_DRIVER) && \
@@ -1062,6 +1062,7 @@ MODULE_LICENSE ("GPL");
1062 !defined(OF_PLATFORM_DRIVER) && \ 1062 !defined(OF_PLATFORM_DRIVER) && \
1063 !defined(SA1111_DRIVER) && \ 1063 !defined(SA1111_DRIVER) && \
1064 !defined(PS3_SYSTEM_BUS_DRIVER) && \ 1064 !defined(PS3_SYSTEM_BUS_DRIVER) && \
1065 !defined(SM501_OHCI_DRIVER) && \
1065 !defined(SSB_OHCI_DRIVER) 1066 !defined(SSB_OHCI_DRIVER)
1066#error "missing bus glue for ohci-hcd" 1067#error "missing bus glue for ohci-hcd"
1067#endif 1068#endif
@@ -1121,9 +1122,18 @@ static int __init ohci_hcd_mod_init(void)
1121 goto error_ssb; 1122 goto error_ssb;
1122#endif 1123#endif
1123 1124
1125#ifdef SM501_OHCI_DRIVER
1126 retval = platform_driver_register(&SM501_OHCI_DRIVER);
1127 if (retval < 0)
1128 goto error_sm501;
1129#endif
1130
1124 return retval; 1131 return retval;
1125 1132
1126 /* Error path */ 1133 /* Error path */
1134#ifdef SM501_OHCI_DRIVER
1135 error_sm501:
1136#endif
1127#ifdef SSB_OHCI_DRIVER 1137#ifdef SSB_OHCI_DRIVER
1128 error_ssb: 1138 error_ssb:
1129#endif 1139#endif
@@ -1159,6 +1169,9 @@ module_init(ohci_hcd_mod_init);
1159 1169
1160static void __exit ohci_hcd_mod_exit(void) 1170static void __exit ohci_hcd_mod_exit(void)
1161{ 1171{
1172#ifdef SM501_OHCI_DRIVER
1173 platform_driver_unregister(&SM501_OHCI_DRIVER);
1174#endif
1162#ifdef SSB_OHCI_DRIVER 1175#ifdef SSB_OHCI_DRIVER
1163 ssb_driver_unregister(&SSB_OHCI_DRIVER); 1176 ssb_driver_unregister(&SSB_OHCI_DRIVER);
1164#endif 1177#endif
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 79a78029f896..b56739221d11 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -36,6 +36,18 @@
36 36
37/*-------------------------------------------------------------------------*/ 37/*-------------------------------------------------------------------------*/
38 38
39/* hcd->hub_irq_enable() */
40static void ohci_rhsc_enable (struct usb_hcd *hcd)
41{
42 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
43
44 spin_lock_irq(&ohci->lock);
45 if (!ohci->autostop)
46 del_timer(&hcd->rh_timer); /* Prevent next poll */
47 ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);
48 spin_unlock_irq(&ohci->lock);
49}
50
39#define OHCI_SCHED_ENABLES \ 51#define OHCI_SCHED_ENABLES \
40 (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE) 52 (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE)
41 53
@@ -362,28 +374,18 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
362 int any_connected) 374 int any_connected)
363{ 375{
364 int poll_rh = 1; 376 int poll_rh = 1;
365 int rhsc;
366 377
367 rhsc = ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC;
368 switch (ohci->hc_control & OHCI_CTRL_HCFS) { 378 switch (ohci->hc_control & OHCI_CTRL_HCFS) {
369 379
370 case OHCI_USB_OPER: 380 case OHCI_USB_OPER:
371 /* If no status changes are pending, enable status-change 381 /* keep on polling until we know a device is connected
372 * interrupts. 382 * and RHSC is enabled */
373 */
374 if (!rhsc && !changed) {
375 rhsc = OHCI_INTR_RHSC;
376 ohci_writel(ohci, rhsc, &ohci->regs->intrenable);
377 }
378
379 /* Keep on polling until we know a device is connected
380 * and RHSC is enabled, or until we autostop.
381 */
382 if (!ohci->autostop) { 383 if (!ohci->autostop) {
383 if (any_connected || 384 if (any_connected ||
384 !device_may_wakeup(&ohci_to_hcd(ohci) 385 !device_may_wakeup(&ohci_to_hcd(ohci)
385 ->self.root_hub->dev)) { 386 ->self.root_hub->dev)) {
386 if (rhsc) 387 if (ohci_readl(ohci, &ohci->regs->intrenable) &
388 OHCI_INTR_RHSC)
387 poll_rh = 0; 389 poll_rh = 0;
388 } else { 390 } else {
389 ohci->autostop = 1; 391 ohci->autostop = 1;
@@ -396,13 +398,12 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
396 ohci->autostop = 0; 398 ohci->autostop = 0;
397 ohci->next_statechange = jiffies + 399 ohci->next_statechange = jiffies +
398 STATECHANGE_DELAY; 400 STATECHANGE_DELAY;
399 } else if (rhsc && time_after_eq(jiffies, 401 } else if (time_after_eq(jiffies,
400 ohci->next_statechange) 402 ohci->next_statechange)
401 && !ohci->ed_rm_list 403 && !ohci->ed_rm_list
402 && !(ohci->hc_control & 404 && !(ohci->hc_control &
403 OHCI_SCHED_ENABLES)) { 405 OHCI_SCHED_ENABLES)) {
404 ohci_rh_suspend(ohci, 1); 406 ohci_rh_suspend(ohci, 1);
405 poll_rh = 0;
406 } 407 }
407 } 408 }
408 break; 409 break;
@@ -416,12 +417,6 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
416 else 417 else
417 usb_hcd_resume_root_hub(ohci_to_hcd(ohci)); 418 usb_hcd_resume_root_hub(ohci_to_hcd(ohci));
418 } else { 419 } else {
419 if (!rhsc && (ohci->autostop ||
420 ohci_to_hcd(ohci)->self.root_hub->
421 do_remote_wakeup))
422 ohci_writel(ohci, OHCI_INTR_RHSC,
423 &ohci->regs->intrenable);
424
425 /* everything is idle, no need for polling */ 420 /* everything is idle, no need for polling */
426 poll_rh = 0; 421 poll_rh = 0;
427 } 422 }
@@ -443,16 +438,12 @@ static inline int ohci_rh_resume(struct ohci_hcd *ohci)
443static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed, 438static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
444 int any_connected) 439 int any_connected)
445{ 440{
446 /* If RHSC is enabled, don't poll */ 441 int poll_rh = 1;
447 if (ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC)
448 return 0;
449 442
450 /* If no status changes are pending, enable status-change interrupts */ 443 /* keep on polling until RHSC is enabled */
451 if (!changed) { 444 if (ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC)
452 ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable); 445 poll_rh = 0;
453 return 0; 446 return poll_rh;
454 }
455 return 1;
456} 447}
457 448
458#endif /* CONFIG_PM */ 449#endif /* CONFIG_PM */
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
index 96d14fa1d833..13c12ed22252 100644
--- a/drivers/usb/host/ohci-lh7a404.c
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -193,6 +193,7 @@ static const struct hc_driver ohci_lh7a404_hc_driver = {
193 */ 193 */
194 .hub_status_data = ohci_hub_status_data, 194 .hub_status_data = ohci_hub_status_data,
195 .hub_control = ohci_hub_control, 195 .hub_control = ohci_hub_control,
196 .hub_irq_enable = ohci_rhsc_enable,
196#ifdef CONFIG_PM 197#ifdef CONFIG_PM
197 .bus_suspend = ohci_bus_suspend, 198 .bus_suspend = ohci_bus_suspend,
198 .bus_resume = ohci_bus_resume, 199 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 6859fb5f1d6f..3a7c24c03671 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -466,6 +466,7 @@ static const struct hc_driver ohci_omap_hc_driver = {
466 */ 466 */
467 .hub_status_data = ohci_hub_status_data, 467 .hub_status_data = ohci_hub_status_data,
468 .hub_control = ohci_hub_control, 468 .hub_control = ohci_hub_control,
469 .hub_irq_enable = ohci_rhsc_enable,
469#ifdef CONFIG_PM 470#ifdef CONFIG_PM
470 .bus_suspend = ohci_bus_suspend, 471 .bus_suspend = ohci_bus_suspend,
471 .bus_resume = ohci_bus_resume, 472 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index 3bf175d95a23..4696cc912e16 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -327,6 +327,7 @@ static const struct hc_driver ohci_pci_hc_driver = {
327 */ 327 */
328 .hub_status_data = ohci_hub_status_data, 328 .hub_status_data = ohci_hub_status_data,
329 .hub_control = ohci_hub_control, 329 .hub_control = ohci_hub_control,
330 .hub_irq_enable = ohci_rhsc_enable,
330#ifdef CONFIG_PM 331#ifdef CONFIG_PM
331 .bus_suspend = ohci_bus_suspend, 332 .bus_suspend = ohci_bus_suspend,
332 .bus_resume = ohci_bus_resume, 333 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c
index 664f07ee8732..28b458f20cc3 100644
--- a/drivers/usb/host/ohci-pnx4008.c
+++ b/drivers/usb/host/ohci-pnx4008.c
@@ -280,6 +280,7 @@ static const struct hc_driver ohci_pnx4008_hc_driver = {
280 */ 280 */
281 .hub_status_data = ohci_hub_status_data, 281 .hub_status_data = ohci_hub_status_data,
282 .hub_control = ohci_hub_control, 282 .hub_control = ohci_hub_control,
283 .hub_irq_enable = ohci_rhsc_enable,
283#ifdef CONFIG_PM 284#ifdef CONFIG_PM
284 .bus_suspend = ohci_bus_suspend, 285 .bus_suspend = ohci_bus_suspend,
285 .bus_resume = ohci_bus_resume, 286 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-pnx8550.c b/drivers/usb/host/ohci-pnx8550.c
index 28467e288a93..605d59cba28e 100644
--- a/drivers/usb/host/ohci-pnx8550.c
+++ b/drivers/usb/host/ohci-pnx8550.c
@@ -201,6 +201,7 @@ static const struct hc_driver ohci_pnx8550_hc_driver = {
201 */ 201 */
202 .hub_status_data = ohci_hub_status_data, 202 .hub_status_data = ohci_hub_status_data,
203 .hub_control = ohci_hub_control, 203 .hub_control = ohci_hub_control,
204 .hub_irq_enable = ohci_rhsc_enable,
204#ifdef CONFIG_PM 205#ifdef CONFIG_PM
205 .bus_suspend = ohci_bus_suspend, 206 .bus_suspend = ohci_bus_suspend,
206 .bus_resume = ohci_bus_resume, 207 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 50e55db13636..a67252791223 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -72,6 +72,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = {
72 */ 72 */
73 .hub_status_data = ohci_hub_status_data, 73 .hub_status_data = ohci_hub_status_data,
74 .hub_control = ohci_hub_control, 74 .hub_control = ohci_hub_control,
75 .hub_irq_enable = ohci_rhsc_enable,
75#ifdef CONFIG_PM 76#ifdef CONFIG_PM
76 .bus_suspend = ohci_bus_suspend, 77 .bus_suspend = ohci_bus_suspend,
77 .bus_resume = ohci_bus_resume, 78 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
index cd3398b675b2..523c30125577 100644
--- a/drivers/usb/host/ohci-ppc-soc.c
+++ b/drivers/usb/host/ohci-ppc-soc.c
@@ -172,6 +172,7 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = {
172 */ 172 */
173 .hub_status_data = ohci_hub_status_data, 173 .hub_status_data = ohci_hub_status_data,
174 .hub_control = ohci_hub_control, 174 .hub_control = ohci_hub_control,
175 .hub_irq_enable = ohci_rhsc_enable,
175#ifdef CONFIG_PM 176#ifdef CONFIG_PM
176 .bus_suspend = ohci_bus_suspend, 177 .bus_suspend = ohci_bus_suspend,
177 .bus_resume = ohci_bus_resume, 178 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
index bfdeb0d22d05..c1935ae537f8 100644
--- a/drivers/usb/host/ohci-ps3.c
+++ b/drivers/usb/host/ohci-ps3.c
@@ -68,6 +68,7 @@ static const struct hc_driver ps3_ohci_hc_driver = {
68 .get_frame_number = ohci_get_frame, 68 .get_frame_number = ohci_get_frame,
69 .hub_status_data = ohci_hub_status_data, 69 .hub_status_data = ohci_hub_status_data,
70 .hub_control = ohci_hub_control, 70 .hub_control = ohci_hub_control,
71 .hub_irq_enable = ohci_rhsc_enable,
71 .start_port_reset = ohci_start_port_reset, 72 .start_port_reset = ohci_start_port_reset,
72#if defined(CONFIG_PM) 73#if defined(CONFIG_PM)
73 .bus_suspend = ohci_bus_suspend, 74 .bus_suspend = ohci_bus_suspend,
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 70b0d4b459e7..d4ee27d92be8 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -298,6 +298,7 @@ static const struct hc_driver ohci_pxa27x_hc_driver = {
298 */ 298 */
299 .hub_status_data = ohci_hub_status_data, 299 .hub_status_data = ohci_hub_status_data,
300 .hub_control = ohci_hub_control, 300 .hub_control = ohci_hub_control,
301 .hub_irq_enable = ohci_rhsc_enable,
301#ifdef CONFIG_PM 302#ifdef CONFIG_PM
302 .bus_suspend = ohci_bus_suspend, 303 .bus_suspend = ohci_bus_suspend,
303 .bus_resume = ohci_bus_resume, 304 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
index 9c9f3b59186f..9b547407c934 100644
--- a/drivers/usb/host/ohci-q.c
+++ b/drivers/usb/host/ohci-q.c
@@ -952,6 +952,7 @@ rescan_this:
952 struct urb *urb; 952 struct urb *urb;
953 urb_priv_t *urb_priv; 953 urb_priv_t *urb_priv;
954 __hc32 savebits; 954 __hc32 savebits;
955 u32 tdINFO;
955 956
956 td = list_entry (entry, struct td, td_list); 957 td = list_entry (entry, struct td, td_list);
957 urb = td->urb; 958 urb = td->urb;
@@ -966,6 +967,17 @@ rescan_this:
966 savebits = *prev & ~cpu_to_hc32 (ohci, TD_MASK); 967 savebits = *prev & ~cpu_to_hc32 (ohci, TD_MASK);
967 *prev = td->hwNextTD | savebits; 968 *prev = td->hwNextTD | savebits;
968 969
970 /* If this was unlinked, the TD may not have been
971 * retired ... so manually save the data toggle.
972 * The controller ignores the value we save for
973 * control and ISO endpoints.
974 */
975 tdINFO = hc32_to_cpup(ohci, &td->hwINFO);
976 if ((tdINFO & TD_T) == TD_T_DATA0)
977 ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_C);
978 else if ((tdINFO & TD_T) == TD_T_DATA1)
979 ed->hwHeadP |= cpu_to_hc32(ohci, ED_C);
980
969 /* HC may have partly processed this TD */ 981 /* HC may have partly processed this TD */
970 td_done (ohci, urb, td); 982 td_done (ohci, urb, td);
971 urb_priv->td_cnt++; 983 urb_priv->td_cnt++;
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index a73d2ff322e2..ead4772f0f27 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -466,6 +466,7 @@ static const struct hc_driver ohci_s3c2410_hc_driver = {
466 */ 466 */
467 .hub_status_data = ohci_s3c2410_hub_status_data, 467 .hub_status_data = ohci_s3c2410_hub_status_data,
468 .hub_control = ohci_s3c2410_hub_control, 468 .hub_control = ohci_s3c2410_hub_control,
469 .hub_irq_enable = ohci_rhsc_enable,
469#ifdef CONFIG_PM 470#ifdef CONFIG_PM
470 .bus_suspend = ohci_bus_suspend, 471 .bus_suspend = ohci_bus_suspend,
471 .bus_resume = ohci_bus_resume, 472 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index 99438c65981b..0f48f2d99226 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -231,6 +231,7 @@ static const struct hc_driver ohci_sa1111_hc_driver = {
231 */ 231 */
232 .hub_status_data = ohci_hub_status_data, 232 .hub_status_data = ohci_hub_status_data,
233 .hub_control = ohci_hub_control, 233 .hub_control = ohci_hub_control,
234 .hub_irq_enable = ohci_rhsc_enable,
234#ifdef CONFIG_PM 235#ifdef CONFIG_PM
235 .bus_suspend = ohci_bus_suspend, 236 .bus_suspend = ohci_bus_suspend,
236 .bus_resume = ohci_bus_resume, 237 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-sh.c b/drivers/usb/host/ohci-sh.c
index 60f03cc7ec4f..e7ee607278fe 100644
--- a/drivers/usb/host/ohci-sh.c
+++ b/drivers/usb/host/ohci-sh.c
@@ -68,6 +68,7 @@ static const struct hc_driver ohci_sh_hc_driver = {
68 */ 68 */
69 .hub_status_data = ohci_hub_status_data, 69 .hub_status_data = ohci_hub_status_data,
70 .hub_control = ohci_hub_control, 70 .hub_control = ohci_hub_control,
71 .hub_irq_enable = ohci_rhsc_enable,
71#ifdef CONFIG_PM 72#ifdef CONFIG_PM
72 .bus_suspend = ohci_bus_suspend, 73 .bus_suspend = ohci_bus_suspend,
73 .bus_resume = ohci_bus_resume, 74 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c
index e899a77dfb83..e610698c6b60 100644
--- a/drivers/usb/host/ohci-sm501.c
+++ b/drivers/usb/host/ohci-sm501.c
@@ -75,6 +75,7 @@ static const struct hc_driver ohci_sm501_hc_driver = {
75 */ 75 */
76 .hub_status_data = ohci_hub_status_data, 76 .hub_status_data = ohci_hub_status_data,
77 .hub_control = ohci_hub_control, 77 .hub_control = ohci_hub_control,
78 .hub_irq_enable = ohci_rhsc_enable,
78#ifdef CONFIG_PM 79#ifdef CONFIG_PM
79 .bus_suspend = ohci_bus_suspend, 80 .bus_suspend = ohci_bus_suspend,
80 .bus_resume = ohci_bus_resume, 81 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ssb.c b/drivers/usb/host/ohci-ssb.c
index c4265caec780..7275186db315 100644
--- a/drivers/usb/host/ohci-ssb.c
+++ b/drivers/usb/host/ohci-ssb.c
@@ -81,6 +81,7 @@ static const struct hc_driver ssb_ohci_hc_driver = {
81 81
82 .hub_status_data = ohci_hub_status_data, 82 .hub_status_data = ohci_hub_status_data,
83 .hub_control = ohci_hub_control, 83 .hub_control = ohci_hub_control,
84 .hub_irq_enable = ohci_rhsc_enable,
84#ifdef CONFIG_PM 85#ifdef CONFIG_PM
85 .bus_suspend = ohci_bus_suspend, 86 .bus_suspend = ohci_bus_suspend,
86 .bus_resume = ohci_bus_resume, 87 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index f29307405bb3..9b6323f768b2 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -2934,6 +2934,16 @@ static int u132_start_port_reset(struct usb_hcd *hcd, unsigned port_num)
2934 return 0; 2934 return 0;
2935} 2935}
2936 2936
2937static void u132_hub_irq_enable(struct usb_hcd *hcd)
2938{
2939 struct u132 *u132 = hcd_to_u132(hcd);
2940 if (u132->going > 1) {
2941 dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
2942 , u132->going);
2943 } else if (u132->going > 0)
2944 dev_err(&u132->platform_dev->dev, "device is being removed\n");
2945}
2946
2937 2947
2938#ifdef CONFIG_PM 2948#ifdef CONFIG_PM
2939static int u132_bus_suspend(struct usb_hcd *hcd) 2949static int u132_bus_suspend(struct usb_hcd *hcd)
@@ -2985,6 +2995,7 @@ static struct hc_driver u132_hc_driver = {
2985 .bus_suspend = u132_bus_suspend, 2995 .bus_suspend = u132_bus_suspend,
2986 .bus_resume = u132_bus_resume, 2996 .bus_resume = u132_bus_resume,
2987 .start_port_reset = u132_start_port_reset, 2997 .start_port_reset = u132_start_port_reset,
2998 .hub_irq_enable = u132_hub_irq_enable,
2988}; 2999};
2989 3000
2990/* 3001/*