linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] xhci feature for usb-next
@ 2021-10-13 15:16 Mathias Nyman
  2021-10-13 15:16 ` [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform Mathias Nyman
  0 siblings, 1 reply; 5+ messages in thread
From: Mathias Nyman @ 2021-10-13 15:16 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, Mathias Nyman

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(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform
  2021-10-13 15:16 [PATCH 0/1] xhci feature for usb-next Mathias Nyman
@ 2021-10-13 15:16 ` Mathias Nyman
  2021-10-13 16:42   ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Mathias Nyman @ 2021-10-13 15:16 UTC (permalink / raw)
  To: gregkh
  Cc: linux-usb, Nehal Bakulchandra Shah, Shyam Sundar S K,
	Mario Limonciello, Basavaraj Natikar, Mathias Nyman

From: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>

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

Signed-off-by: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
 drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 2c9f25ca8edd..0e571d6af2ab 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -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");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform
  2021-10-13 15:16 ` [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform Mathias Nyman
@ 2021-10-13 16:42   ` Greg KH
  2021-10-14 12:03     ` Mathias Nyman
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-10-13 16:42 UTC (permalink / raw)
  To: Mathias Nyman
  Cc: linux-usb, Nehal Bakulchandra Shah, Shyam Sundar S K,
	Mario Limonciello, Basavaraj Natikar

On Wed, Oct 13, 2021 at 06:16:33PM +0300, Mathias Nyman wrote:
> From: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
> 
> AMD's Yellow Carp platform supports runtime power management for
> XHCI Controllers, so enable the same by default for all XHCI Controllers.
> 
> Signed-off-by: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
> Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> ---
>  drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index 2c9f25ca8edd..0e571d6af2ab 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform
  2021-10-13 16:42   ` Greg KH
@ 2021-10-14 12:03     ` Mathias Nyman
  2021-10-14 12:27       ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Mathias Nyman @ 2021-10-14 12:03 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-usb, Nehal Bakulchandra Shah, Shyam Sundar S K,
	Mario Limonciello, Basavaraj Natikar

On 13.10.2021 19.42, Greg KH wrote:
> On Wed, Oct 13, 2021 at 06:16:33PM +0300, Mathias Nyman wrote:
>> From: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
>>
>> AMD's Yellow Carp platform supports runtime power management for
>> XHCI Controllers, so enable the same by default for all XHCI Controllers.
>>
>> Signed-off-by: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
>> Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
>> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
>> Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>> ---
>>  drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
>> index 2c9f25ca8edd..0e571d6af2ab 100644
>> --- a/drivers/usb/host/xhci-pci.c
>> +++ b/drivers/usb/host/xhci-pci.c
>> @@ -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?

I'll fix that  and resend 

-Mathias


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform
  2021-10-14 12:03     ` Mathias Nyman
@ 2021-10-14 12:27       ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2021-10-14 12:27 UTC (permalink / raw)
  To: Mathias Nyman
  Cc: linux-usb, Nehal Bakulchandra Shah, Shyam Sundar S K,
	Mario Limonciello, Basavaraj Natikar

On Thu, Oct 14, 2021 at 03:03:22PM +0300, Mathias Nyman wrote:
> On 13.10.2021 19.42, Greg KH wrote:
> > On Wed, Oct 13, 2021 at 06:16:33PM +0300, Mathias Nyman wrote:
> >> From: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
> >>
> >> AMD's Yellow Carp platform supports runtime power management for
> >> XHCI Controllers, so enable the same by default for all XHCI Controllers.
> >>
> >> Signed-off-by: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
> >> Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> >> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> >> Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
> >> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> >> ---
> >>  drivers/usb/host/xhci-pci.c | 15 +++++++++++++++
> >>  1 file changed, 15 insertions(+)
> >>
> >> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> >> index 2c9f25ca8edd..0e571d6af2ab 100644
> >> --- a/drivers/usb/host/xhci-pci.c
> >> +++ b/drivers/usb/host/xhci-pci.c
> >> @@ -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?
> 
> I'll fix that  and resend 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-14 12:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 15:16 [PATCH 0/1] xhci feature for usb-next Mathias Nyman
2021-10-13 15:16 ` [PATCH 1/1] usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform Mathias Nyman
2021-10-13 16:42   ` Greg KH
2021-10-14 12:03     ` Mathias Nyman
2021-10-14 12:27       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).