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>

authored by Tejun Heo and committed by Jeff Garzik d9aca22c 1daf9ce7

+16 -25
+12 -13
Documentation/feature-removal-schedule.txt
··· 328 328 329 329 --------------------------- 330 330 331 - What: libata.spindown_compat module parameter 331 + What: libata spindown skipping and warning 332 332 When: Dec 2008 333 - Why: halt(8) synchronizes caches for and spins down libata disks 334 - because libata didn't use to spin down disk on system halt 335 - (only synchronized caches). 336 - Spin down on system halt is now implemented and can be tested 337 - using sysfs node /sys/class/scsi_disk/h:c:i:l/manage_start_stop. 333 + Why: Some halt(8) implementations synchronize caches for and spin 334 + down libata disks because libata didn't use to spin down disk on 335 + system halt (only synchronized caches). 336 + Spin down on system halt is now implemented. sysfs node 337 + /sys/class/scsi_disk/h:c:i:l/manage_start_stop is present if 338 + spin down support is available. 338 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 - behavior needs to be maintained till userspace tool is updated 341 - to check the sysfs node and not to spin down disks with the 342 - node set to one. 343 - This module parameter is to give userspace tool the time to 344 - get updated and should be removed after userspace is 345 - reasonably updated. 340 + makes some disks spin up just to spin down again, libata tracks 341 + device spindown status to skip the extra spindown command and 342 + warn about it. 343 + This is to give userspace tools the time to get updated and will 344 + be removed after userspace is reasonably updated. 346 345 Who: Tejun Heo <htejun@gmail.com> 347 346 348 347 ---------------------------
-6
drivers/ata/libata-core.c
··· 101 101 module_param_named(noacpi, libata_noacpi, int, 0444); 102 102 MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set"); 103 103 104 - int ata_spindown_compat = 1; 105 - module_param_named(spindown_compat, ata_spindown_compat, int, 0644); 106 - MODULE_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 - 110 104 MODULE_AUTHOR("Jeff Garzik"); 111 105 MODULE_DESCRIPTION("Library module for ATA devices"); 112 106 MODULE_LICENSE("GPL");
+4 -5
drivers/ata/libata-scsi.c
··· 893 893 return queue_depth; 894 894 } 895 895 896 - /* XXX: for ata_spindown_compat */ 896 + /* XXX: for spindown warning */ 897 897 static void ata_delayed_done_timerfn(unsigned long arg) 898 898 { 899 899 struct scsi_cmnd *scmd = (void *)arg; ··· 901 901 scmd->scsi_done(scmd); 902 902 } 903 903 904 - /* XXX: for ata_spindown_compat */ 904 + /* XXX: for spindown warning */ 905 905 static void ata_delayed_done(struct scsi_cmnd *scmd) 906 906 { 907 907 static struct timer_list timer; ··· 966 966 * removed. Read Documentation/feature-removal-schedule.txt 967 967 * for more info. 968 968 */ 969 - if (ata_spindown_compat && 970 - (qc->dev->flags & ATA_DFLAG_SPUNDOWN) && 969 + if ((qc->dev->flags & ATA_DFLAG_SPUNDOWN) && 971 970 (system_state == SYSTEM_HALT || 972 971 system_state == SYSTEM_POWER_OFF)) { 973 972 static unsigned long warned = 0; ··· 1394 1395 } 1395 1396 } 1396 1397 1397 - /* XXX: track spindown state for spindown_compat */ 1398 + /* XXX: track spindown state for spindown skipping and warning */ 1398 1399 if (unlikely(qc->tf.command == ATA_CMD_STANDBY || 1399 1400 qc->tf.command == ATA_CMD_STANDBYNOW1)) 1400 1401 qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
-1
drivers/ata/libata.h
··· 58 58 extern int atapi_dmadir; 59 59 extern int libata_fua; 60 60 extern int libata_noacpi; 61 - extern int ata_spindown_compat; 62 61 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev); 63 62 extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, 64 63 u64 block, u32 n_block, unsigned int tf_flags,