diff mbox series

[v3] xhci: Allow RPM on the USB controller (1022:43f7) by default

Message ID 20240304054327.2564500-1-Basavaraj.Natikar@amd.com
State New
Headers show
Series [v3] xhci: Allow RPM on the USB controller (1022:43f7) by default | expand

Commit Message

Basavaraj Natikar March 4, 2024, 5:43 a.m. UTC
Enable runtime PM by default for older AMD 1022:43f7 xHCI 1.1 host as it
is proven to work.
Driver enables runtime PM by default for newer xHCI 1.2 host.

Link: https://lore.kernel.org/all/12335218.O9o76ZdvQC@natalenko.name/
Cc: Mario Limonciello <mario.limonciello@amd.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
---
Changes in v3:
	- Reworded the commit message.	
	- Removed fixes and stable tags.
	- Moved the code among the rest of the AMD quirks.

Changes in v2:
	- Added Cc: stable@vger.kernel.org

 drivers/usb/host/xhci-pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Greg KH March 5, 2024, 12:04 p.m. UTC | #1
On Mon, Mar 04, 2024 at 11:13:27AM +0530, Basavaraj Natikar wrote:
> Enable runtime PM by default for older AMD 1022:43f7 xHCI 1.1 host as it
> is proven to work.
> Driver enables runtime PM by default for newer xHCI 1.2 host.
> 
> Link: https://lore.kernel.org/all/12335218.O9o76ZdvQC@natalenko.name/
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
> ---
> Changes in v3:
> 	- Reworded the commit message.	
> 	- Removed fixes and stable tags.

Why?  Why doesn't this belong in a stable kernel?  It's a quirk fix,
don't you want this on systems that are running 6.1 and 6.6?  Or are you
willing to wait for 6.9?

thanks,

greg k-h
Greg KH March 5, 2024, 1:43 p.m. UTC | #2
On Tue, Mar 05, 2024 at 03:08:58PM +0200, Mathias Nyman wrote:
> On 5.3.2024 14.04, Greg KH wrote:
> > On Mon, Mar 04, 2024 at 11:13:27AM +0530, Basavaraj Natikar wrote:
> > > Enable runtime PM by default for older AMD 1022:43f7 xHCI 1.1 host as it
> > > is proven to work.
> > > Driver enables runtime PM by default for newer xHCI 1.2 host.
> > > 
> > > Link: https://lore.kernel.org/all/12335218.O9o76ZdvQC@natalenko.name/
> > > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > > Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
> > > Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
> > > ---
> > > Changes in v3:
> > > 	- Reworded the commit message.	
> > > 	- Removed fixes and stable tags.
> > 
> > Why?  Why doesn't this belong in a stable kernel?  It's a quirk fix,
> > don't you want this on systems that are running 6.1 and 6.6?  Or are you
> > willing to wait for 6.9?
> 
> Might be better to add it to stable after it has been upstream for some time.
> 
> Previous attempt to enable default runtime PM for AMD xHCI 1.1 hosts caused
> regressions and had to be reverted from everywhere:
> 
> https://lore.kernel.org/r/20231205090548.1377667-1-mathias.nyman@linux.intel.com

Ok, can you ack this so I can get it into -rc1?

thanks,

greg k-h
diff mbox series

Patch

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index b534ca9752be..c0920e90efc3 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -307,8 +307,11 @@  static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 		xhci->quirks |= XHCI_RESET_ON_RESUME;
 	}
 
-	if (pdev->vendor == PCI_VENDOR_ID_AMD)
+	if (pdev->vendor == PCI_VENDOR_ID_AMD) {
 		xhci->quirks |= XHCI_TRUST_TX_LENGTH;
+		if (pdev->device == 0x43f7)
+			xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
+	}
 
 	if ((pdev->vendor == PCI_VENDOR_ID_AMD) &&
 		((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) ||