diff options
| author | Bartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl> | 2004-06-15 06:19:21 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-15 06:19:21 -0700 |
| commit | 559f1686ca516ed6e6c32334ae6c00cfc46c3bc6 (patch) | |
| tree | 20577e32b7329d2bdfb1ce98701918509fe50636 | |
| parent | 47d35d55094a468055faa58a97bafabd1550eee1 (diff) | |
[PATCH] ide: tiny task_mulout_intr() (CONFIG_IDE_TASKFILE_IO=n) cleanup
- merge status checking code for rq->current_nr_sectors
and !rq->current_nr_sectors cases
- remove !rq->bio check as it is always true
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | drivers/ide/ide-taskfile.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 2d1c5c612044..3269baa89972 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -505,29 +505,18 @@ ide_startstop_t task_mulout_intr (ide_drive_t *drive) u8 stat = hwif->INB(IDE_STATUS_REG); struct request *rq = HWGROUP(drive)->rq; char *pBuf = NULL; - ide_startstop_t startstop = ide_stopped; unsigned int msect = drive->mult_count; unsigned int nsect; unsigned long flags; - /* - * (ks/hs): Handle last IRQ on multi-sector transfer, - * occurs after all data was sent in this chunk - */ - if (rq->current_nr_sectors == 0) { + if (!OK_STAT(stat, DATA_READY, BAD_R_STAT) || !rq->current_nr_sectors) { if (stat & (ERR_STAT|DRQ_STAT)) { return DRIVER(drive)->error(drive, "task_mulout_intr", stat); } - if (!rq->bio) + /* Handle last IRQ, occurs after all data was sent. */ + if (!rq->current_nr_sectors) { DRIVER(drive)->end_request(drive, 1, 0); - return startstop; - } - /* - * DON'T be lazy code the above and below togather !!! - */ - if (!OK_STAT(stat,DATA_READY,BAD_R_STAT)) { - if (stat & (ERR_STAT|DRQ_STAT)) { - return DRIVER(drive)->error(drive, "task_mulout_intr", stat); + return ide_stopped; } /* no data yet, so wait for another interrupt */ if (HWGROUP(drive)->handler == NULL) |
