aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.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
commit3a7d24841ad794ae64c90d7d00d62a83741912aa (patch)
treed71a36678fa88ed1e0b279390b6169f5018186bf /drivers/ide/ide-probe.c
parentf26b3d75959e9a0e43a2e1e1148c075592746c3d (diff)
ide: use ATA_* defines instead of *_STAT and *_ERR ones
* ERR_STAT -> ATA_ERR * INDEX_STAT -> ATA_IDX * ECC_STAT -> ATA_CORR * DRQ_STAT -> ATA_DRQ * SEEK_STAT -> ATA_DSC * WRERR_STAT -> ATA_DF * READY_STAT -> ATA_DRDY * BUSY_STAT -> ATA_BUSY * MARK_ERR -> ATA_AMNF * TRK0_ERR -> ATA_TRK0NF * ABRT_ERR -> ATA_ABORTED * MCR_ERR -> ATA_MCR * ID_ERR -> ATA_IDNF * MC_ERR -> ATA_MC * ECC_ERR -> ATA_UNC * ICRC_ERR -> ATA_ICRC * BBD_ERR -> ATA_BBK Also: * ILI_ERR -> ATAPI_ILI * EOM_ERR -> ATAPI_EOM * LFS_ERR -> ATAPI_LFS * CD -> ATAPI_COD * IO -> ATAPI_IO Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 4829daacb342..7578ad48080f 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -264,7 +264,7 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
264 if (io_ports->ctl_addr) { 264 if (io_ports->ctl_addr) {
265 a = tp_ops->read_altstatus(hwif); 265 a = tp_ops->read_altstatus(hwif);
266 s = tp_ops->read_status(hwif); 266 s = tp_ops->read_status(hwif);
267 if ((a ^ s) & ~INDEX_STAT) 267 if ((a ^ s) & ~ATA_IDX)
268 /* ancient Seagate drives, broken interfaces */ 268 /* ancient Seagate drives, broken interfaces */
269 printk(KERN_INFO "%s: probing with STATUS(0x%02x) " 269 printk(KERN_INFO "%s: probing with STATUS(0x%02x) "
270 "instead of ALTSTATUS(0x%02x)\n", 270 "instead of ALTSTATUS(0x%02x)\n",
@@ -301,13 +301,13 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
301 msleep(50); 301 msleep(50);
302 s = use_altstatus ? tp_ops->read_altstatus(hwif) 302 s = use_altstatus ? tp_ops->read_altstatus(hwif)
303 : tp_ops->read_status(hwif); 303 : tp_ops->read_status(hwif);
304 } while (s & BUSY_STAT); 304 } while (s & ATA_BUSY);
305 305
306 /* wait for IRQ and DRQ_STAT */ 306 /* wait for IRQ and ATA_DRQ */
307 msleep(50); 307 msleep(50);
308 s = tp_ops->read_status(hwif); 308 s = tp_ops->read_status(hwif);
309 309
310 if (OK_STAT(s, DRQ_STAT, BAD_R_STAT)) { 310 if (OK_STAT(s, ATA_DRQ, BAD_R_STAT)) {
311 unsigned long flags; 311 unsigned long flags;
312 312
313 /* local CPU only; some systems need this */ 313 /* local CPU only; some systems need this */
@@ -391,7 +391,7 @@ static int ide_busy_sleep(ide_hwif_t *hwif)
391 do { 391 do {
392 msleep(50); 392 msleep(50);
393 stat = hwif->tp_ops->read_status(hwif); 393 stat = hwif->tp_ops->read_status(hwif);
394 if ((stat & BUSY_STAT) == 0) 394 if ((stat & ATA_BUSY) == 0)
395 return 0; 395 return 0;
396 } while (time_before(jiffies, timeout)); 396 } while (time_before(jiffies, timeout));
397 397
@@ -460,7 +460,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)
460 if (drive->select.b.unit != 0) { 460 if (drive->select.b.unit != 0) {
461 /* exit with drive0 selected */ 461 /* exit with drive0 selected */
462 SELECT_DRIVE(&hwif->drives[0]); 462 SELECT_DRIVE(&hwif->drives[0]);
463 /* allow BUSY_STAT to assert & clear */ 463 /* allow ATA_BUSY to assert & clear */
464 msleep(50); 464 msleep(50);
465 } 465 }
466 /* no i/f present: mmm.. this should be a 4 -ml */ 466 /* no i/f present: mmm.. this should be a 4 -ml */
@@ -469,7 +469,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)
469 469
470 stat = tp_ops->read_status(hwif); 470 stat = tp_ops->read_status(hwif);
471 471
472 if (OK_STAT(stat, READY_STAT, BUSY_STAT) || 472 if (OK_STAT(stat, ATA_DRDY, ATA_BUSY) ||
473 drive->present || cmd == ATA_CMD_ID_ATAPI) { 473 drive->present || cmd == ATA_CMD_ID_ATAPI) {
474 /* send cmd and wait */ 474 /* send cmd and wait */
475 if ((rc = try_to_identify(drive, cmd))) { 475 if ((rc = try_to_identify(drive, cmd))) {
@@ -479,7 +479,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)
479 479
480 stat = tp_ops->read_status(hwif); 480 stat = tp_ops->read_status(hwif);
481 481
482 if (stat == (BUSY_STAT | READY_STAT)) 482 if (stat == (ATA_BUSY | ATA_DRDY))
483 return 4; 483 return 4;
484 484
485 if (rc == 1 && cmd == ATA_CMD_ID_ATAPI) { 485 if (rc == 1 && cmd == ATA_CMD_ID_ATAPI) {