Author: cgutman Date: Sun Nov 13 05:49:33 2011 New Revision: 54371
URL: http://svn.reactos.org/svn/reactos?rev=54371&view=rev Log: [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
Modified: trunk/reactos/hal/halx86/generic/dma.c
Modified: trunk/reactos/hal/halx86/generic/dma.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/dma.c?re... ============================================================================== --- trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] Sun Nov 13 05:49:33 2011 @@ -614,9 +614,12 @@ * 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 == Isa) && (DeviceDescription->DmaChannel >= 8)) + if (((DeviceDescription->InterfaceType == Eisa) || + (DeviceDescription->InterfaceType == Isa)) || !(DeviceDescription->Master)) + { + if (((DeviceDescription->InterfaceType == Isa) || + (DeviceDescription->InterfaceType == Eisa)) && + (DeviceDescription->DmaChannel >= 8)) { EisaAdapter = FALSE; } @@ -1208,7 +1211,7 @@ */ KeWaitForSingleObject(&HalpDmaLock, Executive, KernelMode, FALSE, NULL); Succeeded = HalpGrowMapBuffers(WorkItem->AdapterObject->MasterAdapter, - WorkItem->NumberOfMapRegisters); + WorkItem->NumberOfMapRegisters << PAGE_SHIFT); KeSetEvent(&HalpDmaLock, 0, 0);
if (Succeeded)