patch-2.1.36 linux/drivers/block/floppy.c
Next file: linux/drivers/block/genhd.c
Previous file: linux/drivers/block/ataflop.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Tue Apr 15 22:26:28 1997
- Orig file:
v2.1.35/linux/drivers/block/floppy.c
- Orig date:
Mon Apr 14 16:28:11 1997
diff -u --recursive --new-file v2.1.35/linux/drivers/block/floppy.c linux/drivers/block/floppy.c
@@ -1676,10 +1676,13 @@
} while ((ST0 & 0x83) != UNIT(current_drive) && inr == 2);
}
if (handler) {
- if (in_interrupt())
- schedule_bh( (void *)(void *) handler);
- else
+ if(softirq_trylock()) {
+ /* got the lock, call the handler immediately */
handler();
+ softirq_endlock();
+ } else
+ /* we interrupted a bottom half. Defer handler */
+ schedule_bh( (void *)(void *) handler);
} else
FDCS->reset = 1;
is_alive("normal interrupt end");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov