[v2,3/4] scsi: sd: set ready_to_power_off for scsi disk

Message ID 1347951631-1592-4-git-send-email-aaron.lu@intel.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Aaron Lu Sept. 18, 2012, 7 a.m.
The ready_to_power_off flag is used to give indication to ATA layer
if this device's power can be removed after runtime suspended from the
perspective of scsi driver.

It is introduced to support zero power ODD. When ODD is runtime
suspended, it may not be OK to remove its power.

But for disk, there doesn't exist a scenario that when the disk is
runtime suspended, it can't be powered off.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
 drivers/scsi/sd.c | 1 +
 1 file changed, 1 insertion(+)


diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 7b0f07a..009d30c 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2638,6 +2638,7 @@  static void sd_probe_async(void *data, async_cookie_t cookie)
 	sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
 		  sdp->removable ? "removable " : "");
+	sdp->ready_to_power_off = 1;