From 1611c708026ab0e60bc5f63b5a4f8daf316c4f02 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Wed, 11 Jul 2012 11:22:57 -0400 Subject: [PATCH] --- yaml --- r: 317032 b: refs/heads/master c: 361aabf395e4a23cf554cf4ec0c0c6963b8beb01 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/ehci-hcd.c | 13 ++++++++++--- trunk/drivers/usb/host/ehci.h | 3 ++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a20ac6e64b6c..2c80ef00fd06 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 32830f207691176234b4c4dd17f0d7ab6d87d94b +refs/heads/master: 361aabf395e4a23cf554cf4ec0c0c6963b8beb01 diff --git a/trunk/drivers/usb/host/ehci-hcd.c b/trunk/drivers/usb/host/ehci-hcd.c index 74ffd20edff8..f6cf1d178107 100644 --- a/trunk/drivers/usb/host/ehci-hcd.c +++ b/trunk/drivers/usb/host/ehci-hcd.c @@ -400,14 +400,21 @@ static void ehci_work (struct ehci_hcd *ehci) * it reports urb completions. this flag guards against bogus * attempts at re-entrant schedule scanning. */ - if (ehci->scanning) + if (ehci->scanning) { + ehci->need_rescan = true; return; - ehci->scanning = 1; + } + ehci->scanning = true; + + rescan: + ehci->need_rescan = false; if (ehci->async_count) scan_async(ehci); if (ehci->next_uframe != -1) scan_periodic (ehci); - ehci->scanning = 0; + if (ehci->need_rescan) + goto rescan; + ehci->scanning = false; /* the IO watchdog guards against hardware or driver bugs that * misplace IRQs, and should let us run completely without IRQs. diff --git a/trunk/drivers/usb/host/ehci.h b/trunk/drivers/usb/host/ehci.h index 303c36cc99c9..c462d52ac575 100644 --- a/trunk/drivers/usb/host/ehci.h +++ b/trunk/drivers/usb/host/ehci.h @@ -113,7 +113,8 @@ struct ehci_hcd { /* one per controller */ enum ehci_rh_state rh_state; /* general schedule support */ - unsigned scanning:1; + bool scanning:1; + bool need_rescan:1; bool intr_unlinking:1; bool async_unlinking:1;