Author: cgutman
Date: Sun Mar 25 16:53:02 2012
New Revision: 56227
URL:
http://svn.reactos.org/svn/reactos?rev=56227&view=rev
Log:
[ACPI]
- Properly tag alternate interrupt and DMA resources
- Only iterate through the first dependent function (for now)
Modified:
trunk/reactos/drivers/bus/acpi/buspdo.c
Modified: trunk/reactos/drivers/bus/acpi/buspdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/buspdo.c?…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] Sun Mar 25 16:53:02 2012
@@ -1269,7 +1269,7 @@
/* Fill resources list structure */
resource = Buffer.Pointer;
- while (resource->Type != ACPI_RESOURCE_TYPE_END_TAG)
+ while (resource->Type != ACPI_RESOURCE_TYPE_END_TAG && resource->Type
!= ACPI_RESOURCE_TYPE_END_DEPENDENT)
{
switch (resource->Type)
{
@@ -1280,7 +1280,7 @@
break;
for (i = 0; i < irq_data->InterruptCount; i++)
{
- RequirementDescriptor->Option = CurrentRes ? 0 :
IO_RESOURCE_PREFERRED;
+ RequirementDescriptor->Option = (i == 0) ? IO_RESOURCE_PREFERRED :
IO_RESOURCE_ALTERNATIVE;
RequirementDescriptor->Type = CmResourceTypeInterrupt;
RequirementDescriptor->ShareDisposition = (irq_data->Sharable
== ACPI_SHARED ? CmResourceShareShared : CmResourceShareDeviceExclusive);
RequirementDescriptor->Flags =(irq_data->Triggering ==
ACPI_LEVEL_SENSITIVE ? CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE :
CM_RESOURCE_INTERRUPT_LATCHED);
@@ -1296,7 +1296,7 @@
ACPI_RESOURCE_IRQ *irq_data = (ACPI_RESOURCE_IRQ*)
&resource->Data;
for (i = 0; i < irq_data->InterruptCount; i++)
{
- RequirementDescriptor->Option = CurrentRes ? 0 :
IO_RESOURCE_PREFERRED;
+ RequirementDescriptor->Option = (i == 0) ? IO_RESOURCE_PREFERRED :
IO_RESOURCE_ALTERNATIVE;
RequirementDescriptor->Type = CmResourceTypeInterrupt;
RequirementDescriptor->ShareDisposition = (irq_data->Sharable
== ACPI_SHARED ? CmResourceShareShared : CmResourceShareDeviceExclusive);
RequirementDescriptor->Flags =(irq_data->Triggering ==
ACPI_LEVEL_SENSITIVE ? CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE :
CM_RESOURCE_INTERRUPT_LATCHED);
@@ -1329,7 +1329,7 @@
case ACPI_TRANSFER_8_16: RequirementDescriptor->Flags |=
CM_RESOURCE_DMA_8_AND_16; break;
}
- RequirementDescriptor->Option = CurrentRes ? 0 :
IO_RESOURCE_PREFERRED;
+ RequirementDescriptor->Option = (i == 0) ? IO_RESOURCE_PREFERRED :
IO_RESOURCE_ALTERNATIVE;
RequirementDescriptor->ShareDisposition =
CmResourceShareDriverExclusive;
RequirementDescriptor->u.Dma.MinimumChannel =
RequirementDescriptor->u.Dma.MaximumChannel =
dma_data->Channels[i];