aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-18 19:46:03 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-04-28 01:37:32 -0400
commit29d1a4371035e01b0d079bc5aa88b50f5af7a566 (patch)
tree4aad5a0868e1929f0ced33ffde34b334760c0522 /drivers/ide
parent4344d07fb8dbf0cbfec1f7d7c1afeccaceaaa120 (diff)
ide-atapi: kill unused fields and callbacks
Impact: remove fields and code paths which are no longer necessary Now that ide-tape uses standard mechanisms to transfer data, special case handling for bh handling can be dropped from ide-atapi. Drop the followings. * pc->cur_pos, b_count, bh and b_data * drive->pc_update_buffers() and pc_io_buffers(). Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-atapi.c17
-rw-r--r--drivers/ide/ide-tape.c1
2 files changed, 4 insertions, 14 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index b9dd4503cbc7..afe5a4323879 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -359,11 +359,8 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
359 drive->name, rq_data_dir(pc->rq) 359 drive->name, rq_data_dir(pc->rq)
360 ? "write" : "read"); 360 ? "write" : "read");
361 pc->flags |= PC_FLAG_DMA_ERROR; 361 pc->flags |= PC_FLAG_DMA_ERROR;
362 } else { 362 } else
363 pc->xferred = pc->req_xfer; 363 pc->xferred = pc->req_xfer;
364 if (drive->pc_update_buffers)
365 drive->pc_update_buffers(drive, pc);
366 }
367 debug_log("%s: DMA finished\n", drive->name); 364 debug_log("%s: DMA finished\n", drive->name);
368 } 365 }
369 366
@@ -463,16 +460,11 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
463 return ide_do_reset(drive); 460 return ide_do_reset(drive);
464 } 461 }
465 462
466 if (drive->media == ide_tape && pc->bh) 463 done = min_t(unsigned int, bcount, cmd->nleft);
467 done = drive->pc_io_buffers(drive, pc, bcount, write); 464 ide_pio_bytes(drive, cmd, write, done);
468 else {
469 done = min_t(unsigned int, bcount, cmd->nleft);
470 ide_pio_bytes(drive, cmd, write, done);
471 }
472 465
473 /* Update the current position */ 466 /* Update transferred byte count */
474 pc->xferred += done; 467 pc->xferred += done;
475 pc->cur_pos += done;
476 468
477 bcount -= done; 469 bcount -= done;
478 470
@@ -650,7 +642,6 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
650 642
651 /* We haven't transferred any data yet */ 643 /* We haven't transferred any data yet */
652 pc->xferred = 0; 644 pc->xferred = 0;
653 pc->cur_pos = pc->buf;
654 645
655 valid_tf = IDE_VALID_DEVICE; 646 valid_tf = IDE_VALID_DEVICE;
656 bcount = ((drive->media == ide_tape) ? 647 bcount = ((drive->media == ide_tape) ?
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 2599579e4174..8dfc68892d6a 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -591,7 +591,6 @@ static void ide_tape_create_rw_cmd(idetape_tape_t *tape,
591 ide_init_pc(pc); 591 ide_init_pc(pc);
592 put_unaligned(cpu_to_be32(length), (unsigned int *) &pc->c[1]); 592 put_unaligned(cpu_to_be32(length), (unsigned int *) &pc->c[1]);
593 pc->c[1] = 1; 593 pc->c[1] = 1;
594 pc->bh = NULL;
595 pc->buf = NULL; 594 pc->buf = NULL;
596 pc->buf_size = length * tape->blk_size; 595 pc->buf_size = length * tape->blk_size;
597 pc->req_xfer = pc->buf_size; 596 pc->req_xfer = pc->buf_size;