Skip to content

Commit b97a797

Browse files
niklas88Alexander Gordeev
authored andcommitted
s390/pci: Do not try re-enabling load/store if device is disabled
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: [email protected] Fixes: 4cdf2f4 ("s390/pci: implement minimal PCI error recovery") Reviewed-by: Farhan Ali <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 4553792 commit b97a797

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/s390/pci/pci_event.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ static pci_ers_result_t zpci_event_do_error_state_clear(struct pci_dev *pdev,
106106
struct zpci_dev *zdev = to_zpci(pdev);
107107
int rc;
108108

109+
/* The underlying device may have been disabled by the event */
110+
if (!zdev_enabled(zdev))
111+
return PCI_ERS_RESULT_NEED_RESET;
112+
109113
pr_info("%s: Unblocking device access for examination\n", pci_name(pdev));
110114
rc = zpci_reset_load_store_blocked(zdev);
111115
if (rc) {

0 commit comments

Comments
 (0)