aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libata-core.c5
-rw-r--r--drivers/scsi/libata-scsi.c4
-rw-r--r--drivers/scsi/scsi_sysfs.c2
3 files changed, 6 insertions, 5 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 */
4339int ata_device_suspend(struct ata_port *ap, struct ata_device *dev) 4339int 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}
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index a1259b242b8e..1fd3826da97e 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -414,12 +414,12 @@ int ata_scsi_device_resume(struct scsi_device *sdev)
414 return ata_device_resume(ap, dev); 414 return ata_device_resume(ap, dev);
415} 415}
416 416
417int ata_scsi_device_suspend(struct scsi_device *sdev) 417int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state)
418{ 418{
419 struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; 419 struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0];
420 struct ata_device *dev = &ap->device[sdev->id]; 420 struct ata_device *dev = &ap->device[sdev->id];
421 421
422 return ata_device_suspend(ap, dev); 422 return ata_device_suspend(ap, dev, state);
423} 423}
424 424
425/** 425/**
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 89055494dfee..a6fde52946d6 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -286,7 +286,7 @@ static int scsi_bus_suspend(struct device * dev, pm_message_t state)
286 return err; 286 return err;
287 287
288 if (sht->suspend) 288 if (sht->suspend)
289 err = sht->suspend(sdev); 289 err = sht->suspend(sdev, state);
290 290
291 return err; 291 return err;
292} 292}