aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_pm.c
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2012-11-09 15:27:51 +0800
committerJames Bottomley <JBottomley@Parallels.com>2012-11-30 09:22:09 +0000
commita01475637c70a4a484dd315a90bf2df518f07705 (patch)
tree04bfb8e5140e763f9b74b59022f025ec59bc0a57 /drivers/scsi/scsi_pm.c
parent[SCSI] mvsas: fix undefined bit shift (diff)
downloadlinux-dev-a01475637c70a4a484dd315a90bf2df518f07705.tar.xz
linux-dev-a01475637c70a4a484dd315a90bf2df518f07705.zip
[SCSI] sd: put to stopped power state when runtime suspend
When device is runtime suspended, put it to stopped power state to save some power. This will also make the behaviour consistent with what the scsi_pm.c thinks about sd as the comment says: sd treats runtime suspend, system suspend and system hibernate identical. With this patch, it is now identical. And sd_shutdown will also do nothing when it finds the device has been runtime suspended, if we do not spin down the disk in runtime suspend by putting it into stopped power state, the disk will be shut down incorrectly. And the the same problem can be solved for runtime power off after runtime suspended case by this change. With the current runtime scheme for disk, it will only be runtime suspended when no process opens the disk, so this shouldn't happen a lot, which makes it acceptable to spin down the disk when runtime suspended. If some day a more aggressive runtime scheme is used, like the 'request based runtime pm for disk' that Alan Stern and Lin Ming has been working, we can introduce some policy to control this. But for now, make it simple and correct by spinning down the disk. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/scsi_pm.c')
0 files changed, 0 insertions, 0 deletions