Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56505
b: refs/heads/master
c: 13b8d09
h: refs/heads/master
i:
  56503: 3836790
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed May 16, 2007
1 parent 0c574fd commit f1cc557
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da071b42f73dabbd0daf7ea4c3ff157d53b00648
refs/heads/master: 13b8d09f5de0aaa3153bbccc98baf247387823dc
9 changes: 9 additions & 0 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
* for more info.
*/
if (ata_spindown_compat &&
(qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
(system_state == SYSTEM_HALT ||
system_state == SYSTEM_POWER_OFF)) {
static unsigned long warned = 0;
Expand Down Expand Up @@ -1394,6 +1395,14 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
}
}

/* XXX: track spindown state for spindown_compat */
if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||
qc->tf.command == ATA_CMD_STANDBYNOW1))
qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
else if (likely(system_state != SYSTEM_HALT &&
system_state != SYSTEM_POWER_OFF))
qc->dev->flags &= ~ATA_DFLAG_SPUNDOWN;

if (need_sense && !ap->ops->error_handler)
ata_dump_status(ap->print_id, &qc->result_tf);

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ enum {

ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */
ATA_DFLAG_NCQ_OFF = (1 << 9), /* device limited to non-NCQ mode */
ATA_DFLAG_SPUNDOWN = (1 << 10), /* XXX: for spindown_compat */
ATA_DFLAG_INIT_MASK = (1 << 16) - 1,

ATA_DFLAG_DETACH = (1 << 16),
Expand Down

0 comments on commit f1cc557

Please sign in to comment.