Patch "PCI: Fix pci_enable_acs() support for the ACS quirks" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PCI: Fix pci_enable_acs() support for the ACS quirks

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-fix-pci_enable_acs-support-for-the-acs-quirks.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d1b7c32585eeaa670c1eadb79f8c9284214f7cab
Author: Jason Gunthorpe <jgg@xxxxxxxx>
Date:   Wed Oct 16 20:52:33 2024 -0300

    PCI: Fix pci_enable_acs() support for the ACS quirks
    
    [ Upstream commit f3c3ccc4fe49dbc560b01d16bebd1b116c46c2b4 ]
    
    There are ACS quirks that hijack the normal ACS processing and deliver to
    to special quirk code. The enable path needs to call
    pci_dev_specific_enable_acs() and then pci_dev_specific_acs_enabled() will
    report the hidden ACS state controlled by the quirk.
    
    The recent rework got this out of order and we should try to call
    pci_dev_specific_enable_acs() regardless of any actual ACS support in the
    device.
    
    As before command line parameters that effect standard PCI ACS don't
    interact with the quirk versions, including the new config_acs= option.
    
    Link: https://lore.kernel.org/r/0-v1-f96b686c625b+124-pci_acs_quirk_fix_jgg@xxxxxxxxxx
    Fixes: 47c8846a49ba ("PCI: Extend ACS configurability")
    Reported-by: Jiri Slaby <jirislaby@xxxxxxxxxx>
    Closes: https://lore.kernel.org/all/e89107da-ac99-4d3a-9527-a4df9986e120@xxxxxxxxxx
    Closes: https://bugzilla.suse.com/show_bug.cgi?id=1229019
    Tested-by: Steffen Dirkwinkel <me@xxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 85ced6958d6d1..51407c376a222 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1067,8 +1067,15 @@ static void pci_std_enable_acs(struct pci_dev *dev, struct pci_acs *caps)
 static void pci_enable_acs(struct pci_dev *dev)
 {
 	struct pci_acs caps;
+	bool enable_acs = false;
 	int pos;
 
+	/* If an iommu is present we start with kernel default caps */
+	if (pci_acs_enable) {
+		if (pci_dev_specific_enable_acs(dev))
+			enable_acs = true;
+	}
+
 	pos = dev->acs_cap;
 	if (!pos)
 		return;
@@ -1077,11 +1084,8 @@ static void pci_enable_acs(struct pci_dev *dev)
 	pci_read_config_word(dev, pos + PCI_ACS_CTRL, &caps.ctrl);
 	caps.fw_ctrl = caps.ctrl;
 
-	/* If an iommu is present we start with kernel default caps */
-	if (pci_acs_enable) {
-		if (pci_dev_specific_enable_acs(dev))
-			pci_std_enable_acs(dev, &caps);
-	}
+	if (enable_acs)
+		pci_std_enable_acs(dev, &caps);
 
 	/*
 	 * Always apply caps from the command line, even if there is no iommu.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux