Skip to content

Commit

Permalink
USB: EHCI: move del_timer_sync calls outside spinlocked region
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent dd95b81 commit f8fa757
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/host/ehci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit f8fa757

Please sign in to comment.