Patch "s390/pci: Handle PCI error codes other than 0x3a" 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

    s390/pci: Handle PCI error codes other than 0x3a

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:
     s390-pci-handle-pci-error-codes-other-than-0x3a.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 ac4d0b9c1c8647af984c2616cf39615159eead91
Author: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
Date:   Thu Apr 11 14:01:39 2024 +0200

    s390/pci: Handle PCI error codes other than 0x3a
    
    [ Upstream commit 3cd03ea57e8e16cc78cc357d5e9f26078426f236 ]
    
    The Linux implementation of PCI error recovery for s390 was based on the
    understanding that firmware error recovery is a two step process with an
    optional initial error event to indicate the cause of the error if known
    followed by either error event 0x3A (Success) or 0x3B (Failure) to
    indicate whether firmware was able to recover. While this has been the
    case in testing and the error cases seen in the wild it turns out this
    is not correct. Instead firmware only generates 0x3A for some error and
    service scenarios and expects the OS to perform recovery for all PCI
    events codes except for those indicating permanent error (0x3B, 0x40)
    and those indicating errors on the function measurement block (0x2A,
    0x2B, 0x2C). Align Linux behavior with these expectations.
    
    Fixes: 4cdf2f4e24ff ("s390/pci: implement minimal PCI error recovery")
    Reviewed-by: Gerd Bayer <gbayer@xxxxxxxxxxxxx>
    Signed-off-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
    Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c
index b9324ca2eb940..b3961f1016ea0 100644
--- a/arch/s390/pci/pci_event.c
+++ b/arch/s390/pci/pci_event.c
@@ -272,18 +272,19 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
 		goto no_pdev;
 
 	switch (ccdf->pec) {
-	case 0x003a: /* Service Action or Error Recovery Successful */
+	case 0x002a: /* Error event concerns FMB */
+	case 0x002b:
+	case 0x002c:
+		break;
+	case 0x0040: /* Service Action or Error Recovery Failed */
+	case 0x003b:
+		zpci_event_io_failure(pdev, pci_channel_io_perm_failure);
+		break;
+	default: /* PCI function left in the error state attempt to recover */
 		ers_res = zpci_event_attempt_error_recovery(pdev);
 		if (ers_res != PCI_ERS_RESULT_RECOVERED)
 			zpci_event_io_failure(pdev, pci_channel_io_perm_failure);
 		break;
-	default:
-		/*
-		 * Mark as frozen not permanently failed because the device
-		 * could be subsequently recovered by the platform.
-		 */
-		zpci_event_io_failure(pdev, pci_channel_io_frozen);
-		break;
 	}
 	pci_dev_put(pdev);
 no_pdev:




[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