aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index be95fdb69726..02e7ba43a3b3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3949,17 +3949,6 @@ int ata_std_prereset(struct ata_link *link, unsigned long deadline)
3949 const unsigned long *timing = sata_ehc_deb_timing(ehc); 3949 const unsigned long *timing = sata_ehc_deb_timing(ehc);
3950 int rc; 3950 int rc;
3951 3951
3952 /* handle link resume */
3953 if ((ehc->i.flags & ATA_EHI_RESUME_LINK) &&
3954 (link->flags & ATA_LFLAG_HRST_TO_RESUME))
3955 ehc->i.action |= ATA_EH_HARDRESET;
3956
3957 /* Some PMPs don't work with only SRST, force hardreset if PMP
3958 * is supported.
3959 */
3960 if (ap->flags & ATA_FLAG_PMP)
3961 ehc->i.action |= ATA_EH_HARDRESET;
3962
3963 /* if we're about to do hardreset, nothing more to do */ 3952 /* if we're about to do hardreset, nothing more to do */
3964 if (ehc->i.action & ATA_EH_HARDRESET) 3953 if (ehc->i.action & ATA_EH_HARDRESET)
3965 return 0; 3954 return 0;
@@ -6055,9 +6044,9 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
6055 if (ata_sg_setup(qc)) 6044 if (ata_sg_setup(qc))
6056 goto sg_err; 6045 goto sg_err;
6057 6046
6058 /* if device is sleeping, schedule softreset and abort the link */ 6047 /* if device is sleeping, schedule reset and abort the link */
6059 if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) { 6048 if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) {
6060 link->eh_info.action |= ATA_EH_SOFTRESET; 6049 link->eh_info.action |= ATA_EH_RESET;
6061 ata_ehi_push_desc(&link->eh_info, "waking up from sleep"); 6050 ata_ehi_push_desc(&link->eh_info, "waking up from sleep");
6062 ata_link_abort(link); 6051 ata_link_abort(link);
6063 return; 6052 return;
@@ -6634,7 +6623,7 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)
6634 */ 6623 */
6635void ata_host_resume(struct ata_host *host) 6624void ata_host_resume(struct ata_host *host)
6636{ 6625{
6637 ata_host_request_pm(host, PMSG_ON, ATA_EH_SOFTRESET, 6626 ata_host_request_pm(host, PMSG_ON, ATA_EH_RESET,
6638 ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); 6627 ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0);
6639 host->dev->power.power_state = PMSG_ON; 6628 host->dev->power.power_state = PMSG_ON;
6640 6629
@@ -7171,7 +7160,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
7171 7160
7172 ehi->probe_mask = 7161 ehi->probe_mask =
7173 (1 << ata_link_max_devices(&ap->link)) - 1; 7162 (1 << ata_link_max_devices(&ap->link)) - 1;
7174 ehi->action |= ATA_EH_SOFTRESET; 7163 ehi->action |= ATA_EH_RESET;
7175 ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET; 7164 ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET;
7176 7165
7177 ap->pflags &= ~ATA_PFLAG_INITIALIZING; 7166 ap->pflags &= ~ATA_PFLAG_INITIALIZING;