]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: Do not enable AtomicOps by RCiEPs
authorGerd Bayer <gbayer@linux.ibm.com>
Mon, 30 Mar 2026 13:09:44 +0000 (15:09 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 3 Apr 2026 21:39:21 +0000 (16:39 -0500)
Since Root Complex Integrated Endpoints (RCiEPs) attach to a bus that has
no bridge device describing the Root Port, the capability to complete
AtomicOps requests cannot be determined with PCIe methods.

Change default of pci_enable_atomic_ops_to_root() to not enable AtomicOps
requests on RCiEPs.

As far as we know, there are no RCiEPs that need AtomicOps (see Link
below).

Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260330-fix_pciatops-v7-1-f601818417e8@linux.ibm.com
drivers/pci/pci.c

index 8479c2e1f74f1044416281aba11bf071ea89488a..135e5b591df405e87e7f520a618d7e2ccba55ce1 100644 (file)
@@ -3692,15 +3692,14 @@ int pci_enable_atomic_ops_to_root(struct pci_dev *dev, u32 cap_mask)
 
        /*
         * Per PCIe r4.0, sec 6.15, endpoints and root ports may be
-        * AtomicOp requesters.  For now, we only support endpoints as
-        * requesters and root ports as completers.  No endpoints as
+        * AtomicOp requesters.  For now, we only support (legacy) endpoints
+        * as requesters and root ports as completers.  No endpoints as
         * completers, and no peer-to-peer.
         */
 
        switch (pci_pcie_type(dev)) {
        case PCI_EXP_TYPE_ENDPOINT:
        case PCI_EXP_TYPE_LEG_END:
-       case PCI_EXP_TYPE_RC_END:
                break;
        default:
                return -EINVAL;