Skip to content

Commit 184ff1f

Browse files
committed
s390/pci: Handle PCI error codes other than 0x3a
jira LE-2349 Rebuild_History Non-Buildable kernel-4.18.0-553.40.1.el8_10 commit-author Niklas Schnelle <schnelle@linux.ibm.com> commit 3cd03ea 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: 4cdf2f4 ("s390/pci: implement minimal PCI error recovery") Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> (cherry picked from commit 3cd03ea) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 26d9a06 commit 184ff1f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

arch/s390/pci/pci_event.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,18 +272,19 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf)
272272
goto no_pdev;
273273

274274
switch (ccdf->pec) {
275-
case 0x003a: /* Service Action or Error Recovery Successful */
275+
case 0x002a: /* Error event concerns FMB */
276+
case 0x002b:
277+
case 0x002c:
278+
break;
279+
case 0x0040: /* Service Action or Error Recovery Failed */
280+
case 0x003b:
281+
zpci_event_io_failure(pdev, pci_channel_io_perm_failure);
282+
break;
283+
default: /* PCI function left in the error state attempt to recover */
276284
ers_res = zpci_event_attempt_error_recovery(pdev);
277285
if (ers_res != PCI_ERS_RESULT_RECOVERED)
278286
zpci_event_io_failure(pdev, pci_channel_io_perm_failure);
279287
break;
280-
default:
281-
/*
282-
* Mark as frozen not permanently failed because the device
283-
* could be subsequently recovered by the platform.
284-
*/
285-
zpci_event_io_failure(pdev, pci_channel_io_frozen);
286-
break;
287288
}
288289
pci_dev_put(pdev);
289290
no_pdev:

0 commit comments

Comments
 (0)