Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56558
b: refs/heads/master
c: d9aca22
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed May 18, 2007
1 parent 25dbc03 commit 45d5981
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1daf9ce74e0e0ef8ffde800ab495339458c3375f
refs/heads/master: d9aca22cf443f5ed77d15a320abbab055ae4a976
25 changes: 12 additions & 13 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -328,21 +328,20 @@ Who: Adrian Bunk <bunk@stusta.de>

---------------------------

What: libata.spindown_compat module parameter
What: libata spindown skipping and warning
When: Dec 2008
Why: halt(8) synchronizes caches for and spins down libata disks
because libata didn't use to spin down disk on system halt
(only synchronized caches).
Spin down on system halt is now implemented and can be tested
using sysfs node /sys/class/scsi_disk/h:c:i:l/manage_start_stop.
Why: Some halt(8) implementations synchronize caches for and spin
down libata disks because libata didn't use to spin down disk on
system halt (only synchronized caches).
Spin down on system halt is now implemented. sysfs node
/sys/class/scsi_disk/h:c:i:l/manage_start_stop is present if
spin down support is available.
Because issuing spin down command to an already spun down disk
makes some disks spin up just to spin down again, the old
behavior needs to be maintained till userspace tool is updated
to check the sysfs node and not to spin down disks with the
node set to one.
This module parameter is to give userspace tool the time to
get updated and should be removed after userspace is
reasonably updated.
makes some disks spin up just to spin down again, libata tracks
device spindown status to skip the extra spindown command and
warn about it.
This is to give userspace tools the time to get updated and will
be removed after userspace is reasonably updated.
Who: Tejun Heo <htejun@gmail.com>

---------------------------
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ int libata_noacpi = 1;
module_param_named(noacpi, libata_noacpi, int, 0444);
MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");

int ata_spindown_compat = 1;
module_param_named(spindown_compat, ata_spindown_compat, int, 0644);
MODULE_PARM_DESC(spindown_compat, "Enable backward compatible spindown "
"behavior. Will be removed. More info can be found in "
"Documentation/feature-removal-schedule.txt\n");

MODULE_AUTHOR("Jeff Garzik");
MODULE_DESCRIPTION("Library module for ATA devices");
MODULE_LICENSE("GPL");
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,15 +893,15 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
return queue_depth;
}

/* XXX: for ata_spindown_compat */
/* XXX: for spindown warning */
static void ata_delayed_done_timerfn(unsigned long arg)
{
struct scsi_cmnd *scmd = (void *)arg;

scmd->scsi_done(scmd);
}

/* XXX: for ata_spindown_compat */
/* XXX: for spindown warning */
static void ata_delayed_done(struct scsi_cmnd *scmd)
{
static struct timer_list timer;
Expand Down Expand Up @@ -966,8 +966,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
* removed. Read Documentation/feature-removal-schedule.txt
* for more info.
*/
if (ata_spindown_compat &&
(qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
if ((qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
(system_state == SYSTEM_HALT ||
system_state == SYSTEM_POWER_OFF)) {
static unsigned long warned = 0;
Expand Down Expand Up @@ -1395,7 +1394,7 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
}
}

/* XXX: track spindown state for spindown_compat */
/* XXX: track spindown state for spindown skipping and warning */
if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||
qc->tf.command == ATA_CMD_STANDBYNOW1))
qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ata/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ extern int atapi_enabled;
extern int atapi_dmadir;
extern int libata_fua;
extern int libata_noacpi;
extern int ata_spindown_compat;
extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
u64 block, u32 n_block, unsigned int tf_flags,
Expand Down

0 comments on commit 45d5981

Please sign in to comment.