diff options
author | Tejun Heo <htejun@gmail.com> | 2007-03-20 11:13:59 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-03-20 13:06:20 -0400 |
commit | c3c94c5a2fb43a654e777f509d5032b0db8ed09f (patch) | |
tree | cbc9b0adfa0a83fc5859344d6f9911d3010a29ac /include/scsi | |
parent | 3721050afc6cb6ddf6de0f782e2054ebcc225e9b (diff) |
[SCSI] sd: implement START/STOP management
Implement SBC START/STOP management. sdev->mange_start_stop is added.
When it's set to one, sd STOPs the device on suspend and shutdown and
STARTs it on resume. sdev->manage_start_stop defaults is in sdev
instead of scsi_disk cdev to allow ->slave_config() override the
default configuration but is exported under scsi_disk sysfs node as
sdev->allow_restart is.
When manage_start_stop is zero (the default value), this patch doesn't
introduce any behavior change.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Rejections fixed and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_device.h | 1 | ||||
-rw-r--r-- | include/scsi/sd.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index c86e6ce143df..b05cd3b09e6e 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -120,6 +120,7 @@ struct scsi_device { | |||
120 | unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */ | 120 | unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */ |
121 | unsigned no_start_on_add:1; /* do not issue start on add */ | 121 | unsigned no_start_on_add:1; /* do not issue start on add */ |
122 | unsigned allow_restart:1; /* issue START_UNIT in error handler */ | 122 | unsigned allow_restart:1; /* issue START_UNIT in error handler */ |
123 | unsigned manage_start_stop:1; /* Let HLD (sd) manage start/stop */ | ||
123 | unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ | 124 | unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ |
124 | unsigned select_no_atn:1; | 125 | unsigned select_no_atn:1; |
125 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ | 126 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ |
diff --git a/include/scsi/sd.h b/include/scsi/sd.h index 82e6a84b77e6..5261488e1108 100644 --- a/include/scsi/sd.h +++ b/include/scsi/sd.h | |||
@@ -52,6 +52,8 @@ static void sd_rw_intr(struct scsi_cmnd * SCpnt); | |||
52 | static int sd_probe(struct device *); | 52 | static int sd_probe(struct device *); |
53 | static int sd_remove(struct device *); | 53 | static int sd_remove(struct device *); |
54 | static void sd_shutdown(struct device *dev); | 54 | static void sd_shutdown(struct device *dev); |
55 | static int sd_suspend(struct device *dev, pm_message_t state); | ||
56 | static int sd_resume(struct device *dev); | ||
55 | static void sd_rescan(struct device *); | 57 | static void sd_rescan(struct device *); |
56 | static int sd_init_command(struct scsi_cmnd *); | 58 | static int sd_init_command(struct scsi_cmnd *); |
57 | static int sd_issue_flush(struct device *, sector_t *); | 59 | static int sd_issue_flush(struct device *, sector_t *); |