{
PBUS_HANDLER BusHandler;
NTSTATUSStatus;
ASSERT(FdoExtension->BusHandler == NULL);
/* Check if this is the FDO for the root bus */if (PCI_IS_ROOT_FDO(FdoExtension))
{
/* Query the PCI Bus Interface that ACPI exposes */ASSERT(FdoExtension->PciBusInterface == NULL);
Status = PciQueryForPciBusInterface(FdoExtension);
if (!NT_SUCCESS(Status))
{
/* No ACPI, so Bus Numbers should be maintained by BIOS */ASSERT(!PciAssignBusNumbers);
}
else
{
/* ACPI detected, PCI Bus Driver will reconfigure bus numbers*/PciAssignBusNumbers = TRUE;
}
}
else
{
/* Check if the root bus already has the interface set up */if (FdoExtension->BusRootFdoExtension->PciBusInterface)
{
/* Nothing for this FDO to do */returnSTATUS_SUCCESS;
}
/* Fail into case below so we can query the HAL interface */
Status = STATUS_NOT_SUPPORTED;
}
/* If the ACPI PCI Bus Interface couldn't be obtained, try the HAL */if (!NT_SUCCESS(Status))
{
/* Bus number assignment should be static */ASSERT(Status == STATUS_NOT_SUPPORTED);
ASSERT(!PciAssignBusNumbers);
/* Call the HAL to obtain the bus handler for PCI */
BusHandler = HalReferenceHandlerForBus(PCIBus, FdoExtension->BaseBus);
FdoExtension->BusHandler = BusHandler;
/* Fail if the HAL does not have a PCI Bus Handler for this bus */if (!BusHandler) returnSTATUS_INVALID_DEVICE_REQUEST;
}
/* Appropriate interface was obtained */returnSTATUS_SUCCESS;
}
Generated on Sat May 26 2012 04:45:32 for ReactOS by
1.7.6.1
ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.