summaryrefslogtreecommitdiff
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2008-07-23 19:55:59 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-23 19:55:59 +0200
commit2207fa5af1507ea018fc95e777276edb1ca5601a (patch)
tree7e8ee9c8932bb71bc5ef79007ae35b777f8f254c /drivers/ide/ide-atapi.c
parentd7c26ebb5bca284ece9db7311a9e180aabae1922 (diff)
ide-floppy: use drive->pc_callback instead of pc->callback
It is important that drive->pc_callback is set prior to enabling IRQs on the device since this is called from the IRQ handler. Otherwise it hurts as I learnt the hard way from the several "Kernel panic - not synching: Fatal exception in interrupt" during the weekend :). The if-else block in the IRQ handler is only temporary so that bisect searches don't break and it'll be removed after converting the remainder of the drivers. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 6789b81ea78d..0c4f45247d86 100644
--- a/drivers/ide/ide-atapi.c
+++ b/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 @@ cmd_finished:
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;
}