Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23489
b: refs/heads/master
c: 082776e
h: refs/heads/master
i:
  23487: 7cdac02
v: v3
  • Loading branch information
Nigel Cunningham authored and Jeff Garzik committed Mar 24, 2006
1 parent de93f0a commit 40807a1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83206a2903fd2ddb1761d906b2b3b3de17ef87f1
refs/heads/master: 082776e4be791736c32baf818e50f501a7f83819
5 changes: 3 additions & 2 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4336,14 +4336,15 @@ int ata_device_resume(struct ata_port *ap, struct ata_device *dev)
* Flush the cache on the drive, if appropriate, then issue a
* standbynow command.
*/
int ata_device_suspend(struct ata_port *ap, struct ata_device *dev)
int ata_device_suspend(struct ata_port *ap, struct ata_device *dev, pm_message_t state)
{
if (!ata_dev_present(dev))
return 0;
if (dev->class == ATA_DEV_ATA)
ata_flush_cache(ap, dev);

ata_standby_drive(ap, dev);
if (state.event != PM_EVENT_FREEZE)
ata_standby_drive(ap, dev);
ap->flags |= ATA_FLAG_SUSPENDED;
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,12 @@ int ata_scsi_device_resume(struct scsi_device *sdev)
return ata_device_resume(ap, dev);
}

int ata_scsi_device_suspend(struct scsi_device *sdev)
int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state)
{
struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0];
struct ata_device *dev = &ap->device[sdev->id];

return ata_device_suspend(ap, dev);
return ata_device_suspend(ap, dev, state);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/scsi_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static int scsi_bus_suspend(struct device * dev, pm_message_t state)
return err;

if (sht->suspend)
err = sht->suspend(sdev);
err = sht->suspend(sdev, state);

return err;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,9 @@ extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
extern int ata_scsi_release(struct Scsi_Host *host);
extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc);
extern int ata_scsi_device_resume(struct scsi_device *);
extern int ata_scsi_device_suspend(struct scsi_device *);
extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state);
extern int ata_device_resume(struct ata_port *, struct ata_device *);
extern int ata_device_suspend(struct ata_port *, struct ata_device *);
extern int ata_device_suspend(struct ata_port *, struct ata_device *, pm_message_t state);
extern int ata_ratelimit(void);
extern unsigned int ata_busy_sleep(struct ata_port *ap,
unsigned long timeout_pat,
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/scsi/scsi_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ struct scsi_host_template {
* suspend support
*/
int (*resume)(struct scsi_device *);
int (*suspend)(struct scsi_device *);
int (*suspend)(struct scsi_device *, pm_message_t state);

/*
* Name of proc directory
Expand Down

0 comments on commit 40807a1

Please sign in to comment.