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

[PATCH] remove unused ide_end_taskfile()

Additionally ide_end_drive_cmd() contains all functionality of this function.
parent 04a97afb
...@@ -834,13 +834,6 @@ ide_startstop_t idedisk_error (ide_drive_t *drive, const char *msg, u8 stat) ...@@ -834,13 +834,6 @@ ide_startstop_t idedisk_error (ide_drive_t *drive, const char *msg, u8 stat)
ide_end_drive_cmd(drive, stat, err); ide_end_drive_cmd(drive, stat, err);
return ide_stopped; return ide_stopped;
} }
#if 0
else if (rq->flags & REQ_DRIVE_TASKFILE) {
rq->errors = 1;
ide_end_taskfile(drive, stat, err);
return ide_stopped;
}
#endif
#ifdef CONFIG_IDE_TASKFILE_IO #ifdef CONFIG_IDE_TASKFILE_IO
/* make rq completion pointers new submission pointers */ /* make rq completion pointers new submission pointers */
blk_rq_prep_restart(rq); blk_rq_prep_restart(rq);
......
...@@ -300,7 +300,6 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat) ...@@ -300,7 +300,6 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat)
if (rq->flags & REQ_DRIVE_TASKFILE) { if (rq->flags & REQ_DRIVE_TASKFILE) {
rq->errors = 1; rq->errors = 1;
ide_end_drive_cmd(drive, stat, err); ide_end_drive_cmd(drive, stat, err);
// ide_end_taskfile(drive, stat, err);
return ide_stopped; return ide_stopped;
} }
...@@ -387,7 +386,6 @@ ide_startstop_t ide_abort(ide_drive_t *drive, const char *msg) ...@@ -387,7 +386,6 @@ ide_startstop_t ide_abort(ide_drive_t *drive, const char *msg)
if (rq->flags & REQ_DRIVE_TASKFILE) { if (rq->flags & REQ_DRIVE_TASKFILE) {
rq->errors = 1; rq->errors = 1;
ide_end_drive_cmd(drive, BUSY_STAT, 0); ide_end_drive_cmd(drive, BUSY_STAT, 0);
// ide_end_taskfile(drive, BUSY_STAT, 0);
return ide_stopped; return ide_stopped;
} }
......
...@@ -218,66 +218,6 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) ...@@ -218,66 +218,6 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
EXPORT_SYMBOL(do_rw_taskfile); EXPORT_SYMBOL(do_rw_taskfile);
/*
* Clean up after success/failure of an explicit taskfile operation.
*/
void ide_end_taskfile (ide_drive_t *drive, u8 stat, u8 err)
{
ide_hwif_t *hwif = HWIF(drive);
unsigned long flags;
struct request *rq;
ide_task_t *args;
task_ioreg_t command;
spin_lock_irqsave(&ide_lock, flags);
rq = HWGROUP(drive)->rq;
spin_unlock_irqrestore(&ide_lock, flags);
args = (ide_task_t *) rq->special;
command = args->tfRegister[IDE_COMMAND_OFFSET];
if (rq->errors == 0)
rq->errors = !OK_STAT(stat,READY_STAT,BAD_STAT);
if (args->tf_in_flags.b.data) {
u16 data = hwif->INW(IDE_DATA_REG);
args->tfRegister[IDE_DATA_OFFSET] = (data) & 0xFF;
args->hobRegister[IDE_DATA_OFFSET_HOB] = (data >> 8) & 0xFF;
}
args->tfRegister[IDE_ERROR_OFFSET] = err;
args->tfRegister[IDE_NSECTOR_OFFSET] = hwif->INB(IDE_NSECTOR_REG);
args->tfRegister[IDE_SECTOR_OFFSET] = hwif->INB(IDE_SECTOR_REG);
args->tfRegister[IDE_LCYL_OFFSET] = hwif->INB(IDE_LCYL_REG);
args->tfRegister[IDE_HCYL_OFFSET] = hwif->INB(IDE_HCYL_REG);
args->tfRegister[IDE_SELECT_OFFSET] = hwif->INB(IDE_SELECT_REG);
args->tfRegister[IDE_STATUS_OFFSET] = stat;
if ((drive->id->command_set_2 & 0x0400) &&
(drive->id->cfs_enable_2 & 0x0400) &&
(drive->addressing == 1)) {
hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG_HOB);
args->hobRegister[IDE_FEATURE_OFFSET_HOB] = hwif->INB(IDE_FEATURE_REG);
args->hobRegister[IDE_NSECTOR_OFFSET_HOB] = hwif->INB(IDE_NSECTOR_REG);
args->hobRegister[IDE_SECTOR_OFFSET_HOB] = hwif->INB(IDE_SECTOR_REG);
args->hobRegister[IDE_LCYL_OFFSET_HOB] = hwif->INB(IDE_LCYL_REG);
args->hobRegister[IDE_HCYL_OFFSET_HOB] = hwif->INB(IDE_HCYL_REG);
}
#if 0
/* taskfile_settings_update(drive, args, command); */
if (args->posthandler != NULL)
args->posthandler(drive, args);
#endif
spin_lock_irqsave(&ide_lock, flags);
blkdev_dequeue_request(rq);
HWGROUP(drive)->rq = NULL;
end_that_request_last(rq);
spin_unlock_irqrestore(&ide_lock, flags);
}
EXPORT_SYMBOL(ide_end_taskfile);
/* /*
* set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd. * set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd.
*/ */
......
...@@ -1433,9 +1433,6 @@ extern int wait_for_ready(ide_drive_t *, int /* timeout */); ...@@ -1433,9 +1433,6 @@ extern int wait_for_ready(ide_drive_t *, int /* timeout */);
*/ */
extern ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); extern ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);
/* (ide_drive_t *drive, u8 stat, u8 err) */
extern void ide_end_taskfile(ide_drive_t *, u8, u8);
/* /*
* Special Flagged Register Validation Caller * Special Flagged Register Validation Caller
*/ */
......
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