diff options
author | Maarten Lankhorst <m.b.lankhorst@gmail.com> | 2011-06-15 17:47:21 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-06-17 14:28:19 -0400 |
commit | c877b3b2ad5cb9d4fe523c5496185cc328ff3ae9 (patch) | |
tree | 3dad607ab4f7e703c742e71904ef4f53ee89ea47 /drivers/usb | |
parent | f6ba6fe2d913da6707a71a413d6ec8ae98d6ce18 (diff) |
xhci: Add reset on resume quirk for asrock p67 host
The asrock p67 xhci controller completely dies on resume, add a
quirk for this, to bring the host back online after a suspend.
This should be backported to stable kernels as old as 2.6.37.
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 8 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 17541d09eabb..cb16de213f64 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -29,6 +29,9 @@ | |||
29 | #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73 | 29 | #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73 |
30 | #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000 | 30 | #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000 |
31 | 31 | ||
32 | #define PCI_VENDOR_ID_ETRON 0x1b6f | ||
33 | #define PCI_DEVICE_ID_ASROCK_P67 0x7023 | ||
34 | |||
32 | static const char hcd_name[] = "xhci_hcd"; | 35 | static const char hcd_name[] = "xhci_hcd"; |
33 | 36 | ||
34 | /* called after powerup, by probe or system-pm "wakeup" */ | 37 | /* called after powerup, by probe or system-pm "wakeup" */ |
@@ -134,6 +137,11 @@ static int xhci_pci_setup(struct usb_hcd *hcd) | |||
134 | xhci->quirks |= XHCI_EP_LIMIT_QUIRK; | 137 | xhci->quirks |= XHCI_EP_LIMIT_QUIRK; |
135 | xhci->limit_active_eps = 64; | 138 | xhci->limit_active_eps = 64; |
136 | } | 139 | } |
140 | if (pdev->vendor == PCI_VENDOR_ID_ETRON && | ||
141 | pdev->device == PCI_DEVICE_ID_ASROCK_P67) { | ||
142 | xhci->quirks |= XHCI_RESET_ON_RESUME; | ||
143 | xhci_dbg(xhci, "QUIRK: Resetting on resume\n"); | ||
144 | } | ||
137 | 145 | ||
138 | /* Make sure the HC is halted. */ | 146 | /* Make sure the HC is halted. */ |
139 | retval = xhci_halt(xhci); | 147 | retval = xhci_halt(xhci); |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 15eb4c3d793c..f5fe1ac301ab 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -759,6 +759,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) | |||
759 | msleep(100); | 759 | msleep(100); |
760 | 760 | ||
761 | spin_lock_irq(&xhci->lock); | 761 | spin_lock_irq(&xhci->lock); |
762 | if (xhci->quirks & XHCI_RESET_ON_RESUME) | ||
763 | hibernated = true; | ||
762 | 764 | ||
763 | if (!hibernated) { | 765 | if (!hibernated) { |
764 | /* step 1: restore register */ | 766 | /* step 1: restore register */ |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index ba90af1c34b4..d8bbf5ccb10d 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1310,6 +1310,7 @@ struct xhci_hcd { | |||
1310 | */ | 1310 | */ |
1311 | #define XHCI_EP_LIMIT_QUIRK (1 << 5) | 1311 | #define XHCI_EP_LIMIT_QUIRK (1 << 5) |
1312 | #define XHCI_BROKEN_MSI (1 << 6) | 1312 | #define XHCI_BROKEN_MSI (1 << 6) |
1313 | #define XHCI_RESET_ON_RESUME (1 << 7) | ||
1313 | unsigned int num_active_eps; | 1314 | unsigned int num_active_eps; |
1314 | unsigned int limit_active_eps; | 1315 | unsigned int limit_active_eps; |
1315 | /* There are two roothubs to keep track of bus suspend info for */ | 1316 | /* There are two roothubs to keep track of bus suspend info for */ |