USB: EHCI: move del_timer_sync calls outside spinlocked region
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 10 Jan 2008 21:43:15 +0000 (16:43 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 22:35:03 +0000 (14:35 -0800)
This patch (as1030b) moves a del_timer_sync() call outside the scope of a
spinlock, where it could cause a deadlock, and adds a new
del_timer_sync() call for the new IAA watchdog timer (it was omitted
by mistake).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-hub.c

index a249d03a50244ee678cd2df8128ab930d295ef5b..7919a411d5f954be8d5111fb1961fdeaf61db9b9 100644 (file)
@@ -123,6 +123,8 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
 
        if (time_before (jiffies, ehci->next_statechange))
                msleep(5);
+       del_timer_sync(&ehci->watchdog);
+       del_timer_sync(&ehci->iaa_watchdog);
 
        port = HCS_N_PORTS (ehci->hcs_params);
        spin_lock_irq (&ehci->lock);
@@ -171,7 +173,6 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
        }
 
        /* turn off now-idle HC */
-       del_timer_sync (&ehci->watchdog);
        ehci_halt (ehci);
        hcd->state = HC_STATE_SUSPENDED;