diff options
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 19 | ||||
-rw-r--r-- | drivers/ata/libata-core.c | 6 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 28 | ||||
-rw-r--r-- | drivers/ata/libata.h | 1 |
4 files changed, 53 insertions, 1 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index c6322c760348..498ff31f3aa1 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -328,3 +328,22 @@ Who: Adrian Bunk <bunk@stusta.de> | |||
328 | 328 | ||
329 | --------------------------- | 329 | --------------------------- |
330 | 330 | ||
331 | What: libata.spindown_compat module parameter | ||
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. | ||
338 | 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. | ||
346 | Who: Tejun Heo <htejun@gmail.com> | ||
347 | |||
348 | --------------------------- | ||
349 | |||
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 2e2a2fa8e9e9..bf8f65b09591 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -101,6 +101,12 @@ int libata_noacpi = 1; | |||
101 | module_param_named(noacpi, libata_noacpi, int, 0444); | 101 | module_param_named(noacpi, libata_noacpi, int, 0444); |
102 | MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set"); | 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 | |||
104 | MODULE_AUTHOR("Jeff Garzik"); | 110 | MODULE_AUTHOR("Jeff Garzik"); |
105 | MODULE_DESCRIPTION("Library module for ATA devices"); | 111 | MODULE_DESCRIPTION("Library module for ATA devices"); |
106 | MODULE_LICENSE("GPL"); | 112 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 8f800196d596..dd81fa78cdcf 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -944,9 +944,35 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) | |||
944 | } | 944 | } |
945 | 945 | ||
946 | tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ | 946 | tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ |
947 | } else | 947 | } else { |
948 | /* XXX: This is for backward compatibility, will be | ||
949 | * removed. Read Documentation/feature-removal-schedule.txt | ||
950 | * for more info. | ||
951 | */ | ||
952 | if (ata_spindown_compat && | ||
953 | (system_state == SYSTEM_HALT || | ||
954 | system_state == SYSTEM_POWER_OFF)) { | ||
955 | static int warned = 0; | ||
956 | |||
957 | if (!warned) { | ||
958 | spin_unlock_irq(qc->ap->lock); | ||
959 | ata_dev_printk(qc->dev, KERN_WARNING, | ||
960 | "DISK MIGHT NOT BE SPUN DOWN PROPERLY. " | ||
961 | "UPDATE SHUTDOWN UTILITY\n"); | ||
962 | ata_dev_printk(qc->dev, KERN_WARNING, | ||
963 | "For more info, visit " | ||
964 | "http://linux-ata.org/shutdown.html\n"); | ||
965 | warned = 1; | ||
966 | ssleep(5); | ||
967 | spin_lock_irq(qc->ap->lock); | ||
968 | } | ||
969 | scmd->result = SAM_STAT_GOOD; | ||
970 | return 1; | ||
971 | } | ||
972 | |||
948 | /* Issue ATA STANDBY IMMEDIATE command */ | 973 | /* Issue ATA STANDBY IMMEDIATE command */ |
949 | tf->command = ATA_CMD_STANDBYNOW1; | 974 | tf->command = ATA_CMD_STANDBYNOW1; |
975 | } | ||
950 | 976 | ||
951 | /* | 977 | /* |
952 | * Standby and Idle condition timers could be implemented but that | 978 | * Standby and Idle condition timers could be implemented but that |
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 5f4d40cd3288..316bf8ae4536 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h | |||
@@ -58,6 +58,7 @@ extern int atapi_enabled; | |||
58 | extern int atapi_dmadir; | 58 | extern int atapi_dmadir; |
59 | extern int libata_fua; | 59 | extern int libata_fua; |
60 | extern int libata_noacpi; | 60 | extern int libata_noacpi; |
61 | extern int ata_spindown_compat; | ||
61 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev); | 62 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev); |
62 | extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, | 63 | extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, |
63 | u64 block, u32 n_block, unsigned int tf_flags, | 64 | u64 block, u32 n_block, unsigned int tf_flags, |