>From df9795b593d1ac999102e45b6fef90f8a9b3671a Mon Sep 17 00:00:00 2001 From: Alek Du <alek.du@xxxxxxxxx> Date: Wed, 24 Jun 2009 21:50:26 +0800 Subject: [PATCH] EHCI: add need_io_watchdog flag to ehci_hcd Sigh, I have to invert it again... original patch named "add no_io_watchdog 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 <alek.du@xxxxxxxxx> --- drivers/usb/host/ehci-hcd.c | 4 ++++ drivers/usb/host/ehci-pci.c | 3 +++ drivers/usb/host/ehci.h | 1 + 3 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index f406c9f..cc65c43 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,8 @@ static int ehci_init(struct usb_hcd *hcd) spin_lock_init(&ehci->lock); + /* default keep io watchdog, 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; diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index f3683e1..4fc499d 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -129,6 +129,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd) return retval; switch (pdev->vendor) { + case PCI_VENDOR_ID_INTEL: + ehci->need_io_watchdog = 0; + break; case PCI_VENDOR_ID_TDI: if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { hcd->has_tt = 1; diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 437a9bd..bf0f5cf 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -126,6 +126,7 @@ struct ehci_hcd { /* one per controller */ unsigned big_endian_mmio:1; unsigned big_endian_desc:1; unsigned has_amcc_usb23:1; + unsigned need_io_watchdog:1; /* required for usb32 quirk */ #define OHCI_CTRL_HCFS (3 << 6) -- 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