]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: Add PCI_BRIDGE_NO_ALIAS quirk for ASPEED AST1150
authorNirmoy Das <nirmoyd@nvidia.com>
Wed, 17 Dec 2025 15:45:29 +0000 (07:45 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 13 Jan 2026 17:46:33 +0000 (11:46 -0600)
ASPEED BMC controllers have VGA and USB functions behind a PCIe-to-PCI
bridge that causes them to share the same StreamID:

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

Both devices get StreamID 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_ALIAS flag and apply it to the
AST1150.

Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://patch.msgid.link/20251217154529.377586-2-nirmoyd@nvidia.com
drivers/pci/quirks.c
drivers/pci/search.c
include/linux/pci.h

index b9c252aa6fe08a864cebe245f5dd7bf41fcc5116..7404fb0ff146fc2ef116dddcb723ec526c15b2bb 100644 (file)
@@ -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_alias(struct pci_dev *pdev)
+{
+       pdev->dev_flags |= PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIAS;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ASPEED, 0x1150, quirk_aspeed_pci_bridge_no_alias);
+
 /*
  * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero)
  * class code.  Fix it.
index e6e84dc62e82652e6eae5667801dc5ab0bc56cdb..e3d3177fce549e3b822e3f7cc303ab50564b357d 100644 (file)
@@ -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_ALIAS)
+                                       continue;
                                ret = fn(tmp,
                                         PCI_DEVID(tmp->subordinate->number,
                                                   PCI_DEVFN(0, 0)), data);
index 864775651c6fae125972cdfb062fd4d684cf294c..48d5b9dac5f1e0fc1afee2e6a886b503a26fac58 100644 (file)
@@ -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_ALIAS = (__force pci_dev_flags_t) (1 << 14),
 };
 
 enum pci_irq_reroute_variant {