diff options
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 13 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 3 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 74ffd20edff8..f6cf1d178107 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -400,14 +400,21 @@ static void ehci_work (struct ehci_hcd *ehci) | |||
400 | * it reports urb completions. this flag guards against bogus | 400 | * it reports urb completions. this flag guards against bogus |
401 | * attempts at re-entrant schedule scanning. | 401 | * attempts at re-entrant schedule scanning. |
402 | */ | 402 | */ |
403 | if (ehci->scanning) | 403 | if (ehci->scanning) { |
404 | ehci->need_rescan = true; | ||
404 | return; | 405 | return; |
405 | ehci->scanning = 1; | 406 | } |
407 | ehci->scanning = true; | ||
408 | |||
409 | rescan: | ||
410 | ehci->need_rescan = false; | ||
406 | if (ehci->async_count) | 411 | if (ehci->async_count) |
407 | scan_async(ehci); | 412 | scan_async(ehci); |
408 | if (ehci->next_uframe != -1) | 413 | if (ehci->next_uframe != -1) |
409 | scan_periodic (ehci); | 414 | scan_periodic (ehci); |
410 | ehci->scanning = 0; | 415 | if (ehci->need_rescan) |
416 | goto rescan; | ||
417 | ehci->scanning = false; | ||
411 | 418 | ||
412 | /* the IO watchdog guards against hardware or driver bugs that | 419 | /* the IO watchdog guards against hardware or driver bugs that |
413 | * misplace IRQs, and should let us run completely without IRQs. | 420 | * misplace IRQs, and should let us run completely without IRQs. |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 303c36cc99c9..c462d52ac575 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -113,7 +113,8 @@ struct ehci_hcd { /* one per controller */ | |||
113 | enum ehci_rh_state rh_state; | 113 | enum ehci_rh_state rh_state; |
114 | 114 | ||
115 | /* general schedule support */ | 115 | /* general schedule support */ |
116 | unsigned scanning:1; | 116 | bool scanning:1; |
117 | bool need_rescan:1; | ||
117 | bool intr_unlinking:1; | 118 | bool intr_unlinking:1; |
118 | bool async_unlinking:1; | 119 | bool async_unlinking:1; |
119 | 120 | ||