From edc6eb9ecad9fe7d4277a43932d3ec46f3402626 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 13 Nov 2011 05:49:33 +0000 Subject: [PATCH] [HAL] - Fix DMA on the EISA bus - Fix a critical calculation error in map register size resulting in the map register allocation worker not allocating enough map registers for a dynamic resize svn path=/trunk/; revision=54371 --- reactos/hal/halx86/generic/dma.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reactos/hal/halx86/generic/dma.c b/reactos/hal/halx86/generic/dma.c index 29b822a6242..47305b434f9 100644 --- a/reactos/hal/halx86/generic/dma.c +++ b/reactos/hal/halx86/generic/dma.c @@ -614,9 +614,12 @@ HalGetAdapter(IN PDEVICE_DESCRIPTION DeviceDescription, * Also note that we check for channel number since there are only 8 DMA * channels on ISA, so any request above this requires new adapter. */ - if ((DeviceDescription->InterfaceType == Isa) || !(DeviceDescription->Master)) + if (((DeviceDescription->InterfaceType == Eisa) || + (DeviceDescription->InterfaceType == Isa)) || !(DeviceDescription->Master)) { - if ((DeviceDescription->InterfaceType == Isa) && (DeviceDescription->DmaChannel >= 8)) + if (((DeviceDescription->InterfaceType == Isa) || + (DeviceDescription->InterfaceType == Eisa)) && + (DeviceDescription->DmaChannel >= 8)) { EisaAdapter = FALSE; } @@ -1208,7 +1211,7 @@ HalpGrowMapBufferWorker(IN PVOID DeferredContext) */ KeWaitForSingleObject(&HalpDmaLock, Executive, KernelMode, FALSE, NULL); Succeeded = HalpGrowMapBuffers(WorkItem->AdapterObject->MasterAdapter, - WorkItem->NumberOfMapRegisters); + WorkItem->NumberOfMapRegisters << PAGE_SHIFT); KeSetEvent(&HalpDmaLock, 0, 0); if (Succeeded)