From 39dca294c5b0c9a9fb6e5b59ef27d21ef9c2a9f8 Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Thu, 30 Oct 2003 13:34:47 +0000 Subject: [PATCH] fixed a call to IoAllocateAdapterChannel svn path=/trunk/; revision=6465 --- reactos/drivers/dd/floppy/floppy.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reactos/drivers/dd/floppy/floppy.c b/reactos/drivers/dd/floppy/floppy.c index a3378db546f..d191972f0fc 100644 --- a/reactos/drivers/dd/floppy/floppy.c +++ b/reactos/drivers/dd/floppy/floppy.c @@ -52,6 +52,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject, ULONG MappedIrq; KIRQL Dirql; KAFFINITY Affinity; + KIRQL oldIrql; /* FIXME: Register port ranges with HAL */ MappedIrq = HalGetInterruptVector(Isa, @@ -221,11 +222,16 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject, Config->FloppyCount++; // call IoAllocateAdapterChannel, and wait for execution routine to be given the channel CHECKPOINT; + + /* DDK: IoAllocateAdapterChannel _must_ be called at DISPATCH_LEVEL */ + KeRaiseIrql(DISPATCH_LEVEL, &oldIrql); Status = IoAllocateAdapterChannel( ControllerExtension->AdapterObject, DeviceObject, 0x3000/PAGE_SIZE, // max track size is 12k FloppyAdapterControl, ControllerExtension ); + KeLowerIrql(oldIrql); + if( !NT_SUCCESS( Status ) ) { DPRINT1( "Error: IoAllocateAdapterChannel returned %x\n", Status );