Commit 051d9fbdd1d1ec85ea18ba20581234cf23f1c217

Authored by Tejun Heo
Committed by Jeff Garzik
1 parent 6521148c64

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>

Showing 3 changed files with 0 additions and 70 deletions Side-by-side Diff

Documentation/feature-removal-schedule.txt
... ... @@ -206,24 +206,6 @@
206 206  
207 207 ---------------------------
208 208  
209   -What: libata spindown skipping and warning
210   -When: Dec 2008
211   -Why: Some halt(8) implementations synchronize caches for and spin
212   - down libata disks because libata didn't use to spin down disk on
213   - system halt (only synchronized caches).
214   - Spin down on system halt is now implemented. sysfs node
215   - /sys/class/scsi_disk/h:c:i:l/manage_start_stop is present if
216   - spin down support is available.
217   - Because issuing spin down command to an already spun down disk
218   - makes some disks spin up just to spin down again, libata tracks
219   - device spindown status to skip the extra spindown command and
220   - warn about it.
221   - This is to give userspace tools the time to get updated and will
222   - be removed after userspace is reasonably updated.
223   -Who: Tejun Heo <htejun@gmail.com>
224   -
225   ----------------------------
226   -
227 209 What: i386/x86_64 bzImage symlinks
228 210 When: April 2010
229 211  
drivers/ata/libata-scsi.c
... ... @@ -1257,23 +1257,6 @@
1257 1257 return queue_depth;
1258 1258 }
1259 1259  
1260   -/* XXX: for spindown warning */
1261   -static 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 */
1269   -static 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 1261 * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
1279 1262 * @qc: Storage for translated ATA taskfile
... ... @@ -1338,32 +1321,6 @@
1338 1321 system_entering_hibernation())
1339 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 1324 /* Issue ATA STANDBY IMMEDIATE command */
1368 1325 tf->command = ATA_CMD_STANDBYNOW1;
1369 1326 }
... ... @@ -1763,14 +1720,6 @@
1763 1720 ata_gen_ata_sense(qc);
1764 1721 }
1765 1722 }
1766   -
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 1723  
1775 1724 if (need_sense && !ap->ops->error_handler)
1776 1725 ata_dump_status(ap->print_id, &qc->result_tf);
include/linux/libata.h
... ... @@ -143,7 +143,6 @@
143 143  
144 144 ATA_DFLAG_PIO = (1 << 12), /* device limited to PIO mode */
145 145 ATA_DFLAG_NCQ_OFF = (1 << 13), /* device limited to non-NCQ mode */
146   - ATA_DFLAG_SPUNDOWN = (1 << 14), /* XXX: for spindown_compat */
147 146 ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */
148 147 ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */
149 148 ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */