Commit 559f1686 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[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: default avatarBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 47d35d55
...@@ -505,29 +505,18 @@ ide_startstop_t task_mulout_intr (ide_drive_t *drive) ...@@ -505,29 +505,18 @@ ide_startstop_t task_mulout_intr (ide_drive_t *drive)
u8 stat = hwif->INB(IDE_STATUS_REG); u8 stat = hwif->INB(IDE_STATUS_REG);
struct request *rq = HWGROUP(drive)->rq; struct request *rq = HWGROUP(drive)->rq;
char *pBuf = NULL; char *pBuf = NULL;
ide_startstop_t startstop = ide_stopped;
unsigned int msect = drive->mult_count; unsigned int msect = drive->mult_count;
unsigned int nsect; unsigned int nsect;
unsigned long flags; unsigned long flags;
/* if (!OK_STAT(stat, DATA_READY, BAD_R_STAT) || !rq->current_nr_sectors) {
* (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 (stat & (ERR_STAT|DRQ_STAT)) { if (stat & (ERR_STAT|DRQ_STAT)) {
return DRIVER(drive)->error(drive, "task_mulout_intr", 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); DRIVER(drive)->end_request(drive, 1, 0);
return startstop; return ide_stopped;
}
/*
* 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);
} }
/* no data yet, so wait for another interrupt */ /* no data yet, so wait for another interrupt */
if (HWGROUP(drive)->handler == NULL) if (HWGROUP(drive)->handler == NULL)
......
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