diff options
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r-- | drivers/ide/ide-tape.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 29870c415110..54a43b044608 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -395,13 +395,13 @@ static void idetape_input_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
395 | if (bh == NULL) { | 395 | if (bh == NULL) { |
396 | printk(KERN_ERR "ide-tape: bh == NULL in " | 396 | printk(KERN_ERR "ide-tape: bh == NULL in " |
397 | "idetape_input_buffers\n"); | 397 | "idetape_input_buffers\n"); |
398 | ide_atapi_discard_data(drive, bcount); | 398 | ide_pad_transfer(drive, 0, bcount); |
399 | return; | 399 | return; |
400 | } | 400 | } |
401 | count = min( | 401 | count = min( |
402 | (unsigned int)(bh->b_size - atomic_read(&bh->b_count)), | 402 | (unsigned int)(bh->b_size - atomic_read(&bh->b_count)), |
403 | bcount); | 403 | bcount); |
404 | HWIF(drive)->atapi_input_bytes(drive, bh->b_data + | 404 | drive->hwif->input_data(drive, NULL, bh->b_data + |
405 | atomic_read(&bh->b_count), count); | 405 | atomic_read(&bh->b_count), count); |
406 | bcount -= count; | 406 | bcount -= count; |
407 | atomic_add(count, &bh->b_count); | 407 | atomic_add(count, &bh->b_count); |
@@ -427,7 +427,7 @@ static void idetape_output_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
427 | return; | 427 | return; |
428 | } | 428 | } |
429 | count = min((unsigned int)pc->b_count, (unsigned int)bcount); | 429 | count = min((unsigned int)pc->b_count, (unsigned int)bcount); |
430 | HWIF(drive)->atapi_output_bytes(drive, pc->b_data, count); | 430 | drive->hwif->output_data(drive, NULL, pc->b_data, count); |
431 | bcount -= count; | 431 | bcount -= count; |
432 | pc->b_data += count; | 432 | pc->b_data += count; |
433 | pc->b_count -= count; | 433 | pc->b_count -= count; |
@@ -871,7 +871,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive) | |||
871 | printk(KERN_ERR "ide-tape: The tape wants to " | 871 | printk(KERN_ERR "ide-tape: The tape wants to " |
872 | "send us more data than expected " | 872 | "send us more data than expected " |
873 | "- discarding data\n"); | 873 | "- discarding data\n"); |
874 | ide_atapi_discard_data(drive, bcount); | 874 | ide_pad_transfer(drive, 0, bcount); |
875 | ide_set_handler(drive, &idetape_pc_intr, | 875 | ide_set_handler(drive, &idetape_pc_intr, |
876 | IDETAPE_WAIT_CMD, NULL); | 876 | IDETAPE_WAIT_CMD, NULL); |
877 | return ide_started; | 877 | return ide_started; |
@@ -880,16 +880,16 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive) | |||
880 | "data than expected - allowing transfer\n"); | 880 | "data than expected - allowing transfer\n"); |
881 | } | 881 | } |
882 | iobuf = &idetape_input_buffers; | 882 | iobuf = &idetape_input_buffers; |
883 | xferfunc = hwif->atapi_input_bytes; | 883 | xferfunc = hwif->input_data; |
884 | } else { | 884 | } else { |
885 | iobuf = &idetape_output_buffers; | 885 | iobuf = &idetape_output_buffers; |
886 | xferfunc = hwif->atapi_output_bytes; | 886 | xferfunc = hwif->output_data; |
887 | } | 887 | } |
888 | 888 | ||
889 | if (pc->bh) | 889 | if (pc->bh) |
890 | iobuf(drive, pc, bcount); | 890 | iobuf(drive, pc, bcount); |
891 | else | 891 | else |
892 | xferfunc(drive, pc->cur_pos, bcount); | 892 | xferfunc(drive, NULL, pc->cur_pos, bcount); |
893 | 893 | ||
894 | /* Update the current position */ | 894 | /* Update the current position */ |
895 | pc->xferred += bcount; | 895 | pc->xferred += bcount; |
@@ -979,7 +979,8 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive) | |||
979 | hwif->dma_ops->dma_start(drive); | 979 | hwif->dma_ops->dma_start(drive); |
980 | #endif | 980 | #endif |
981 | /* Send the actual packet */ | 981 | /* Send the actual packet */ |
982 | HWIF(drive)->atapi_output_bytes(drive, pc->c, 12); | 982 | hwif->output_data(drive, NULL, pc->c, 12); |
983 | |||
983 | return ide_started; | 984 | return ide_started; |
984 | } | 985 | } |
985 | 986 | ||
@@ -1055,7 +1056,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, | |||
1055 | IDETAPE_WAIT_CMD, NULL); | 1056 | IDETAPE_WAIT_CMD, NULL); |
1056 | return ide_started; | 1057 | return ide_started; |
1057 | } else { | 1058 | } else { |
1058 | hwif->OUTB(WIN_PACKETCMD, hwif->io_ports.command_addr); | 1059 | ide_execute_pkt_cmd(drive); |
1059 | return idetape_transfer_pc(drive); | 1060 | return idetape_transfer_pc(drive); |
1060 | } | 1061 | } |
1061 | } | 1062 | } |