aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-05 20:57:51 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-05 20:57:51 -0500
commitc47137a99c597330b69057158b26061a360c0e09 (patch)
treeaacd4cb968b8d7bdebdcbcce19f110469a977243 /drivers/ide/ide-io.c
parent29dd59755a849cc6475faa6a75f3b804e23a6fc2 (diff)
ide: add ide_read_[alt]status() inline helpers
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 4bddef0c0b96..29cb043a2d3a 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -466,7 +466,7 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
466 return ide_stopped; 466 return ide_stopped;
467 } 467 }
468 468
469 if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) 469 if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
470 rq->errors |= ERROR_RESET; 470 rq->errors |= ERROR_RESET;
471 471
472 if ((rq->errors & ERROR_RESET) == ERROR_RESET) { 472 if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
@@ -493,7 +493,7 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq, u
493 /* add decoding error stuff */ 493 /* add decoding error stuff */
494 } 494 }
495 495
496 if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) 496 if (ide_read_status(drive) & (BUSY_STAT | DRQ_STAT))
497 /* force an abort */ 497 /* force an abort */
498 hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG); 498 hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
499 499
@@ -821,8 +821,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
821#ifdef DEBUG 821#ifdef DEBUG
822 printk("%s: DRIVE_CMD (null)\n", drive->name); 822 printk("%s: DRIVE_CMD (null)\n", drive->name);
823#endif 823#endif
824 ide_end_drive_cmd(drive, 824 ide_end_drive_cmd(drive, ide_read_status(drive),
825 hwif->INB(IDE_STATUS_REG),
826 hwif->INB(IDE_ERROR_REG)); 825 hwif->INB(IDE_ERROR_REG));
827 return ide_stopped; 826 return ide_stopped;
828} 827}
@@ -1231,7 +1230,7 @@ static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
1231 printk(KERN_WARNING "%s: DMA timeout error\n", drive->name); 1230 printk(KERN_WARNING "%s: DMA timeout error\n", drive->name);
1232 (void)HWIF(drive)->ide_dma_end(drive); 1231 (void)HWIF(drive)->ide_dma_end(drive);
1233 ret = ide_error(drive, "dma timeout error", 1232 ret = ide_error(drive, "dma timeout error",
1234 hwif->INB(IDE_STATUS_REG)); 1233 ide_read_status(drive));
1235 } else { 1234 } else {
1236 printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name); 1235 printk(KERN_WARNING "%s: DMA timeout retry\n", drive->name);
1237 hwif->dma_timeout(drive); 1236 hwif->dma_timeout(drive);
@@ -1355,7 +1354,8 @@ void ide_timer_expiry (unsigned long data)
1355 startstop = ide_dma_timeout_retry(drive, wait); 1354 startstop = ide_dma_timeout_retry(drive, wait);
1356 } else 1355 } else
1357 startstop = 1356 startstop =
1358 ide_error(drive, "irq timeout", hwif->INB(IDE_STATUS_REG)); 1357 ide_error(drive, "irq timeout",
1358 ide_read_status(drive));
1359 } 1359 }
1360 drive->service_time = jiffies - drive->service_start; 1360 drive->service_time = jiffies - drive->service_start;
1361 spin_lock_irq(&ide_lock); 1361 spin_lock_irq(&ide_lock);