aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-18 19:46:03 -0400
committerTejun Heo <tj@kernel.org>2009-04-18 19:46:03 -0400
commit6d7003877c2f0578f1c08f66d05c3f72ef4ae596 (patch)
tree81e2ba44a3b12c1b946adc8a9453506a52405976 /drivers/ide/ide-atapi.c
parent07bd9686c50c2b1f10e48089d4fb836a971f5177 (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/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c17
1 files changed, 4 insertions, 13 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) ?