Patch "PCI/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3" has been added to the 6.8-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/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3

to the 6.8-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-edr-align-edr_port_locate_dsm-with-pci-firmware-.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 083fa6ca6946f107b0f13ba3a5ac2a3833249e11
Author: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
Date:   Wed May 8 14:31:38 2024 -0500

    PCI/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3
    
    [ Upstream commit e2e78a294a8a863898b781dbcf90e087eda3155d ]
    
    The "Downstream Port Containment related Enhancements" ECN of Jan 28, 2019
    (document 12888 below), defined the EDR_PORT_LOCATE_DSM function with
    Revision ID 5 with a return value encoding (Bits 2:0 = Function, Bits 7:3 =
    Device, Bits 15:8 = Bus).  When the ECN was integrated into PCI Firmware
    r3.3, sec 4.6.13, Bit 31 was added to indicate success or failure.
    
    Check Bit 31 for failure in acpi_dpc_port_get().
    
    Link: https://lore.kernel.org/r/20240501022543.1626025-1-sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx
    Link: https://members.pcisig.com/wg/PCI-SIG/document/12888
    Fixes: ac1c8e35a326 ("PCI/DPC: Add Error Disconnect Recover (EDR) support")
    Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
    [bhelgaas: split into two patches, update commit log]
    Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Tested-by: Satish Thatchanamurthy <Satish.Thatchanamurt@xxxxxxxx> # one platform
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/pcie/edr.c b/drivers/pci/pcie/edr.c
index fa085677c91de..e86298dbbcff6 100644
--- a/drivers/pci/pcie/edr.c
+++ b/drivers/pci/pcie/edr.c
@@ -80,8 +80,9 @@ static struct pci_dev *acpi_dpc_port_get(struct pci_dev *pdev)
 	u16 port;
 
 	/*
-	 * Behavior when calling unsupported _DSM functions is undefined,
-	 * so check whether EDR_PORT_DPC_ENABLE_DSM is supported.
+	 * If EDR_PORT_LOCATE_DSM is not implemented under the target of
+	 * EDR, the target is the port that experienced the containment
+	 * event (PCI Firmware r3.3, sec 4.6.13).
 	 */
 	if (!acpi_check_dsm(adev->handle, &pci_acpi_dsm_guid, 5,
 			    1ULL << EDR_PORT_LOCATE_DSM))
@@ -98,6 +99,16 @@ static struct pci_dev *acpi_dpc_port_get(struct pci_dev *pdev)
 		return NULL;
 	}
 
+	/*
+	 * Bit 31 represents the success/failure of the operation. If bit
+	 * 31 is set, the operation failed.
+	 */
+	if (obj->integer.value & BIT(31)) {
+		ACPI_FREE(obj);
+		pci_err(pdev, "Locate Port _DSM failed\n");
+		return NULL;
+	}
+
 	/*
 	 * Firmware returns DPC port BDF details in following format:
 	 *	15:8 = bus




[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