From b73a685a798436691749352f14a893c54d503cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 15 Sep 2006 09:09:18 +0000 Subject: [PATCH] Assume bus number #0 if not specified in resource list svn path=/trunk/; revision=24129 --- reactos/drivers/bus/pci/fdo.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reactos/drivers/bus/pci/fdo.c b/reactos/drivers/bus/pci/fdo.c index 7daa2e7661b..bf86f69ee3f 100644 --- a/reactos/drivers/bus/pci/fdo.c +++ b/reactos/drivers/bus/pci/fdo.c @@ -370,6 +370,14 @@ FdoStartDevice( DPRINT("No allocated resources sent to driver\n"); return STATUS_INSUFFICIENT_RESOURCES; } + /* HACK due to a bug in ACPI driver, which doesn't report the bus number */ + if (AllocatedResources->Count == 0) + { + DPRINT1("No bus number resource found (bug in acpi.sys?), assuming bus number #0\n"); + DeviceExtension->BusNumber = 0; + goto next; + } + /* END HACK */ if (AllocatedResources->Count < 1) { DPRINT("Not enough allocated resources sent to driver\n"); @@ -405,6 +413,7 @@ FdoStartDevice( return STATUS_INSUFFICIENT_RESOURCES; } +next: InitializeListHead(&DeviceExtension->DeviceListHead); KeInitializeSpinLock(&DeviceExtension->DeviceListLock); DeviceExtension->DeviceListCount = 0;