Use NEXT_RESOURCE macro in acpi driver

Move pci hack a little bit later

svn path=/trunk/; revision=30377
This commit is contained in:
Hervé Poussineau 2007-11-12 10:01:52 +00:00
parent be33f0b0ec
commit 85c79d4b97
2 changed files with 11 additions and 12 deletions

View file

@ -209,7 +209,7 @@ AcpiCreateResourceList(PCM_RESOURCE_LIST* pResourceList,
break;
}
}
resource = (RESOURCE *) ((NATIVE_UINT) resource + (NATIVE_UINT) resource->length);
resource = NEXT_RESOURCE(resource);
}
/* Allocate memory */
@ -350,7 +350,7 @@ AcpiCreateResourceList(PCM_RESOURCE_LIST* pResourceList,
break;
}
}
resource = (RESOURCE *) ((NATIVE_UINT) resource + (NATIVE_UINT) resource->length);
resource = NEXT_RESOURCE(resource);
}
acpi_rs_dump_resource_list(resource);

View file

@ -368,16 +368,6 @@ FdoStartDevice(
DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
AllocatedResources = IoGetCurrentIrpStackLocation(Irp)->Parameters.StartDevice.AllocatedResources;
/* HACK due to a bug in ACPI driver, which doesn't report the bus number */
if (!FoundBuggyAllocatedResourcesList &&
(!AllocatedResources || AllocatedResources->Count == 0))
{
FoundBuggyAllocatedResourcesList = TRUE;
DPRINT1("No bus number resource found (bug in acpi.sys?), assuming bus number #0\n");
DeviceExtension->BusNumber = 0;
goto next;
}
/* END HACK */
if (!AllocatedResources)
{
DPRINT("No allocated resources sent to driver\n");
@ -412,6 +402,15 @@ FdoStartDevice(
DPRINT1("Unknown resource descriptor type 0x%x\n", ResourceDescriptor->Type);
}
}
/* HACK due to a bug in ACPI driver, which doesn't report the bus number */
if (!FoundBuggyAllocatedResourcesList && !FoundBusNumber)
{
FoundBuggyAllocatedResourcesList = TRUE;
DPRINT1("No bus number resource found (bug in acpi.sys?), assuming bus number #0\n");
DeviceExtension->BusNumber = 0;
goto next;
}
/* END HACK */
if (!FoundBusNumber)
{
DPRINT("Some required resources were not found in allocated resources list\n");