X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=drivers%2Fdd%2Ffloppy%2Ffloppy.c;h=d40c5f0a4c946f876d4e4876166670e357e7d9cf;hb=e3ed2d773259cc445c7ff8181ebd934931365328;hp=e5e54e40a39825be1b0a20b06b37df4d4a424562;hpb=d378c68f5a9bb25c9e671dacd482d2e25d211df3;p=reactos.git diff --git a/drivers/dd/floppy/floppy.c b/drivers/dd/floppy/floppy.c index e5e54e4..d40c5f0 100644 --- a/drivers/dd/floppy/floppy.c +++ b/drivers/dd/floppy/floppy.c @@ -23,8 +23,8 @@ FLOPPY_CONTROLLER_PARAMETERS ControllerParameters[FLOPPY_MAX_CONTROLLERS] = { - {0x03f0, 6, 6, 2, 6, LevelSensitive, 0xffff} - // {0x0370, 6, 6, 6, LevelSensitive, 0xffff}, + {0x03f0, 6, 2, Latched} + // {0x0370, 6, 6, Latched} }; const FLOPPY_MEDIA_TYPE MediaTypes[] = { @@ -50,8 +50,17 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject, PCONFIGURATION_INFORMATION Config; DEVICE_DESCRIPTION DeviceDescription; ULONG MaxMapRegs; + ULONG MappedIrq; + KIRQL Dirql; + KAFFINITY Affinity; - /* FIXME: Register port ranges and interrupts with HAL */ + /* FIXME: Register port ranges with HAL */ + MappedIrq = HalGetInterruptVector(Isa, + 0, + ControllerParameters->Vector, + ControllerParameters->Vector, + &Dirql, + &Affinity); /* Create controller object for FDC */ ControllerObject = IoCreateController(sizeof(FLOPPY_CONTROLLER_EXTENSION)); @@ -67,7 +76,7 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject, ControllerObject->ControllerExtension; ControllerExtension->Number = Index; ControllerExtension->PortBase = ControllerParameters->PortBase; - ControllerExtension->Vector = ControllerParameters->Vector; + ControllerExtension->Vector = MappedIrq; KeInitializeEvent( &ControllerExtension->Event, SynchronizationEvent, FALSE ); ControllerExtension->Device = 0; // no active device ControllerExtension->Irp = 0; // no active IRP @@ -81,12 +90,12 @@ FloppyCreateController(PDRIVER_OBJECT DriverObject, FloppyIsr, ControllerObject, &ControllerExtension->SpinLock, - ControllerExtension->Vector, - ControllerParameters->IrqL, - ControllerParameters->SynchronizeIrqL, + MappedIrq, + Dirql, + Dirql, ControllerParameters->InterruptMode, FALSE, - ControllerParameters->Affinity, + Affinity, FALSE); if (!NT_SUCCESS(Status)) {