diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 12:46:39 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 12:46:39 +0100 |
commit | 151055ed84df7bebc77d88471302a7cd02c6e0a4 (patch) | |
tree | e5580c0070a5f26f5cf479e6cf0af353d67ef624 /drivers/ide/ide-taskfile.c | |
parent | ide: merge task_{in,out}_intr() (diff) | |
download | linux-151055ed84df7bebc77d88471302a7cd02c6e0a4.tar.xz linux-151055ed84df7bebc77d88471302a7cd02c6e0a4.zip |
ide: inline task_in_unexpected() into task_pio_intr()
task_in_unexpected() is only used by task_pio_intr() so inline it there.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 99d6ed434978..a01c2c0450dc 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -314,27 +314,6 @@ void ide_finish_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat) } /* - * We got an interrupt on a task_in case, but no errors and no DRQ. - * - * It might be a spurious irq (shared irq), but it might be a - * command that had no output. - */ -static ide_startstop_t task_in_unexpected(ide_drive_t *drive, - struct ide_cmd *cmd, u8 stat) -{ - /* Command all done? */ - if (OK_STAT(stat, ATA_DRDY, ATA_BUSY)) { - ide_finish_cmd(drive, cmd, stat); - return ide_stopped; - } - - /* Assume it was a spurious irq */ - ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE, NULL); - - return ide_started; -} - -/* * Handler for command with PIO data phase. */ static ide_startstop_t task_pio_intr(ide_drive_t *drive) @@ -350,8 +329,19 @@ static ide_startstop_t task_pio_intr(ide_drive_t *drive) return task_error(drive, cmd, __func__, stat); /* Didn't want any data? Odd. */ - if ((stat & ATA_DRQ) == 0) - return task_in_unexpected(drive, cmd, stat); + if ((stat & ATA_DRQ) == 0) { + /* Command all done? */ + if (OK_STAT(stat, ATA_DRDY, ATA_BUSY)) { + ide_finish_cmd(drive, cmd, stat); + return ide_stopped; + } + + /* Assume it was a spurious irq */ + ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE, + NULL); + + return ide_started; + } } else { if (!OK_STAT(stat, DRIVE_READY, drive->bad_wstat)) return task_error(drive, cmd, __func__, stat); |