From 403dbd36739e344d2d25f56ebbe342248487bd48 Mon Sep 17 00:00:00 2001 From: Alek Du Date: Mon, 13 Jul 2009 17:30:41 +0800 Subject: USB: EHCI: add need_io_watchdog flag to ehci_hcd Basically the io watchdog is only useful for those quirk HCDs. For most good ones, it only brings unnecessary wakeups. At least, I know the Intel EHCI HCDs should turn off the flag. Signed-off-by: Alek Du Cc: David Brownell Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-hcd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/usb/host/ehci-hcd.c') diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 54715b87575..2dc15f3ad14 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -127,6 +127,8 @@ timer_action(struct ehci_hcd *ehci, enum ehci_timer_action action) switch (action) { case TIMER_IO_WATCHDOG: + if (!ehci->need_io_watchdog) + return; t = EHCI_IO_JIFFIES; break; case TIMER_ASYNC_OFF: @@ -508,6 +510,10 @@ static int ehci_init(struct usb_hcd *hcd) spin_lock_init(&ehci->lock); + /* + * keep io watchdog by default, those good HCDs could turn off it later + */ + ehci->need_io_watchdog = 1; init_timer(&ehci->watchdog); ehci->watchdog.function = ehci_watchdog; ehci->watchdog.data = (unsigned long) ehci; -- cgit v1.2.3