diff options
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 6970f6867334..d8f77f2a5af1 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -4336,14 +4336,15 @@ int ata_device_resume(struct ata_port *ap, struct ata_device *dev) | |||
4336 | * Flush the cache on the drive, if appropriate, then issue a | 4336 | * Flush the cache on the drive, if appropriate, then issue a |
4337 | * standbynow command. | 4337 | * standbynow command. |
4338 | */ | 4338 | */ |
4339 | int ata_device_suspend(struct ata_port *ap, struct ata_device *dev) | 4339 | int ata_device_suspend(struct ata_port *ap, struct ata_device *dev, pm_message_t state) |
4340 | { | 4340 | { |
4341 | if (!ata_dev_present(dev)) | 4341 | if (!ata_dev_present(dev)) |
4342 | return 0; | 4342 | return 0; |
4343 | if (dev->class == ATA_DEV_ATA) | 4343 | if (dev->class == ATA_DEV_ATA) |
4344 | ata_flush_cache(ap, dev); | 4344 | ata_flush_cache(ap, dev); |
4345 | 4345 | ||
4346 | ata_standby_drive(ap, dev); | 4346 | if (state.event != PM_EVENT_FREEZE) |
4347 | ata_standby_drive(ap, dev); | ||
4347 | ap->flags |= ATA_FLAG_SUSPENDED; | 4348 | ap->flags |= ATA_FLAG_SUSPENDED; |
4348 | return 0; | 4349 | return 0; |
4349 | } | 4350 | } |