[PATCH v3 3/4] s390/pci: Report SCLP status on error events when no pdev is associated

From: Niklas Schnelle

Date: Wed Sep 16 2026 - 11:42:31 EST


With commit 4ec6054e7321 ("s390/pci: Report PCI error recovery results
via SCLP") SCLP reports are generated when recovery is performed in
response to an error event. If such an error event arrives but no pdev
is currently associated with the zdev, e.g. because it was removed or
not yet probed, no report is generated. Fix this by generating a report
specific to an error event for a zdev without an associated pdev.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 4ec6054e7321 ("s390/pci: Report PCI error recovery results via SCLP")
Signed-off-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
---
arch/s390/pci/pci_event.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c
index ec93f34b6e19..7b538c6ae11b 100644
--- a/arch/s390/pci/pci_event.c
+++ b/arch/s390/pci/pci_event.c
@@ -361,8 +361,10 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf)

__zpci_event_print_error(pdev, ccdf);

- if (!pdev)
+ if (!pdev) {
+ zpci_report_status(zdev, NULL, "error event", "no pdev bound");
goto no_pdev;
+ }

switch (ccdf->pec) {
case 0x002a: /* Error event concerns FMB */

--
2.53.0