aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:21 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:21 -0400
commitaaaade3f059fa1b57283d4a7c8351a42ec747bf0 (patch)
tree3c2e80f0317fc52d9866b0bb83b8cc89ed764b57 /drivers/ide/ide-io.c
parenta4f19040a3a6cd431efe0a10b9d2e8d5e3904865 (diff)
ide: WIN_* -> ATA_CMD_*
* Use ATA_CMD_* defines instead of WIN_* ones. While at it: * EXABYTE_ENABLE_NEXT -> ATA_EXABYTE_ENABLE_NEST * SETFEATURES_{EN,DIS}_WCACHE -> SETFEATURES_WC_{ON,OFF} * SETFEATURES_{EN,DIS}_AAM -> SETFEATURES_AAM_{ON,OFF} * SMART_* -> ATA_SMART_* * Remove stale comment from ide-proc.c. Partially based on earlier work by Chris Wedgwood. Acked-by: Chris Wedgwood <cw@f00f.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 1678043701df..ce9ecd138836 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -188,13 +188,13 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
188 return ide_stopped; 188 return ide_stopped;
189 } 189 }
190 if (ide_id_has_flush_cache_ext(drive->id)) 190 if (ide_id_has_flush_cache_ext(drive->id))
191 args->tf.command = WIN_FLUSH_CACHE_EXT; 191 args->tf.command = ATA_CMD_FLUSH_EXT;
192 else 192 else
193 args->tf.command = WIN_FLUSH_CACHE; 193 args->tf.command = ATA_CMD_FLUSH;
194 goto out_do_tf; 194 goto out_do_tf;
195 195
196 case idedisk_pm_standby: /* Suspend step 2 (standby) */ 196 case idedisk_pm_standby: /* Suspend step 2 (standby) */
197 args->tf.command = WIN_STANDBYNOW1; 197 args->tf.command = ATA_CMD_STANDBYNOW1;
198 goto out_do_tf; 198 goto out_do_tf;
199 199
200 case idedisk_pm_restore_pio: /* Resume step 1 (restore PIO) */ 200 case idedisk_pm_restore_pio: /* Resume step 1 (restore PIO) */
@@ -209,7 +209,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
209 return ide_stopped; 209 return ide_stopped;
210 210
211 case idedisk_pm_idle: /* Resume step 2 (idle) */ 211 case idedisk_pm_idle: /* Resume step 2 (idle) */
212 args->tf.command = WIN_IDLEIMMEDIATE; 212 args->tf.command = ATA_CMD_IDLEIMMEDIATE;
213 goto out_do_tf; 213 goto out_do_tf;
214 214
215 case ide_pm_restore_dma: /* Resume step 3 (restore DMA) */ 215 case ide_pm_restore_dma: /* Resume step 3 (restore DMA) */
@@ -380,8 +380,8 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
380 /* err has different meaning on cdrom and tape */ 380 /* err has different meaning on cdrom and tape */
381 if (err == ABRT_ERR) { 381 if (err == ABRT_ERR) {
382 if (drive->select.b.lba && 382 if (drive->select.b.lba &&
383 /* some newer drives don't support WIN_SPECIFY */ 383 /* some newer drives don't support ATA_CMD_INIT_DEV_PARAMS */
384 hwif->tp_ops->read_status(hwif) == WIN_SPECIFY) 384 hwif->tp_ops->read_status(hwif) == ATA_CMD_INIT_DEV_PARAMS)
385 return ide_stopped; 385 return ide_stopped;
386 } else if ((err & BAD_CRC) == BAD_CRC) { 386 } else if ((err & BAD_CRC) == BAD_CRC) {
387 /* UDMA crc error, just retry the operation */ 387 /* UDMA crc error, just retry the operation */
@@ -436,7 +436,7 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq, u
436 436
437 if (hwif->tp_ops->read_status(hwif) & (BUSY_STAT | DRQ_STAT)) 437 if (hwif->tp_ops->read_status(hwif) & (BUSY_STAT | DRQ_STAT))
438 /* force an abort */ 438 /* force an abort */
439 hwif->tp_ops->exec_command(hwif, WIN_IDLEIMMEDIATE); 439 hwif->tp_ops->exec_command(hwif, ATA_CMD_IDLEIMMEDIATE);
440 440
441 if (rq->errors >= ERROR_MAX) { 441 if (rq->errors >= ERROR_MAX) {
442 ide_kill_rq(drive, rq); 442 ide_kill_rq(drive, rq);
@@ -509,19 +509,19 @@ static void ide_tf_set_specify_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
509 tf->lbam = drive->cyl; 509 tf->lbam = drive->cyl;
510 tf->lbah = drive->cyl >> 8; 510 tf->lbah = drive->cyl >> 8;
511 tf->device = ((drive->head - 1) | drive->select.all) & ~ATA_LBA; 511 tf->device = ((drive->head - 1) | drive->select.all) & ~ATA_LBA;
512 tf->command = WIN_SPECIFY; 512 tf->command = ATA_CMD_INIT_DEV_PARAMS;
513} 513}
514 514
515static void ide_tf_set_restore_cmd(ide_drive_t *drive, struct ide_taskfile *tf) 515static void ide_tf_set_restore_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
516{ 516{
517 tf->nsect = drive->sect; 517 tf->nsect = drive->sect;
518 tf->command = WIN_RESTORE; 518 tf->command = ATA_CMD_RESTORE;
519} 519}
520 520
521static void ide_tf_set_setmult_cmd(ide_drive_t *drive, struct ide_taskfile *tf) 521static void ide_tf_set_setmult_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
522{ 522{
523 tf->nsect = drive->mult_req; 523 tf->nsect = drive->mult_req;
524 tf->command = WIN_SETMULT; 524 tf->command = ATA_CMD_SET_MULTI;
525} 525}
526 526
527static ide_startstop_t ide_disk_special(ide_drive_t *drive) 527static ide_startstop_t ide_disk_special(ide_drive_t *drive)
@@ -584,9 +584,10 @@ static int set_pio_mode_abuse(ide_hwif_t *hwif, u8 req_pio)
584 * do_special - issue some special commands 584 * do_special - issue some special commands
585 * @drive: drive the command is for 585 * @drive: drive the command is for
586 * 586 *
587 * do_special() is used to issue WIN_SPECIFY, WIN_RESTORE, and WIN_SETMULT 587 * do_special() is used to issue ATA_CMD_INIT_DEV_PARAMS,
588 * commands to a drive. It used to do much more, but has been scaled 588 * ATA_CMD_RESTORE and ATA_CMD_SET_MULTI commands to a drive.
589 * back. 589 *
590 * It used to do much more, but has been scaled back.
590 */ 591 */
591 592
592static ide_startstop_t do_special (ide_drive_t *drive) 593static ide_startstop_t do_special (ide_drive_t *drive)