Skip to content

Commit c877b3b

Browse files
mlankhorstSarah Sharp
authored andcommitted
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 <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Cc: [email protected]
1 parent f6ba6fe commit c877b3b

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

drivers/usb/host/xhci-pci.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
#define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
3030
#define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000
3131

32+
#define PCI_VENDOR_ID_ETRON 0x1b6f
33+
#define PCI_DEVICE_ID_ASROCK_P67 0x7023
34+
3235
static const char hcd_name[] = "xhci_hcd";
3336

3437
/* called after powerup, by probe or system-pm "wakeup" */
@@ -134,6 +137,11 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
134137
xhci->quirks |= XHCI_EP_LIMIT_QUIRK;
135138
xhci->limit_active_eps = 64;
136139
}
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+
}
137145

138146
/* Make sure the HC is halted. */
139147
retval = xhci_halt(xhci);

drivers/usb/host/xhci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
759759
msleep(100);
760760

761761
spin_lock_irq(&xhci->lock);
762+
if (xhci->quirks & XHCI_RESET_ON_RESUME)
763+
hibernated = true;
762764

763765
if (!hibernated) {
764766
/* step 1: restore register */

drivers/usb/host/xhci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,7 @@ struct xhci_hcd {
13101310
*/
13111311
#define XHCI_EP_LIMIT_QUIRK (1 << 5)
13121312
#define XHCI_BROKEN_MSI (1 << 6)
1313+
#define XHCI_RESET_ON_RESUME (1 << 7)
13131314
unsigned int num_active_eps;
13141315
unsigned int limit_active_eps;
13151316
/* There are two roothubs to keep track of bus suspend info for */

0 commit comments

Comments
 (0)