diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ata/libata-core.c | 14 | ||||
| -rw-r--r-- | drivers/ata/libata-eh.c | 4 |
2 files changed, 17 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c035b3d041ee..932eaee50245 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -5418,6 +5418,7 @@ static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg, | |||
| 5418 | */ | 5418 | */ |
| 5419 | int ata_host_suspend(struct ata_host *host, pm_message_t mesg) | 5419 | int ata_host_suspend(struct ata_host *host, pm_message_t mesg) |
| 5420 | { | 5420 | { |
| 5421 | unsigned int ehi_flags = ATA_EHI_QUIET; | ||
| 5421 | int rc; | 5422 | int rc; |
| 5422 | 5423 | ||
| 5423 | /* | 5424 | /* |
| @@ -5426,7 +5427,18 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg) | |||
| 5426 | */ | 5427 | */ |
| 5427 | ata_lpm_enable(host); | 5428 | ata_lpm_enable(host); |
| 5428 | 5429 | ||
| 5429 | rc = ata_host_request_pm(host, mesg, 0, ATA_EHI_QUIET, 1); | 5430 | /* |
| 5431 | * On some hardware, device fails to respond after spun down | ||
| 5432 | * for suspend. As the device won't be used before being | ||
| 5433 | * resumed, we don't need to touch the device. Ask EH to skip | ||
| 5434 | * the usual stuff and proceed directly to suspend. | ||
| 5435 | * | ||
| 5436 | * http://thread.gmane.org/gmane.linux.ide/46764 | ||
| 5437 | */ | ||
| 5438 | if (mesg.event == PM_EVENT_SUSPEND) | ||
| 5439 | ehi_flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_NO_RECOVERY; | ||
| 5440 | |||
| 5441 | rc = ata_host_request_pm(host, mesg, 0, ehi_flags, 1); | ||
| 5430 | if (rc == 0) | 5442 | if (rc == 0) |
| 5431 | host->dev->power.power_state = mesg; | 5443 | host->dev->power.power_state = mesg; |
| 5432 | return rc; | 5444 | return rc; |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index c9ae299b8342..e48302eae55f 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -3235,6 +3235,10 @@ static int ata_eh_skip_recovery(struct ata_link *link) | |||
| 3235 | if (link->flags & ATA_LFLAG_DISABLED) | 3235 | if (link->flags & ATA_LFLAG_DISABLED) |
| 3236 | return 1; | 3236 | return 1; |
| 3237 | 3237 | ||
| 3238 | /* skip if explicitly requested */ | ||
| 3239 | if (ehc->i.flags & ATA_EHI_NO_RECOVERY) | ||
| 3240 | return 1; | ||
| 3241 | |||
| 3238 | /* thaw frozen port and recover failed devices */ | 3242 | /* thaw frozen port and recover failed devices */ |
| 3239 | if ((ap->pflags & ATA_PFLAG_FROZEN) || ata_link_nr_enabled(link)) | 3243 | if ((ap->pflags & ATA_PFLAG_FROZEN) || ata_link_nr_enabled(link)) |
| 3240 | return 0; | 3244 | return 0; |
