From 362b328cd7f17f9315b27548942d9523b2019114 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Wed, 23 Jul 2008 19:55:59 +0200 Subject: [PATCH] --- yaml --- r: 105029 b: refs/heads/master c: 2207fa5af1507ea018fc95e777276edb1ca5601a h: refs/heads/master i: 105027: a2f24a9175bb8b6d4d3124afd5166e4271101dfc v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-atapi.c | 10 ++++++++-- trunk/drivers/ide/ide-floppy.c | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3d50e37f5b19..e7a376888c43 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d7c26ebb5bca284ece9db7311a9e180aabae1922 +refs/heads/master: 2207fa5af1507ea018fc95e777276edb1ca5601a diff --git a/trunk/drivers/ide/ide-atapi.c b/trunk/drivers/ide/ide-atapi.c index 6789b81ea78d..0c4f45247d86 100644 --- a/trunk/drivers/ide/ide-atapi.c +++ b/trunk/drivers/ide/ide-atapi.c @@ -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; } @@ -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; } diff --git a/trunk/drivers/ide/ide-floppy.c b/trunk/drivers/ide/ide-floppy.c index 62be2b27f236..44b53896f105 100644 --- a/trunk/drivers/ide/ide-floppy.c +++ b/trunk/drivers/ide/ide-floppy.c @@ -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) @@ -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; } @@ -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;