From stern@rowland.harvard.edu Fri Jan 11 17:14:04 2008 From: Alan Stern Date: Thu, 10 Jan 2008 16:43:15 -0500 (EST) Subject: USB: EHCI: move del_timer_sync calls outside spinlocked region To: Greg KH Cc: David Brownell , USB list Message-ID: 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 Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-hub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -123,6 +123,8 @@ static int ehci_bus_suspend (struct usb_ 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_ } /* turn off now-idle HC */ - del_timer_sync (&ehci->watchdog); ehci_halt (ehci); hcd->state = HC_STATE_SUSPENDED;