Skip to contentSkip to conversation

PCI: Add ASPEED vendor ID to pci_ids.h

PATCH Applied Nirmoy Das 4 participants 9 messages Dec 17, 2025 – Jan 9

Subsystems (3)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH v2 1/2 PCI: Add ASPEED vendor ID to pci_ids.h

Add PCI_VENDOR_ID_ASPEED to the shared pci_ids.h header and remove the duplicate local definition from ehci-pci.c.

This prepares for adding a PCI quirk for ASPEED devices.

---
 drivers/usb/host/ehci-pci.c | 1 -
 include/linux/pci_ids.h     | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-pci.c +0 -1
index 889dc4426271..bd3a63555594 100644
@@ -21,7 +21,6 @@ static const char hcd_name[] = "ehci-pci";
 /* defined here to avoid adding to pci_ids.h for single instance use */
 #define PCI_DEVICE_ID_INTEL_CE4100_USB	0x2e70
 
-#define PCI_VENDOR_ID_ASPEED		0x1a03
 #define PCI_DEVICE_ID_ASPEED_EHCI	0x2603
 
 /*-------------------------------------------------------------------------*/
include/linux/pci_ids.h +2 -0
index a9a089566b7c..30dd854a9156 100644
@@ -2583,6 +2583,8 @@
 #define PCI_DEVICE_ID_NETRONOME_NFP3800_VF	0x3803
 #define PCI_DEVICE_ID_NETRONOME_NFP6000_VF	0x6003
 
+#define PCI_VENDOR_ID_ASPEED		0x1a03
+
 #define PCI_VENDOR_ID_QMI		0x1a32
 
 #define PCI_VENDOR_ID_AZWAVE		0x1a3b
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v2 2/2 PCI: Add PCI_BRIDGE_NO_ALIASES quirk for ASPEED AST1150

ASPEED BMC controllers have VGA and USB functions behind a PCIe-to-PCI bridge that causes them to share the same stream ID:

[e0]---00.0-[e1-e2]----00.0-[e2]--+-00.0 ASPEED Graphics Family
\-02.0 ASPEED USB Controller

Both devices get stream ID 0x5e200 due to bridge aliasing, causing the USB controller to be rejected with 'Aliasing StreamID unsupported'.

Per ASPEED, the AST1150 doesn't use a real PCI bus and always forwards the original requester ID from downstream devices rather than replacing it with any alias.

Add a new PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES flag and apply it to the AST1150.

---
v2:
- Use new PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES flag instead of PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT to only skip aliasing at this bridge, not stop the entire upstream alias walk (Jason Gunthorpe)

 drivers/pci/quirks.c | 10 ++++++++++
 drivers/pci/search.c |  2 ++
 include/linux/pci.h  |  5 +++++
 3 files changed, 17 insertions(+)
drivers/pci/quirks.c +10 -0
index b9c252aa6fe0..a37b7305ae5f 100644
@@ -4453,6 +4453,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000,
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084,
 				quirk_bridge_cavm_thrx2_pcie_root);
 
+/*
+ * AST1150 doesn't use a real PCI bus and always forwards the requester ID
+ * from downstream devices.
+ */
+static void quirk_aspeed_pci_bridge_no_aliases(struct pci_dev *pdev)
+{
+	pdev->dev_flags |= PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ASPEED, 0x1150, quirk_aspeed_pci_bridge_no_aliases);
+
 /*
  * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero)
  * class code.  Fix it.
drivers/pci/search.c +2 -0
index 53840634fbfc..2f44444ae22f 100644
@@ -86,6 +86,8 @@ int pci_for_each_dma_alias(struct pci_dev *pdev,
 			case PCI_EXP_TYPE_DOWNSTREAM:
 				continue;
 			case PCI_EXP_TYPE_PCI_BRIDGE:
+				if (tmp->dev_flags & PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES)
+					continue;
 				ret = fn(tmp,
 					 PCI_DEVID(tmp->subordinate->number,
 						   PCI_DEVFN(0, 0)), data);
include/linux/pci.h +5 -0
index b16127c6a7b4..963da06ef193 100644
@@ -248,6 +248,11 @@ enum pci_dev_flags {
 	PCI_DEV_FLAGS_HAS_MSI_MASKING = (__force pci_dev_flags_t) (1 << 12),
 	/* Device requires write to PCI_MSIX_ENTRY_DATA before any MSIX reads */
 	PCI_DEV_FLAGS_MSIX_TOUCH_ENTRY_DATA_FIRST = (__force pci_dev_flags_t) (1 << 13),
+	/*
+	 * PCIe to PCI bridge does not create RID aliases because the bridge is
+	 * integrated with the downstream devices and doesn't use real PCI.
+	 */
+	PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES = (__force pci_dev_flags_t) (1 << 14),
 };
 
 enum pci_irq_reroute_variant {
Signature · 1 line
2.43.0
Reviewed-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] PCI: Add PCI_BRIDGE_NO_ALIASES quirk for ASPEED AST1150

Quoted 24 lines · Nirmoy Das

ASPEED BMC controllers have VGA and USB functions behind a PCIe-to-PCI bridge that causes them to share the same stream ID:

[e0]---00.0-[e1-e2]----00.0-[e2]--+-00.0 ASPEED Graphics Family
\-02.0 ASPEED USB Controller

Both devices get stream ID 0x5e200 due to bridge aliasing, causing the USB controller to be rejected with 'Aliasing StreamID unsupported'.

Per ASPEED, the AST1150 doesn't use a real PCI bus and always forwards the original requester ID from downstream devices rather than replacing it with any alias.

Add a new PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES flag and apply it to the AST1150.

---
v2:
- Use new PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES flag instead of PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT to only skip aliasing at this bridge, not stop the entire upstream alias walk (Jason Gunthorpe)

Quoted 4 lines
 drivers/pci/quirks.c | 10 ++++++++++
 drivers/pci/search.c |  2 ++
 include/linux/pci.h  |  5 +++++
 3 files changed, 17 insertions(+)

I bet there will be more aspeed devices to come, but this is a reasonable start

Thanks,
Jason

Reviewed-by on v2 2/2
#3 lore raw

Re: [PATCH v2 2/2] PCI: Add PCI_BRIDGE_NO_ALIASES quirk for ASPEED AST1150

In reply to Nirmoy Das
Quoted 9 lines · Nirmoy Das

ASPEED BMC controllers have VGA and USB functions behind a PCIe-to-PCI bridge that causes them to share the same stream ID:

[e0]---00.0-[e1-e2]----00.0-[e2]--+-00.0 ASPEED Graphics Family
\-02.0 ASPEED USB Controller

Both devices get stream ID 0x5e200 due to bridge aliasing, causing the USB controller to be rejected with 'Aliasing StreamID unsupported'.

Quoted 6 lines

Per ASPEED, the AST1150 doesn't use a real PCI bus and always forwards the original requester ID from downstream devices rather than replacing it with any alias.

Add a new PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES flag and apply it to the AST1150.

Looks reasonable to me;

(Super-nit: perhaps s/ALIASES/ALIAS/ to neatly mirror PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS, which amusingly it's pretty much the exact opposite of, but I'll leave that to Bjorn's discretion)

Quoted 63 lines

---
v2:
- Use new PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES flag instead of PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT to only skip aliasing at this bridge, not stop the entire upstream alias walk (Jason Gunthorpe)

  drivers/pci/quirks.c | 10 ++++++++++
  drivers/pci/search.c |  2 ++
  include/linux/pci.h  |  5 +++++
  3 files changed, 17 insertions(+)
drivers/pci/quirks.c +10 -0
index b9c252aa6fe0..a37b7305ae5f 100644
@@ -4453,6 +4453,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000,
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084,
  				quirk_bridge_cavm_thrx2_pcie_root);
 
+/*
+ * AST1150 doesn't use a real PCI bus and always forwards the requester ID
+ * from downstream devices.
+ */
+static void quirk_aspeed_pci_bridge_no_aliases(struct pci_dev *pdev)
+{
+	pdev->dev_flags |= PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ASPEED, 0x1150, quirk_aspeed_pci_bridge_no_aliases);
+
  /*
   * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero)
   * class code.  Fix it.
drivers/pci/search.c +2 -0
index 53840634fbfc..2f44444ae22f 100644
@@ -86,6 +86,8 @@ int pci_for_each_dma_alias(struct pci_dev *pdev,
  			case PCI_EXP_TYPE_DOWNSTREAM:
  				continue;
  			case PCI_EXP_TYPE_PCI_BRIDGE:
+				if (tmp->dev_flags & PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES)
+					continue;
  				ret = fn(tmp,
  					 PCI_DEVID(tmp->subordinate->number,
  						   PCI_DEVFN(0, 0)), data);
include/linux/pci.h +5 -0
index b16127c6a7b4..963da06ef193 100644
@@ -248,6 +248,11 @@ enum pci_dev_flags {
  	PCI_DEV_FLAGS_HAS_MSI_MASKING = (__force pci_dev_flags_t) (1 << 12),
  	/* Device requires write to PCI_MSIX_ENTRY_DATA before any MSIX reads */
  	PCI_DEV_FLAGS_MSIX_TOUCH_ENTRY_DATA_FIRST = (__force pci_dev_flags_t) (1 << 13),
+	/*
+	 * PCIe to PCI bridge does not create RID aliases because the bridge is
+	 * integrated with the downstream devices and doesn't use real PCI.
+	 */
+	PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES = (__force pci_dev_flags_t) (1 << 14),
  };
 
  enum pci_irq_reroute_variant {
author
#4 lore raw

Re: [PATCH v2 2/2] PCI: Add PCI_BRIDGE_NO_ALIASES quirk for ASPEED AST1150

Quoted 14 lines · Robin Murphy
Quoted 13 lines · Nirmoy Das

ASPEED BMC controllers have VGA and USB functions behind a PCIe-to-PCI bridge that causes them to share the same stream ID:

   [e0]---00.0-[e1-e2]----00.0-[e2]--+-00.0  ASPEED Graphics Family \-02.0  ASPEED USB Controller

Both devices get stream ID 0x5e200 due to bridge aliasing, causing the USB controller to be rejected with 'Aliasing StreamID unsupported'.

Per ASPEED, the AST1150 doesn't use a real PCI bus and always forwards the original requester ID from downstream devices rather than replacing it with any alias.

Quoted 8 lines
Quoted 2 lines

Add a new PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES flag and apply it to the AST1150.

Looks reasonable to me;

(Super-nit: perhaps s/ALIASES/ALIAS/ to neatly mirror PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS, which amusingly it's pretty much the exact opposite of, but I'll leave that to Bjorn's discretion)

Thanks Robin! Happy to resend with s/ALIASES/ALIAS/ if Bjorn prefers.

Quoted 69 lines
Quoted 68 lines

---
v2:
   - Use new PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES flag instead of PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT to only skip aliasing at this bridge, not stop the entire upstream alias walk (Jason Gunthorpe)

  drivers/pci/quirks.c | 10 ++++++++++
  drivers/pci/search.c |  2 ++
  include/linux/pci.h  |  5 +++++

  3 files changed, 17 insertions(+)
drivers/pci/quirks.c +0 -0
index b9c252aa6fe0..a37b7305ae5f 100644
@@ -4453,6 +4453,16 @@ 
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000,
   DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084,
                   quirk_bridge_cavm_thrx2_pcie_root);

  +/*
+ * AST1150 doesn't use a real PCI bus and always forwards the requester ID
+ * from downstream devices.
+ */

drivers/pci/quirks.c +5 -0
+static void quirk_aspeed_pci_bridge_no_aliases(struct pci_dev *pdev)
+{
+    pdev->dev_flags |= PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ASPEED, 0x1150, 

quirk_aspeed_pci_bridge_no_aliases);
+
  /*
   * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero)
   * class code.  Fix it.

drivers/pci/search.c +0 -0
index 53840634fbfc..2f44444ae22f 100644
@@ -86,6 +86,8 @@ int pci_for_each_dma_alias(struct pci_dev *pdev,

              case PCI_EXP_TYPE_DOWNSTREAM:
                  continue;
              case PCI_EXP_TYPE_PCI_BRIDGE:
+                if (tmp->dev_flags & PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES)
+                    continue;
                  ret = fn(tmp, PCI_DEVID(tmp->subordinate->number, PCI_DEVFN(0, 0)), data);

include/linux/pci.h +2 -0
index b16127c6a7b4..963da06ef193 100644
@@ -248,6 +248,11 @@ enum pci_dev_flags {
       PCI_DEV_FLAGS_HAS_MSI_MASKING = (__force pci_dev_flags_t) (1 << 12),
       /* Device requires write to PCI_MSIX_ENTRY_DATA before any MSIX reads */
       PCI_DEV_FLAGS_MSIX_TOUCH_ENTRY_DATA_FIRST = (__force pci_dev_flags_t) (1 << 13),
+    /*
+     * PCIe to PCI bridge does not create RID aliases because the 

bridge is
+     * integrated with the downstream devices and doesn't use real PCI. +     */
+    PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES = (__force pci_dev_flags_t) (1 << 14),
  };
    enum pci_irq_reroute_variant {

Reviewed-by on v2 1/2
#5 lore raw
In reply to Nirmoy Das
Quoted 10 lines · Nirmoy Das

Add PCI_VENDOR_ID_ASPEED to the shared pci_ids.h header and remove the duplicate local definition from ehci-pci.c.

This prepares for adding a PCI quirk for ASPEED devices.

---
 drivers/usb/host/ehci-pci.c | 1 -
 include/linux/pci_ids.h     | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

Jason

author
#6 lore raw
In reply to Nirmoy Das

Hi Bjorn,

Happy new year! Gentle reminder on this patch series.

Regards,

Nirmoy

Quoted 36 lines · Nirmoy Das

Add PCI_VENDOR_ID_ASPEED to the shared pci_ids.h header and remove the duplicate local definition from ehci-pci.c.

This prepares for adding a PCI quirk for ASPEED devices.

---
  drivers/usb/host/ehci-pci.c | 1 -
  include/linux/pci_ids.h     | 2 ++
  2 files changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-pci.c +0 -1
index 889dc4426271..bd3a63555594 100644
@@ -21,7 +21,6 @@ static const char hcd_name[] = "ehci-pci";
  /* defined here to avoid adding to pci_ids.h for single instance use */
  #define PCI_DEVICE_ID_INTEL_CE4100_USB	0x2e70
 
-#define PCI_VENDOR_ID_ASPEED		0x1a03
  #define PCI_DEVICE_ID_ASPEED_EHCI	0x2603
 
  /*-------------------------------------------------------------------------*/
include/linux/pci_ids.h +2 -0
index a9a089566b7c..30dd854a9156 100644
@@ -2583,6 +2583,8 @@
  #define PCI_DEVICE_ID_NETRONOME_NFP3800_VF	0x3803
  #define PCI_DEVICE_ID_NETRONOME_NFP6000_VF	0x6003
 
+#define PCI_VENDOR_ID_ASPEED		0x1a03
+
  #define PCI_VENDOR_ID_QMI		0x1a32
 
  #define PCI_VENDOR_ID_AZWAVE		0x1a3b
#7 lore raw
In reply to Nirmoy Das
Quoted 6 lines · Nirmoy Das

Add PCI_VENDOR_ID_ASPEED to the shared pci_ids.h header and remove the duplicate local definition from ehci-pci.c.

This prepares for adding a PCI quirk for ASPEED devices.

Applied both to pci/iommu for v6.20, with s/PCI_BRIDGE_NO_ALIASES/PCI_BRIDGE_NO_ALIAS/, thanks!

Quoted 33 lines
---
 drivers/usb/host/ehci-pci.c | 1 -
 include/linux/pci_ids.h     | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-pci.c +0 -1
index 889dc4426271..bd3a63555594 100644
@@ -21,7 +21,6 @@ static const char hcd_name[] = "ehci-pci";
 /* defined here to avoid adding to pci_ids.h for single instance use */
 #define PCI_DEVICE_ID_INTEL_CE4100_USB	0x2e70
 
-#define PCI_VENDOR_ID_ASPEED		0x1a03
 #define PCI_DEVICE_ID_ASPEED_EHCI	0x2603
 
 /*-------------------------------------------------------------------------*/
include/linux/pci_ids.h +2 -0
index a9a089566b7c..30dd854a9156 100644
@@ -2583,6 +2583,8 @@
 #define PCI_DEVICE_ID_NETRONOME_NFP3800_VF	0x3803
 #define PCI_DEVICE_ID_NETRONOME_NFP6000_VF	0x6003
 
+#define PCI_VENDOR_ID_ASPEED		0x1a03
+
 #define PCI_VENDOR_ID_QMI		0x1a32
 
 #define PCI_VENDOR_ID_AZWAVE		0x1a3b
Signature · 1 line
2.43.0
author
#8 lore raw
Quoted 9 lines · Bjorn Helgaas
Quoted 6 lines · Nirmoy Das

Add PCI_VENDOR_ID_ASPEED to the shared pci_ids.h header and remove the duplicate local definition from ehci-pci.c.

This prepares for adding a PCI quirk for ASPEED devices.

Applied both to pci/iommu for v6.20, with s/PCI_BRIDGE_NO_ALIASES/PCI_BRIDGE_NO_ALIAS/, thanks!

Thanks a lot!

Quoted 34 lines
Quoted 34 lines
---
  drivers/usb/host/ehci-pci.c | 1 -
  include/linux/pci_ids.h     | 2 ++
  2 files changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-pci.c +0 -1
index 889dc4426271..bd3a63555594 100644
@@ -21,7 +21,6 @@ static const char hcd_name[] = "ehci-pci";
  /* defined here to avoid adding to pci_ids.h for single instance use */
  #define PCI_DEVICE_ID_INTEL_CE4100_USB	0x2e70
 
-#define PCI_VENDOR_ID_ASPEED		0x1a03
  #define PCI_DEVICE_ID_ASPEED_EHCI	0x2603
 
  /*-------------------------------------------------------------------------*/
include/linux/pci_ids.h +2 -0
index a9a089566b7c..30dd854a9156 100644
@@ -2583,6 +2583,8 @@
  #define PCI_DEVICE_ID_NETRONOME_NFP3800_VF	0x3803
  #define PCI_DEVICE_ID_NETRONOME_NFP6000_VF	0x6003
 
+#define PCI_VENDOR_ID_ASPEED		0x1a03
+
  #define PCI_VENDOR_ID_QMI		0x1a32
 
  #define PCI_VENDOR_ID_AZWAVE		0x1a3b
Signature · 1 line
2.43.0