Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105029
b: refs/heads/master
c: 2207fa5
h: refs/heads/master
i:
  105027: a2f24a9
v: v3
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Jul 23, 2008
1 parent 437317f commit 362b328
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 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: d7c26ebb5bca284ece9db7311a9e180aabae1922
refs/heads/master: 2207fa5af1507ea018fc95e777276edb1ca5601a
10 changes: 8 additions & 2 deletions trunk/drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ 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) {
pc->callback(drive);
if (drive->media == ide_floppy)
drive->pc_callback(drive);
else
pc->callback(drive);
return ide_stopped;
}

Expand Down Expand Up @@ -97,7 +100,10 @@ ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc,
return ide_stopped;
}
/* Command finished - Call the callback function */
pc->callback(drive);
if (drive->media == ide_floppy)
drive->pc_callback(drive);
else
pc->callback(drive);
return ide_stopped;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ static void idefloppy_init_pc(struct ide_atapi_pc *pc)
memset(pc, 0, sizeof(*pc));
pc->buf = pc->pc_buf;
pc->buf_size = IDEFLOPPY_PC_BUFFER_SIZE;
pc->callback = ide_floppy_callback;
}

static void idefloppy_create_request_sense_cmd(struct ide_atapi_pc *pc)
Expand Down Expand Up @@ -474,7 +473,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,
pc->error = IDEFLOPPY_ERROR_GENERAL;

floppy->failed_pc = NULL;
pc->callback(drive);
drive->pc_callback(drive);
return ide_stopped;
}

Expand Down Expand Up @@ -1040,6 +1039,7 @@ static void idefloppy_setup(ide_drive_t *drive, idefloppy_floppy_t *floppy)

*((u16 *) &gcw) = drive->id->config;
floppy->pc = floppy->pc_stack;
drive->pc_callback = ide_floppy_callback;

if (((gcw[0] & 0x60) >> 5) == 1)
floppy->flags |= IDEFLOPPY_FLAG_DRQ_INTERRUPT;
Expand Down

0 comments on commit 362b328

Please sign in to comment.