Skip to contentSkip to conversation

xhci feature for usb-next

PATCH Superseded Mathias Nyman 2 participants 5 messages Oct 13, 2021 – Oct 14, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover xhci feature for usb-next

Hi Greg

One feature for usb-next.
Allow runtime suspend for xHCI on AMD Yellow Carp platform

Thanks
-Mathias

Nehal Bakulchandra Shah (1):
usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

 drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

From: Nehal Bakulchandra Shah <[email protected]>

AMD's Yellow Carp platform supports runtime power management for XHCI Controllers, so enable the same by default for all XHCI Controllers.

---
 drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/usb/host/xhci-pci.c +15 -0
index 2c9f25ca8edd..0e571d6af2ab 100644
@@ -69,6 +69,12 @@
 #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI			0x1242
 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI			0x2142
 #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI			0x3242
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1	0x161a
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2	0x161b
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3	0x161d
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4	0x161e
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5	0x15d6
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6	0x15d7
 
 static const char hcd_name[] = "xhci_hcd";
 
@@ -313,6 +319,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 	     pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
 		xhci->quirks |= XHCI_NO_SOFT_RETRY;
 
+	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+	    (pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 ||
+	    pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6))
+		xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
+
 	if (xhci->quirks & XHCI_RESET_ON_RESUME)
 		xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
 				"QUIRK: Resetting on resume");
Signature · 1 line
2.25.1
maintainer
#2 lore raw

Re: [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

Quoted 19 lines · Mathias Nyman

From: Nehal Bakulchandra Shah <[email protected]>

AMD's Yellow Carp platform supports runtime power management for XHCI Controllers, so enable the same by default for all XHCI Controllers.

---
 drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/usb/host/xhci-pci.c +0 -0
index 2c9f25ca8edd..0e571d6af2ab 100644

drivers/usb/host/xhci-pci.c line 77

Quoted 9 lines
drivers/usb/host/xhci-pci.c +6 -0
@@ -69,6 +69,12 @@
 #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI			0x1242
 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI			0x2142
 #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI			0x3242
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1	0x161a
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2	0x161b
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3	0x161d
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4	0x161e
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5	0x15d6
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6	0x15d7

Please keep the ids aligned whenever possible. Why is there not 2 tabs being used here?

thanks,

greg k-h

#3 lore raw

Re: [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

Quoted 24 lines · Greg KH
Quoted 23 lines · Mathias Nyman

From: Nehal Bakulchandra Shah <[email protected]>

AMD's Yellow Carp platform supports runtime power management for XHCI Controllers, so enable the same by default for all XHCI Controllers.

---
 drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/usb/host/xhci-pci.c +1 -0
index 2c9f25ca8edd..0e571d6af2ab 100644
@@ -69,6 +69,12 @@
 #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI			0x1242
 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI			0x2142
 #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI			0x3242
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1	0x161a
Quoted 8 lines

drivers/usb/host/xhci-pci.c line 77

Quoted 5 lines
drivers/usb/host/xhci-pci.c +5 -0
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2	0x161b
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3	0x161d
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4	0x161e
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5	0x15d6
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6	0x15d7

Please keep the ids aligned whenever possible. Why is there not 2 tabs being used here?

I'll fix that and resend

-Mathias

maintainer
#4 lore raw

Re: [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform

Quoted 34 lines · Mathias Nyman
Quoted 24 lines · Greg KH
Quoted 23 lines · Mathias Nyman

From: Nehal Bakulchandra Shah <[email protected]>

AMD's Yellow Carp platform supports runtime power management for XHCI Controllers, so enable the same by default for all XHCI Controllers.

---
 drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/usb/host/xhci-pci.c +1 -0
index 2c9f25ca8edd..0e571d6af2ab 100644
@@ -69,6 +69,12 @@
 #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI			0x1242
 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI			0x2142
 #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI			0x3242
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1	0x161a
Quoted 8 lines

drivers/usb/host/xhci-pci.c line 77

Quoted 5 lines
drivers/usb/host/xhci-pci.c +5 -0
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2	0x161b
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3	0x161d
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4	0x161e
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5	0x15d6
+#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6	0x15d7

Please keep the ids aligned whenever possible. Why is there not 2 tabs being used here?

Quoted 1 line

I'll fix that and resend

The original author should have fixed that up, but you are being nice :)