diff options
| -rw-r--r-- | drivers/ide/ide-atapi.c | 4 | ||||
| -rw-r--r-- | drivers/ide/ide-tape.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 0c4f45247d86..d5249dfc5546 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
| @@ -31,7 +31,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
| 31 | debug_log("Enter %s - interrupt handler\n", __func__); | 31 | debug_log("Enter %s - interrupt handler\n", __func__); |
| 32 | 32 | ||
| 33 | if (pc->flags & PC_FLAG_TIMEDOUT) { | 33 | if (pc->flags & PC_FLAG_TIMEDOUT) { |
| 34 | if (drive->media == ide_floppy) | 34 | if (drive->media == ide_floppy || drive->media == ide_tape) |
| 35 | drive->pc_callback(drive); | 35 | drive->pc_callback(drive); |
| 36 | else | 36 | else |
| 37 | pc->callback(drive); | 37 | pc->callback(drive); |
| @@ -100,7 +100,7 @@ cmd_finished: | |||
| 100 | return ide_stopped; | 100 | return ide_stopped; |
| 101 | } | 101 | } |
| 102 | /* Command finished - Call the callback function */ | 102 | /* Command finished - Call the callback function */ |
| 103 | if (drive->media == ide_floppy) | 103 | if (drive->media == ide_floppy || drive->media == ide_tape) |
| 104 | drive->pc_callback(drive); | 104 | drive->pc_callback(drive); |
| 105 | else | 105 | else |
| 106 | pc->callback(drive); | 106 | pc->callback(drive); |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 663671f69f88..38ca7b1b7cf9 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
| @@ -689,7 +689,6 @@ static void idetape_init_pc(struct ide_atapi_pc *pc) | |||
| 689 | pc->buf_size = IDETAPE_PC_BUFFER_SIZE; | 689 | pc->buf_size = IDETAPE_PC_BUFFER_SIZE; |
| 690 | pc->bh = NULL; | 690 | pc->bh = NULL; |
| 691 | pc->b_data = NULL; | 691 | pc->b_data = NULL; |
| 692 | pc->callback = ide_tape_callback; | ||
| 693 | } | 692 | } |
| 694 | 693 | ||
| 695 | static void idetape_create_request_sense_cmd(struct ide_atapi_pc *pc) | 694 | static void idetape_create_request_sense_cmd(struct ide_atapi_pc *pc) |
| @@ -886,7 +885,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, | |||
| 886 | pc->error = IDETAPE_ERROR_GENERAL; | 885 | pc->error = IDETAPE_ERROR_GENERAL; |
| 887 | } | 886 | } |
| 888 | tape->failed_pc = NULL; | 887 | tape->failed_pc = NULL; |
| 889 | pc->callback(drive); | 888 | drive->pc_callback(drive); |
| 890 | return ide_stopped; | 889 | return ide_stopped; |
| 891 | } | 890 | } |
| 892 | debug_log(DBG_SENSE, "Retry #%d, cmd = %02X\n", pc->retries, pc->c[0]); | 891 | debug_log(DBG_SENSE, "Retry #%d, cmd = %02X\n", pc->retries, pc->c[0]); |
| @@ -948,7 +947,7 @@ static ide_startstop_t idetape_media_access_finished(ide_drive_t *drive) | |||
| 948 | pc->error = IDETAPE_ERROR_GENERAL; | 947 | pc->error = IDETAPE_ERROR_GENERAL; |
| 949 | tape->failed_pc = NULL; | 948 | tape->failed_pc = NULL; |
| 950 | } | 949 | } |
| 951 | pc->callback(drive); | 950 | drive->pc_callback(drive); |
| 952 | return ide_stopped; | 951 | return ide_stopped; |
| 953 | } | 952 | } |
| 954 | 953 | ||
| @@ -2465,6 +2464,8 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor) | |||
| 2465 | u8 gcw[2]; | 2464 | u8 gcw[2]; |
| 2466 | u16 *ctl = (u16 *)&tape->caps[12]; | 2465 | u16 *ctl = (u16 *)&tape->caps[12]; |
| 2467 | 2466 | ||
| 2467 | drive->pc_callback = ide_tape_callback; | ||
| 2468 | |||
| 2468 | spin_lock_init(&tape->lock); | 2469 | spin_lock_init(&tape->lock); |
| 2469 | drive->dsc_overlap = 1; | 2470 | drive->dsc_overlap = 1; |
| 2470 | if (drive->hwif->host_flags & IDE_HFLAG_NO_DSC) { | 2471 | if (drive->hwif->host_flags & IDE_HFLAG_NO_DSC) { |
