Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <alek.du@intel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Alek Du and committed by
Greg Kroah-Hartman
403dbd36 4d155eb5

+10
+6
drivers/usb/host/ehci-hcd.c
··· 127 127 128 128 switch (action) { 129 129 case TIMER_IO_WATCHDOG: 130 + if (!ehci->need_io_watchdog) 131 + return; 130 132 t = EHCI_IO_JIFFIES; 131 133 break; 132 134 case TIMER_ASYNC_OFF: ··· 510 508 511 509 spin_lock_init(&ehci->lock); 512 510 511 + /* 512 + * keep io watchdog by default, those good HCDs could turn off it later 513 + */ 514 + ehci->need_io_watchdog = 1; 513 515 init_timer(&ehci->watchdog); 514 516 ehci->watchdog.function = ehci_watchdog; 515 517 ehci->watchdog.data = (unsigned long) ehci;
+3
drivers/usb/host/ehci-pci.c
··· 129 129 return retval; 130 130 131 131 switch (pdev->vendor) { 132 + case PCI_VENDOR_ID_INTEL: 133 + ehci->need_io_watchdog = 0; 134 + break; 132 135 case PCI_VENDOR_ID_TDI: 133 136 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { 134 137 hcd->has_tt = 1;
+1
drivers/usb/host/ehci.h
··· 126 126 unsigned big_endian_mmio:1; 127 127 unsigned big_endian_desc:1; 128 128 unsigned has_amcc_usb23:1; 129 + unsigned need_io_watchdog:1; 129 130 130 131 /* required for usb32 quirk */ 131 132 #define OHCI_CTRL_HCFS (3 << 6)