linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring
@ 2024-04-18 15:48 Andy Shevchenko
  2024-04-18 15:48 ` [PATCH v1 1/2] xhci: pci: Use full names in PCI IDs for Intel platforms Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2024-04-18 15:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Niklas Neronin, linux-usb,
	linux-kernel
  Cc: Mathias Nyman, Andy Shevchenko

Just a couple of updates to the PCI IDs in order of better maintenance.
No functional change intended.

Andy Shevchenko (2):
  xhci: pci: Use full names in PCI IDs for Intel platforms
  xhci: pci: Group out Thunderbolt xHCI IDs

 drivers/usb/host/xhci-pci.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

-- 
2.43.0.rc1.1336.g36b5255a03ac


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

* [PATCH v1 1/2] xhci: pci: Use full names in PCI IDs for Intel platforms
  2024-04-18 15:48 [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring Andy Shevchenko
@ 2024-04-18 15:48 ` Andy Shevchenko
  2024-04-18 15:48 ` [PATCH v1 2/2] xhci: pci: Group out Thunderbolt xHCI IDs Andy Shevchenko
  2024-04-19 13:13 ` [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring Mathias Nyman
  2 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2024-04-18 15:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Niklas Neronin, linux-usb,
	linux-kernel
  Cc: Mathias Nyman, Andy Shevchenko

There are three out of many Intel platforms that are using TLAs
instead of the full names in the PCI IDs. Modify them accordingly.

This also fixes the logic of grouping as seemed to be by an LSB
byte of the ID.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/usb/host/xhci-pci.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 93b697648018..70bf318fd7ef 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -45,8 +45,7 @@
 #define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI	0x9d2f
 #define PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI		0x0aa8
 #define PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI		0x1aa8
-#define PCI_DEVICE_ID_INTEL_APL_XHCI			0x5aa8
-#define PCI_DEVICE_ID_INTEL_DNV_XHCI			0x19d0
+#define PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI		0x5aa8
 #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_XHCI	0x15b5
 #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_XHCI	0x15b6
 #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_XHCI	0x15c1
@@ -55,9 +54,10 @@
 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_XHCI		0x15e9
 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI		0x15ec
 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI		0x15f0
+#define PCI_DEVICE_ID_INTEL_DENVERTON_XHCI		0x19d0
 #define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI		0x8a13
-#define PCI_DEVICE_ID_INTEL_CML_XHCI			0xa3af
 #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI		0x9a13
+#define PCI_DEVICE_ID_INTEL_COMET_LAKE_XHCI		0xa3af
 #define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI		0x1138
 #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI		0x51ed
 #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI	0x54ed
@@ -356,9 +356,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 		 pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
 		 pdev->device == PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI ||
 		 pdev->device == PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI ||
-		 pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI ||
-		 pdev->device == PCI_DEVICE_ID_INTEL_DNV_XHCI ||
-		 pdev->device == PCI_DEVICE_ID_INTEL_CML_XHCI)) {
+		 pdev->device == PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI ||
+		 pdev->device == PCI_DEVICE_ID_INTEL_DENVERTON_XHCI ||
+		 pdev->device == PCI_DEVICE_ID_INTEL_COMET_LAKE_XHCI)) {
 		xhci->quirks |= XHCI_PME_STUCK_QUIRK;
 	}
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
@@ -367,14 +367,14 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
 	    (pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
 	     pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI ||
-	     pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI))
+	     pdev->device == PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI))
 		xhci->quirks |= XHCI_INTEL_USB_ROLE_SW;
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
 	    (pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
 	     pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI ||
 	     pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI ||
-	     pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI ||
-	     pdev->device == PCI_DEVICE_ID_INTEL_DNV_XHCI))
+	     pdev->device == PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI ||
+	     pdev->device == PCI_DEVICE_ID_INTEL_DENVERTON_XHCI))
 		xhci->quirks |= XHCI_MISSING_CAS;
 
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
-- 
2.43.0.rc1.1336.g36b5255a03ac


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

* [PATCH v1 2/2] xhci: pci: Group out Thunderbolt xHCI IDs
  2024-04-18 15:48 [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring Andy Shevchenko
  2024-04-18 15:48 ` [PATCH v1 1/2] xhci: pci: Use full names in PCI IDs for Intel platforms Andy Shevchenko
@ 2024-04-18 15:48 ` Andy Shevchenko
  2024-04-19 13:13 ` [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring Mathias Nyman
  2 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2024-04-18 15:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Niklas Neronin, linux-usb,
	linux-kernel
  Cc: Mathias Nyman, Andy Shevchenko

It's better to keep track on Thunderbold xHCI IDs in a separate group.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/usb/host/xhci-pci.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 70bf318fd7ef..332c5843ada5 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -46,6 +46,15 @@
 #define PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI		0x0aa8
 #define PCI_DEVICE_ID_INTEL_BROXTON_B_XHCI		0x1aa8
 #define PCI_DEVICE_ID_INTEL_APOLLO_LAKE_XHCI		0x5aa8
+#define PCI_DEVICE_ID_INTEL_DENVERTON_XHCI		0x19d0
+#define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI		0x8a13
+#define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI		0x9a13
+#define PCI_DEVICE_ID_INTEL_COMET_LAKE_XHCI		0xa3af
+#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI		0x51ed
+#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI	0x54ed
+
+/* Thunderbolt */
+#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI		0x1138
 #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_XHCI	0x15b5
 #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_XHCI	0x15b6
 #define PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_XHCI	0x15c1
@@ -54,13 +63,6 @@
 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_XHCI		0x15e9
 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI		0x15ec
 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI		0x15f0
-#define PCI_DEVICE_ID_INTEL_DENVERTON_XHCI		0x19d0
-#define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI		0x8a13
-#define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI		0x9a13
-#define PCI_DEVICE_ID_INTEL_COMET_LAKE_XHCI		0xa3af
-#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI		0x1138
-#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI		0x51ed
-#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI	0x54ed
 
 #define PCI_DEVICE_ID_AMD_RENOIR_XHCI			0x1639
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_4			0x43b9
-- 
2.43.0.rc1.1336.g36b5255a03ac


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

* Re: [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring
  2024-04-18 15:48 [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring Andy Shevchenko
  2024-04-18 15:48 ` [PATCH v1 1/2] xhci: pci: Use full names in PCI IDs for Intel platforms Andy Shevchenko
  2024-04-18 15:48 ` [PATCH v1 2/2] xhci: pci: Group out Thunderbolt xHCI IDs Andy Shevchenko
@ 2024-04-19 13:13 ` Mathias Nyman
  2 siblings, 0 replies; 4+ messages in thread
From: Mathias Nyman @ 2024-04-19 13:13 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, Niklas Neronin, linux-usb,
	linux-kernel
  Cc: Mathias Nyman

On 18.4.2024 18.48, Andy Shevchenko wrote:
> Just a couple of updates to the PCI IDs in order of better maintenance.
> No functional change intended.
> 
> Andy Shevchenko (2):
>    xhci: pci: Use full names in PCI IDs for Intel platforms
>    xhci: pci: Group out Thunderbolt xHCI IDs
> 
>   drivers/usb/host/xhci-pci.c | 30 ++++++++++++++++--------------
>   1 file changed, 16 insertions(+), 14 deletions(-)
> 

Thanks, added to my for-usb-next branch

-Mathias

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

end of thread, other threads:[~2024-04-19 13:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18 15:48 [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring Andy Shevchenko
2024-04-18 15:48 ` [PATCH v1 1/2] xhci: pci: Use full names in PCI IDs for Intel platforms Andy Shevchenko
2024-04-18 15:48 ` [PATCH v1 2/2] xhci: pci: Group out Thunderbolt xHCI IDs Andy Shevchenko
2024-04-19 13:13 ` [PATCH v1 0/2] xhci: pci: Little PCI IDs refactoring Mathias Nyman

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).