aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-07-02 22:46:12 -0400
committerJeff Garzik <jgarzik@redhat.com>2009-09-01 19:47:20 -0400
commit051d9fbdd1d1ec85ea18ba20581234cf23f1c217 (patch)
tree7ad5adda0326170be068578782129ce59c41f491 /drivers/ata
parent6521148c6449724c3b707820b9c535c7e8b8afcd (diff)
libata: remove spindown skipping and warning
This was a hack to give userland shutdown tools time to drop manual spindown. All popular distros updated quite some time ago and the due is well passed. Drop it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jaswinder Singh Rajput <jaswinder@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index d0dfeef55db5..de3a0050760a 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1257,23 +1257,6 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
1257 return queue_depth; 1257 return queue_depth;
1258} 1258}
1259 1259
1260/* XXX: for spindown warning */
1261static void ata_delayed_done_timerfn(unsigned long arg)
1262{
1263 struct scsi_cmnd *scmd = (void *)arg;
1264
1265 scmd->scsi_done(scmd);
1266}
1267
1268/* XXX: for spindown warning */
1269static void ata_delayed_done(struct scsi_cmnd *scmd)
1270{
1271 static struct timer_list timer;
1272
1273 setup_timer(&timer, ata_delayed_done_timerfn, (unsigned long)scmd);
1274 mod_timer(&timer, jiffies + 5 * HZ);
1275}
1276
1277/** 1260/**
1278 * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command 1261 * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
1279 * @qc: Storage for translated ATA taskfile 1262 * @qc: Storage for translated ATA taskfile
@@ -1338,32 +1321,6 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
1338 system_entering_hibernation()) 1321 system_entering_hibernation())
1339 goto skip; 1322 goto skip;
1340 1323
1341 /* XXX: This is for backward compatibility, will be
1342 * removed. Read Documentation/feature-removal-schedule.txt
1343 * for more info.
1344 */
1345 if ((qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
1346 (system_state == SYSTEM_HALT ||
1347 system_state == SYSTEM_POWER_OFF)) {
1348 static unsigned long warned;
1349
1350 if (!test_and_set_bit(0, &warned)) {
1351 ata_dev_printk(qc->dev, KERN_WARNING,
1352 "DISK MIGHT NOT BE SPUN DOWN PROPERLY. "
1353 "UPDATE SHUTDOWN UTILITY\n");
1354 ata_dev_printk(qc->dev, KERN_WARNING,
1355 "For more info, visit "
1356 "http://linux-ata.org/shutdown.html\n");
1357
1358 /* ->scsi_done is not used, use it for
1359 * delayed completion.
1360 */
1361 scmd->scsi_done = qc->scsidone;
1362 qc->scsidone = ata_delayed_done;
1363 }
1364 goto skip;
1365 }
1366
1367 /* Issue ATA STANDBY IMMEDIATE command */ 1324 /* Issue ATA STANDBY IMMEDIATE command */
1368 tf->command = ATA_CMD_STANDBYNOW1; 1325 tf->command = ATA_CMD_STANDBYNOW1;
1369 } 1326 }
@@ -1764,14 +1721,6 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
1764 } 1721 }
1765 } 1722 }
1766 1723
1767 /* XXX: track spindown state for spindown skipping and warning */
1768 if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||
1769 qc->tf.command == ATA_CMD_STANDBYNOW1))
1770 qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
1771 else if (likely(system_state != SYSTEM_HALT &&
1772 system_state != SYSTEM_POWER_OFF))
1773 qc->dev->flags &= ~ATA_DFLAG_SPUNDOWN;
1774
1775 if (need_sense && !ap->ops->error_handler) 1724 if (need_sense && !ap->ops->error_handler)
1776 ata_dump_status(ap->print_id, &qc->result_tf); 1725 ata_dump_status(ap->print_id, &qc->result_tf);
1777 1726