Commit a05f5efa authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] ide: PIO-out error handling fixes (CONFIG_IDE_TASKFILE_IO=y)

We shouldn't ever get into ->handler() if drive is busy so
just call ->error() unconditionally if status check fails.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 465263da
...@@ -646,16 +646,8 @@ ide_startstop_t task_out_intr (ide_drive_t *drive) ...@@ -646,16 +646,8 @@ ide_startstop_t task_out_intr (ide_drive_t *drive)
u8 stat; u8 stat;
stat = HWIF(drive)->INB(IDE_STATUS_REG); stat = HWIF(drive)->INB(IDE_STATUS_REG);
if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat)) { if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat))
if ((stat & (ERR_STAT | DRQ_STAT)) ||
((stat & WRERR_STAT) && !drive->nowerr))
return DRIVER(drive)->error(drive, __FUNCTION__, stat); return DRIVER(drive)->error(drive, __FUNCTION__, stat);
if (stat & BUSY_STAT) {
/* Not ready yet, so wait for another IRQ. */
ide_set_handler(drive, &task_out_intr, WAIT_WORSTCASE, NULL);
return ide_started;
}
}
/* Deal with unexpected ATA data phase. */ /* Deal with unexpected ATA data phase. */
if ((!(stat & DATA_READY) && rq->nr_sectors) || if ((!(stat & DATA_READY) && rq->nr_sectors) ||
...@@ -714,16 +706,8 @@ ide_startstop_t task_mulout_intr (ide_drive_t *drive) ...@@ -714,16 +706,8 @@ ide_startstop_t task_mulout_intr (ide_drive_t *drive)
u8 stat; u8 stat;
stat = HWIF(drive)->INB(IDE_STATUS_REG); stat = HWIF(drive)->INB(IDE_STATUS_REG);
if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat)) { if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat))
if ((stat & (ERR_STAT | DRQ_STAT)) ||
((stat & WRERR_STAT) && !drive->nowerr))
return DRIVER(drive)->error(drive, __FUNCTION__, stat); return DRIVER(drive)->error(drive, __FUNCTION__, stat);
if (stat & BUSY_STAT) {
/* Not ready yet, so wait for another IRQ. */
ide_set_handler(drive, &task_mulout_intr, WAIT_WORSTCASE, NULL);
return ide_started;
}
}
/* Deal with unexpected ATA data phase. */ /* Deal with unexpected ATA data phase. */
if ((!(stat & DATA_READY) && rq->nr_sectors) || if ((!(stat & DATA_READY) && rq->nr_sectors) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment