aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.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-cd.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-cd.c')
-rw-r--r--drivers/ide/ide-cd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 77e0f9ab7698..239557f8920e 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -436,7 +436,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
436 ide_dump_status_no_sense(drive, "media error (blank)", 436 ide_dump_status_no_sense(drive, "media error (blank)",
437 stat); 437 stat);
438 do_end_request = 1; 438 do_end_request = 1;
439 } else if ((err & ~ABRT_ERR) != 0) { 439 } else if ((err & ~ATA_ABORTED) != 0) {
440 /* go to the default handler for other errors */ 440 /* go to the default handler for other errors */
441 ide_error(drive, "cdrom_decode_status", stat); 441 ide_error(drive, "cdrom_decode_status", stat);
442 return 1; 442 return 1;
@@ -457,7 +457,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
457 * If we got a CHECK_CONDITION status, queue 457 * If we got a CHECK_CONDITION status, queue
458 * a request sense command. 458 * a request sense command.
459 */ 459 */
460 if (stat & ERR_STAT) 460 if (stat & ATA_ERR)
461 cdrom_queue_request_sense(drive, NULL, NULL); 461 cdrom_queue_request_sense(drive, NULL, NULL);
462 } else { 462 } else {
463 blk_dump_rq_flags(rq, "ide-cd: bad rq"); 463 blk_dump_rq_flags(rq, "ide-cd: bad rq");
@@ -468,7 +468,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
468 return 1; 468 return 1;
469 469
470end_request: 470end_request:
471 if (stat & ERR_STAT) { 471 if (stat & ATA_ERR) {
472 unsigned long flags; 472 unsigned long flags;
473 473
474 spin_lock_irqsave(&ide_lock, flags); 474 spin_lock_irqsave(&ide_lock, flags);
@@ -574,7 +574,7 @@ static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive,
574 */ 574 */
575 575
576 /* check for errors */ 576 /* check for errors */
577 if (cdrom_decode_status(drive, DRQ_STAT, NULL)) 577 if (cdrom_decode_status(drive, ATA_DRQ, NULL))
578 return ide_stopped; 578 return ide_stopped;
579 579
580 /* ok, next interrupt will be DMA interrupt */ 580 /* ok, next interrupt will be DMA interrupt */
@@ -582,8 +582,8 @@ static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive,
582 drive->waiting_for_dma = 1; 582 drive->waiting_for_dma = 1;
583 } else { 583 } else {
584 /* otherwise, we must wait for DRQ to get set */ 584 /* otherwise, we must wait for DRQ to get set */
585 if (ide_wait_stat(&startstop, drive, DRQ_STAT, 585 if (ide_wait_stat(&startstop, drive, ATA_DRQ,
586 BUSY_STAT, WAIT_READY)) 586 ATA_BUSY, WAIT_READY))
587 return startstop; 587 return startstop;
588 } 588 }
589 589
@@ -938,7 +938,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
938 thislen = len; 938 thislen = len;
939 939
940 /* If DRQ is clear, the command has completed. */ 940 /* If DRQ is clear, the command has completed. */
941 if ((stat & DRQ_STAT) == 0) { 941 if ((stat & ATA_DRQ) == 0) {
942 if (blk_fs_request(rq)) { 942 if (blk_fs_request(rq)) {
943 /* 943 /*
944 * If we're not done reading/writing, complain. 944 * If we're not done reading/writing, complain.
@@ -1206,7 +1206,7 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
1206 unsigned long elapsed = jiffies - info->start_seek; 1206 unsigned long elapsed = jiffies - info->start_seek;
1207 int stat = hwif->tp_ops->read_status(hwif); 1207 int stat = hwif->tp_ops->read_status(hwif);
1208 1208
1209 if ((stat & SEEK_STAT) != SEEK_STAT) { 1209 if ((stat & ATA_DSC) != ATA_DSC) {
1210 if (elapsed < IDECD_SEEK_TIMEOUT) { 1210 if (elapsed < IDECD_SEEK_TIMEOUT) {
1211 ide_stall_queue(drive, 1211 ide_stall_queue(drive,
1212 IDECD_SEEK_TIMER); 1212 IDECD_SEEK_TIMER);