aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-05-17 10:43:26 -0400
committerJeff Garzik <jeff@garzik.org>2007-05-17 20:57:38 -0400
commitd9aca22cf443f5ed77d15a320abbab055ae4a976 (patch)
treea808d879baf21a557a93e9ef3a0d96b004985f8b
parent1daf9ce74e0e0ef8ffde800ab495339458c3375f (diff)
libata: remove libata.spindown_compat
With STANDBYDOWN tracking added, libata.spindown_compat isn't necessary anymore. If userspace shutdown(8) issues STANDBYNOW, libata warns. If userspace shutdown(8) doesn't issue STANDBYNOW, libata does the right thing. Userspace can tell whether kernel supports spindown by testing whether sysfs node manage_start_stop exists as before. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--Documentation/feature-removal-schedule.txt25
-rw-r--r--drivers/ata/libata-core.c6
-rw-r--r--drivers/ata/libata-scsi.c9
-rw-r--r--drivers/ata/libata.h1
4 files changed, 16 insertions, 25 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 498ff31f3aa1..5c8695a3d139 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -328,21 +328,20 @@ Who: Adrian Bunk <bunk@stusta.de>
328 328
329--------------------------- 329---------------------------
330 330
331What: libata.spindown_compat module parameter 331What: libata spindown skipping and warning
332When: Dec 2008 332When: Dec 2008
333Why: halt(8) synchronizes caches for and spins down libata disks 333Why: Some halt(8) implementations synchronize caches for and spin
334 because libata didn't use to spin down disk on system halt 334 down libata disks because libata didn't use to spin down disk on
335 (only synchronized caches). 335 system halt (only synchronized caches).
336 Spin down on system halt is now implemented and can be tested 336 Spin down on system halt is now implemented. sysfs node
337 using sysfs node /sys/class/scsi_disk/h:c:i:l/manage_start_stop. 337 /sys/class/scsi_disk/h:c:i:l/manage_start_stop is present if
338 spin down support is available.
338 Because issuing spin down command to an already spun down disk 339 Because issuing spin down command to an already spun down disk
339 makes some disks spin up just to spin down again, the old 340 makes some disks spin up just to spin down again, libata tracks
340 behavior needs to be maintained till userspace tool is updated 341 device spindown status to skip the extra spindown command and
341 to check the sysfs node and not to spin down disks with the 342 warn about it.
342 node set to one. 343 This is to give userspace tools the time to get updated and will
343 This module parameter is to give userspace tool the time to 344 be removed after userspace is reasonably updated.
344 get updated and should be removed after userspace is
345 reasonably updated.
346Who: Tejun Heo <htejun@gmail.com> 345Who: Tejun Heo <htejun@gmail.com>
347 346
348--------------------------- 347---------------------------
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d5939e659cbb..d3ea7f55283c 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -101,12 +101,6 @@ int libata_noacpi = 1;
101module_param_named(noacpi, libata_noacpi, int, 0444); 101module_param_named(noacpi, libata_noacpi, int, 0444);
102MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set"); 102MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");
103 103
104int ata_spindown_compat = 1;
105module_param_named(spindown_compat, ata_spindown_compat, int, 0644);
106MODULE_PARM_DESC(spindown_compat, "Enable backward compatible spindown "
107 "behavior. Will be removed. More info can be found in "
108 "Documentation/feature-removal-schedule.txt\n");
109
110MODULE_AUTHOR("Jeff Garzik"); 104MODULE_AUTHOR("Jeff Garzik");
111MODULE_DESCRIPTION("Library module for ATA devices"); 105MODULE_DESCRIPTION("Library module for ATA devices");
112MODULE_LICENSE("GPL"); 106MODULE_LICENSE("GPL");
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index b6a1de8fad5b..242c43eef807 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -893,7 +893,7 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
893 return queue_depth; 893 return queue_depth;
894} 894}
895 895
896/* XXX: for ata_spindown_compat */ 896/* XXX: for spindown warning */
897static void ata_delayed_done_timerfn(unsigned long arg) 897static void ata_delayed_done_timerfn(unsigned long arg)
898{ 898{
899 struct scsi_cmnd *scmd = (void *)arg; 899 struct scsi_cmnd *scmd = (void *)arg;
@@ -901,7 +901,7 @@ static void ata_delayed_done_timerfn(unsigned long arg)
901 scmd->scsi_done(scmd); 901 scmd->scsi_done(scmd);
902} 902}
903 903
904/* XXX: for ata_spindown_compat */ 904/* XXX: for spindown warning */
905static void ata_delayed_done(struct scsi_cmnd *scmd) 905static void ata_delayed_done(struct scsi_cmnd *scmd)
906{ 906{
907 static struct timer_list timer; 907 static struct timer_list timer;
@@ -966,8 +966,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
966 * removed. Read Documentation/feature-removal-schedule.txt 966 * removed. Read Documentation/feature-removal-schedule.txt
967 * for more info. 967 * for more info.
968 */ 968 */
969 if (ata_spindown_compat && 969 if ((qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
970 (qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
971 (system_state == SYSTEM_HALT || 970 (system_state == SYSTEM_HALT ||
972 system_state == SYSTEM_POWER_OFF)) { 971 system_state == SYSTEM_POWER_OFF)) {
973 static unsigned long warned = 0; 972 static unsigned long warned = 0;
@@ -1395,7 +1394,7 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
1395 } 1394 }
1396 } 1395 }
1397 1396
1398 /* XXX: track spindown state for spindown_compat */ 1397 /* XXX: track spindown state for spindown skipping and warning */
1399 if (unlikely(qc->tf.command == ATA_CMD_STANDBY || 1398 if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||
1400 qc->tf.command == ATA_CMD_STANDBYNOW1)) 1399 qc->tf.command == ATA_CMD_STANDBYNOW1))
1401 qc->dev->flags |= ATA_DFLAG_SPUNDOWN; 1400 qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 13cb0c9af68d..5e2466658420 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -58,7 +58,6 @@ extern int atapi_enabled;
58extern int atapi_dmadir; 58extern int atapi_dmadir;
59extern int libata_fua; 59extern int libata_fua;
60extern int libata_noacpi; 60extern int libata_noacpi;
61extern int ata_spindown_compat;
62extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev); 61extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
63extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, 62extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
64 u64 block, u32 n_block, unsigned int tf_flags, 63 u64 block, u32 n_block, unsigned int tf_flags,