[SRU][N/P][PATCH 2/2] s390/pci: Do not try re-enabling load/store if device is disabled
Massimiliano Pellizzer
massimiliano.pellizzer at canonical.com
Fri Aug 29 07:50:00 UTC 2025
From: Niklas Schnelle <schnelle at linux.ibm.com>
BugLink: https://bugs.launchpad.net/bugs/2121149
If a device is disabled unblocking load/store on its own is not useful
as a full re-enable of the function is necessary anyway. Note that SCLP
Write Event Data Action Qualifier 0 (Reset) leaves the device disabled
and triggers this case unless the driver already requests a reset.
Cc: stable at vger.kernel.org
Fixes: 4cdf2f4e24ff ("s390/pci: implement minimal PCI error recovery")
Reviewed-by: Farhan Ali <alifm at linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle at linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev at linux.ibm.com>
(cherry picked from commit b97a7972b1f4f81417840b9a2ab0c19722b577d5)
Signed-off-by: Massimiliano Pellizzer <massimiliano.pellizzer at canonical.com>
---
arch/s390/pci/pci_event.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c
index 82ee2578279a..6c8922ad70f3 100644
--- a/arch/s390/pci/pci_event.c
+++ b/arch/s390/pci/pci_event.c
@@ -106,6 +106,10 @@ static pci_ers_result_t zpci_event_do_error_state_clear(struct pci_dev *pdev,
struct zpci_dev *zdev = to_zpci(pdev);
int rc;
+ /* The underlying device may have been disabled by the event */
+ if (!zdev_enabled(zdev))
+ return PCI_ERS_RESULT_NEED_RESET;
+
pr_info("%s: Unblocking device access for examination\n", pci_name(pdev));
rc = zpci_reset_load_store_blocked(zdev);
if (rc) {
--
2.48.1
More information about the kernel-team
mailing list