From 2207fa5af1507ea018fc95e777276edb1ca5601a Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Wed, 23 Jul 2008 19:55:59 +0200 Subject: 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 Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/ide-atapi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'drivers/ide/ide-atapi.c') diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 6789b81ea78..0c4f45247d8 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; } -- cgit v1.2.3-70-g09d2