RE: FW: ehci->watchdog timer panic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

> > b). Make the function calling the ehci_bus_suspend, returns an error 
> > to indicate that we could not disable the clocks and suspend failed?
> 
> No.  Simply add another call to del_timer_sync at the very end of
> ehci_bus_suspend (after the spin_unlock_irq).  Include a comment
> explaining that ehci_work may have re-enabled the timer, so it has to be
> turned off again.
> 
> Alan Stern

I have been working with Fei on this. Please find proposed patch based
upon your recommendation below.

Let us know if you have any comments.

Cheers
Jon


Signed-off-by: Fei Yang <fei.yang@xxxxxxxxxxxx>
Signed-off-by: Jon Hunter <jon-hunter@xxxxxx>
---
 drivers/usb/host/ehci-hub.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index f46ad27..96801ca 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -183,6 +183,11 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
 
 	ehci->next_statechange = jiffies + msecs_to_jiffies(10);
 	spin_unlock_irq (&ehci->lock);
+
+	/* ehci_work() may have re-enabled the watchdog timer, which we do not
+	 * want, and so we must delete any pending watchdog timer events.
+	 */
+	del_timer_sync(&ehci->watchdog);
 	return 0;
 }
 
-- 
1.6.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux