diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b7c972dc8b9b..497adea1f0d6 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -5333,9 +5333,6 @@ static int ata_port_request_pm(struct ata_port *ap, pm_message_t mesg, | |||
5333 | 5333 | ||
5334 | static int __ata_port_suspend_common(struct ata_port *ap, pm_message_t mesg, int *async) | 5334 | static int __ata_port_suspend_common(struct ata_port *ap, pm_message_t mesg, int *async) |
5335 | { | 5335 | { |
5336 | unsigned int ehi_flags = ATA_EHI_QUIET; | ||
5337 | int rc; | ||
5338 | |||
5339 | /* | 5336 | /* |
5340 | * On some hardware, device fails to respond after spun down | 5337 | * On some hardware, device fails to respond after spun down |
5341 | * for suspend. As the device won't be used before being | 5338 | * for suspend. As the device won't be used before being |
@@ -5344,11 +5341,9 @@ static int __ata_port_suspend_common(struct ata_port *ap, pm_message_t mesg, int | |||
5344 | * | 5341 | * |
5345 | * http://thread.gmane.org/gmane.linux.ide/46764 | 5342 | * http://thread.gmane.org/gmane.linux.ide/46764 |
5346 | */ | 5343 | */ |
5347 | if (mesg.event & PM_EVENT_SUSPEND) | 5344 | unsigned int ehi_flags = ATA_EHI_QUIET | ATA_EHI_NO_AUTOPSY | |
5348 | ehi_flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_NO_RECOVERY; | 5345 | ATA_EHI_NO_RECOVERY; |
5349 | 5346 | return ata_port_request_pm(ap, mesg, 0, ehi_flags, async); | |
5350 | rc = ata_port_request_pm(ap, mesg, 0, ehi_flags, async); | ||
5351 | return rc; | ||
5352 | } | 5347 | } |
5353 | 5348 | ||
5354 | static int ata_port_suspend_common(struct device *dev, pm_message_t mesg) | 5349 | static int ata_port_suspend_common(struct device *dev, pm_message_t mesg) |
@@ -5369,16 +5364,13 @@ static int ata_port_suspend(struct device *dev) | |||
5369 | static int ata_port_do_freeze(struct device *dev) | 5364 | static int ata_port_do_freeze(struct device *dev) |
5370 | { | 5365 | { |
5371 | if (pm_runtime_suspended(dev)) | 5366 | if (pm_runtime_suspended(dev)) |
5372 | pm_runtime_resume(dev); | 5367 | return 0; |
5373 | 5368 | ||
5374 | return ata_port_suspend_common(dev, PMSG_FREEZE); | 5369 | return ata_port_suspend_common(dev, PMSG_FREEZE); |
5375 | } | 5370 | } |
5376 | 5371 | ||
5377 | static int ata_port_poweroff(struct device *dev) | 5372 | static int ata_port_poweroff(struct device *dev) |
5378 | { | 5373 | { |
5379 | if (pm_runtime_suspended(dev)) | ||
5380 | return 0; | ||
5381 | |||
5382 | return ata_port_suspend_common(dev, PMSG_HIBERNATE); | 5374 | return ata_port_suspend_common(dev, PMSG_HIBERNATE); |
5383 | } | 5375 | } |
5384 | 5376 | ||