Message ID | 20231225151915.258816-2-phill@thesusis.net |
---|---|
State | New |
Headers | show |
Series | Only activate drive once during system resume | expand |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 120f7d7fb450..97284b5b67d1 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -713,7 +713,7 @@ void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap) ehc->saved_ncq_enabled |= 1 << devno; /* If we are resuming, wake up the device */ - if (ap->pflags & ATA_PFLAG_RESUMING) + if (ap->eh_tries == ATA_EH_MAX_TRIES && ap->pflags & ATA_PFLAG_RESUMING) ehc->i.dev_action[devno] |= ATA_EH_SET_ACTIVE; } }