summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-eh.c21
-rw-r--r--drivers/ata/libata-pmp.c1
-rw-r--r--drivers/ata/libata-scsi.c1
3 files changed, 8 insertions, 15 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index f7cae6400155..e6584fa7f456 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1079,12 +1079,6 @@ void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev,
spin_lock_irqsave(ap->lock, flags);
- /* suck in and clear reset modifier */
- if (action & ATA_EH_RESET) {
- ehc->i.flags |= ehi->flags & ATA_EHI_RESET_MODIFIER_MASK;
- ehi->flags &= ~ATA_EHI_RESET_MODIFIER_MASK;
- }
-
ata_eh_clear_action(link, dev, ehi, action);
if (!(ehc->i.flags & ATA_EHI_QUIET))
@@ -1110,10 +1104,6 @@ void ata_eh_done(struct ata_link *link, struct ata_device *dev,
{
struct ata_eh_context *ehc = &link->eh_context;
- /* if reset is complete, clear reset modifier */
- if (action & ATA_EH_RESET)
- ehc->i.flags &= ~ATA_EHI_RESET_MODIFIER_MASK;
-
ata_eh_clear_action(link, dev, &ehc->i, action);
}
@@ -2491,6 +2481,7 @@ static int ata_link_nr_vacant(struct ata_link *link)
static int ata_eh_skip_recovery(struct ata_link *link)
{
+ struct ata_port *ap = link->ap;
struct ata_eh_context *ehc = &link->eh_context;
struct ata_device *dev;
@@ -2498,9 +2489,13 @@ static int ata_eh_skip_recovery(struct ata_link *link)
if (link->flags & ATA_LFLAG_DISABLED)
return 1;
- /* thaw frozen port, resume link and recover failed devices */
- if ((link->ap->pflags & ATA_PFLAG_FROZEN) ||
- (ehc->i.flags & ATA_EHI_RESUME_LINK) || ata_link_nr_enabled(link))
+ /* thaw frozen port and recover failed devices */
+ if ((ap->pflags & ATA_PFLAG_FROZEN) || ata_link_nr_enabled(link))
+ return 0;
+
+ /* reset at least once if reset is requested */
+ if ((ehc->i.action & ATA_EH_RESET) &&
+ !(ehc->i.flags & ATA_EHI_DID_RESET))
return 0;
/* skip if class codes for all vacant slots are ATA_DEV_NONE */
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 7f8bcffa81ad..df1d3252b9e6 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -437,7 +437,6 @@ static int sata_pmp_init_links(struct ata_port *ap, int nr_ports)
link->flags = 0;
ehc->i.probe_mask |= 1;
ehc->i.action |= ATA_EH_RESET;
- ehc->i.flags |= ATA_EHI_RESUME_LINK;
}
return 0;
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 1f036a7b14f3..caffca7dd76f 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3517,7 +3517,6 @@ static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
struct ata_eh_info *ehi = &dev->link->eh_info;
ehi->probe_mask |= 1 << dev->devno;
ehi->action |= ATA_EH_RESET;
- ehi->flags |= ATA_EHI_RESUME_LINK;
} else
rc = -EINVAL;
}