Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105030
b: refs/heads/master
c: 776bb02
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Jul 23, 2008
1 parent 362b328 commit a223523
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2207fa5af1507ea018fc95e777276edb1ca5601a
refs/heads/master: 776bb0270ea72c40f95347dcac868c9f602dcb3e
4 changes: 2 additions & 2 deletions trunk/drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
debug_log("Enter %s - interrupt handler\n", __func__);

if (pc->flags & PC_FLAG_TIMEDOUT) {
if (drive->media == ide_floppy)
if (drive->media == ide_floppy || drive->media == ide_tape)
drive->pc_callback(drive);
else
pc->callback(drive);
Expand Down Expand Up @@ -100,7 +100,7 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
return ide_stopped;
}
/* Command finished - Call the callback function */
if (drive->media == ide_floppy)
if (drive->media == ide_floppy || drive->media == ide_tape)
drive->pc_callback(drive);
else
pc->callback(drive);
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,6 @@ static void idetape_init_pc(struct ide_atapi_pc *pc)
pc->buf_size = IDETAPE_PC_BUFFER_SIZE;
pc->bh = NULL;
pc->b_data = NULL;
pc->callback = ide_tape_callback;
}

static void idetape_create_request_sense_cmd(struct ide_atapi_pc *pc)
Expand Down Expand Up @@ -886,7 +885,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive,
pc->error = IDETAPE_ERROR_GENERAL;
}
tape->failed_pc = NULL;
pc->callback(drive);
drive->pc_callback(drive);
return ide_stopped;
}
debug_log(DBG_SENSE, "Retry #%d, cmd = %02X\n", pc->retries, pc->c[0]);
Expand Down Expand Up @@ -948,7 +947,7 @@ static ide_startstop_t idetape_media_access_finished(ide_drive_t *drive)
pc->error = IDETAPE_ERROR_GENERAL;
tape->failed_pc = NULL;
}
pc->callback(drive);
drive->pc_callback(drive);
return ide_stopped;
}

Expand Down Expand Up @@ -2465,6 +2464,8 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor)
u8 gcw[2];
u16 *ctl = (u16 *)&tape->caps[12];

drive->pc_callback = ide_tape_callback;

spin_lock_init(&tape->lock);
drive->dsc_overlap = 1;
if (drive->hwif->host_flags & IDE_HFLAG_NO_DSC) {
Expand Down

0 comments on commit a223523

Please sign in to comment.