Patch "PCI/EDR: Clear Device Status after EDR error recovery" has been added to the 6.1-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: Clear Device Status after EDR error recovery

to the 6.1-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-clear-device-status-after-edr-error-recovery.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 2bb5b13a8fcc9f91647dc6eacde2033a1da218ba
Author: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
Date:   Wed Mar 15 16:54:49 2023 -0700

    PCI/EDR: Clear Device Status after EDR error recovery
    
    [ Upstream commit c441b1e03da6c680a3e12da59c554f454f2ccf5e ]
    
    During EDR recovery, the OS must clear error status of the port that
    triggered DPC even if firmware retains control of DPC and AER (see the
    implementation note in the PCI Firmware spec r3.3, sec 4.6.12).
    
    Prior to 068c29a248b6 ("PCI/ERR: Clear PCIe Device Status errors only if
    OS owns AER"), the port Device Status was cleared in this path:
    
      edr_handle_event
        dpc_process_error(dev)                 # "dev" triggered DPC
        pcie_do_recovery(dev, dpc_reset_link)
          dpc_reset_link                       # exit DPC
          pcie_clear_device_status(dev)        # clear Device Status
    
    After 068c29a248b6, pcie_do_recovery() no longer clears Device Status when
    firmware controls AER, so the error bit remains set even after recovery.
    
    Per the "Downstream Port Containment configuration control" bit in the
    returned _OSC Control Field (sec 4.5.1), the OS is allowed to clear error
    status until it evaluates _OST, so clear Device Status in
    edr_handle_event() if the error recovery was successful.
    
    [bhelgaas: commit log]
    Fixes: 068c29a248b6 ("PCI/ERR: Clear PCIe Device Status errors only if OS owns AER")
    Link: https://lore.kernel.org/r/20230315235449.1279209-1-sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx
    Reported-by: Tsaur Erwin <erwin.tsaur@xxxxxxxxx>
    Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
    Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/pcie/edr.c b/drivers/pci/pcie/edr.c
index a6b9b479b97ad..87734e4c3c204 100644
--- a/drivers/pci/pcie/edr.c
+++ b/drivers/pci/pcie/edr.c
@@ -193,6 +193,7 @@ static void edr_handle_event(acpi_handle handle, u32 event, void *data)
 	 */
 	if (estate == PCI_ERS_RESULT_RECOVERED) {
 		pci_dbg(edev, "DPC port successfully recovered\n");
+		pcie_clear_device_status(edev);
 		acpi_send_edr_status(pdev, edev, EDR_OST_SUCCESS);
 	} else {
 		pci_dbg(edev, "DPC port recovery failed\n");



[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