mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 04:13:18 +00:00
[ACPI]
- Provide a fallback when _BBN isn't implemented for a PCI root bus - Fixes PCI on QEMU with ACPI enabled svn path=/trunk/; revision=53463
This commit is contained in:
parent
b0c146ed0c
commit
7f089310e7
1 changed files with 41 additions and 19 deletions
|
@ -655,6 +655,7 @@ Bus_PDO_QueryResources(
|
||||||
ULONG ResourceListSize;
|
ULONG ResourceListSize;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
ULONGLONG BusNumber;
|
ULONGLONG BusNumber;
|
||||||
|
struct acpi_device *device;
|
||||||
|
|
||||||
if (!DeviceData->AcpiHandle)
|
if (!DeviceData->AcpiHandle)
|
||||||
{
|
{
|
||||||
|
@ -664,9 +665,30 @@ Bus_PDO_QueryResources(
|
||||||
/* A bus number resource is not included in the list of current resources
|
/* A bus number resource is not included in the list of current resources
|
||||||
* for the root PCI bus so we manually query one here and if we find it
|
* for the root PCI bus so we manually query one here and if we find it
|
||||||
* we create a resource list and add a bus number descriptor to it */
|
* we create a resource list and add a bus number descriptor to it */
|
||||||
AcpiStatus = acpi_evaluate_integer(DeviceData->AcpiHandle, "_BBN", NULL, &BusNumber);
|
if (wcsstr(DeviceData->HardwareIDs, L"PNP0A03") != 0)
|
||||||
if (AcpiStatus == AE_OK)
|
|
||||||
{
|
{
|
||||||
|
acpi_bus_get_device(DeviceData->AcpiHandle, &device);
|
||||||
|
|
||||||
|
AcpiStatus = acpi_evaluate_integer(DeviceData->AcpiHandle, "_BBN", NULL, &BusNumber);
|
||||||
|
if (AcpiStatus != AE_OK)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
if (device->flags.unique_id)
|
||||||
|
{
|
||||||
|
/* FIXME: Try the unique ID */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
BusNumber = 0;
|
||||||
|
DPRINT1("Failed to find a bus number\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DPRINT1("Using _BBN for bus number\n");
|
||||||
|
}
|
||||||
|
|
||||||
DPRINT1("Found PCI root hub: %d\n", BusNumber);
|
DPRINT1("Found PCI root hub: %d\n", BusNumber);
|
||||||
|
|
||||||
ResourceListSize = sizeof(CM_RESOURCE_LIST);
|
ResourceListSize = sizeof(CM_RESOURCE_LIST);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue