diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h index 7f9f33c8c232413d5e85a01e29b3de4ec5151b9a..f2252f46c3e686b3bde56136aa30fc1385f96d1f 100644 --- a/drivers/usb/host/uhci-hcd.h +++ b/drivers/usb/host/uhci-hcd.h @@ -432,6 +432,7 @@ struct uhci_hcd { unsigned int big_endian_mmio:1; /* Big endian registers */ unsigned int big_endian_desc:1; /* Big endian descriptors */ unsigned int is_aspeed:1; /* Aspeed impl. workarounds */ + unsigned int auto_suspend_delay:1; /* delay root hub autosuspend*/ /* Support for port suspend/resume/reset */ unsigned long port_c_suspend; /* Bit-arrays of ports */ diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index 47106dd8ca7cce69d675f74e2d9470c1eb35e7a2..7ff2ba4deae50b0092d91eb54a60f1c9bf883dd4 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c @@ -217,7 +217,10 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf) /* are any devices attached? */ if (!any_ports_active(uhci)) { uhci->rh_state = UHCI_RH_RUNNING_NODEVS; - uhci->auto_stop_time = jiffies + HZ; + if (!uhci->auto_suspend_delay) + uhci->auto_stop_time = jiffies + HZ; + else + uhci->auto_stop_time = jiffies + 3 * HZ; } break; diff --git a/drivers/usb/host/uhci-pci.c b/drivers/usb/host/uhci-pci.c index 3c0d4c43b640da27c662f83432e2e29f3964c5f7..8dfd051b84b3cd1c73e52c322944204fa31f817d 100644 --- a/drivers/usb/host/uhci-pci.c +++ b/drivers/usb/host/uhci-pci.c @@ -134,8 +134,10 @@ static int uhci_pci_init(struct usb_hcd *hcd) if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_INTEL) device_set_wakeup_capable(uhci_dev(uhci), true); - if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN) + if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN) { uhci->oc_low = 1; + uhci->auto_suspend_delay = 1; + } /* Set up pointers to PCI-specific functions */ uhci->reset_hc = uhci_pci_reset_hc;