[PCI]
authorCameron Gutman <aicommander@gmail.com>
Sat, 1 May 2010 01:52:47 +0000 (01:52 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sat, 1 May 2010 01:52:47 +0000 (01:52 +0000)
- Store correct bus and slot information in resource lists that we give in response to IRP_MN_QUERY_RESOURCES and IRP_MN_QUERY_RESOURCE_REQUIREMENTS
- Fixes bug 4354

svn path=/trunk/; revision=47068

reactos/drivers/bus/pci/pdo.c

index 266b95d..e5961fb 100644 (file)
@@ -413,8 +413,8 @@ PdoQueryResourceRequirements(
   RtlZeroMemory(ResourceList, ListSize);
   ResourceList->ListSize = ListSize;
   ResourceList->InterfaceType = PCIBus;
-  ResourceList->BusNumber = 0;
-  ResourceList->SlotNumber = 0;
+  ResourceList->BusNumber = DeviceExtension->PciDevice->BusNumber;
+  ResourceList->SlotNumber = DeviceExtension->PciDevice->SlotNumber.u.AsULONG;
   ResourceList->AlternativeLists = 1;
 
   ResourceList->List[0].Version = 1;
@@ -717,7 +717,7 @@ PdoQueryResources(
   RtlZeroMemory(ResourceList, ListSize);
   ResourceList->Count = 1;
   ResourceList->List[0].InterfaceType = PCIBus;
-  ResourceList->List[0].BusNumber = 0;
+  ResourceList->List[0].BusNumber = DeviceExtension->PciDevice->BusNumber;
 
   PartialList = &ResourceList->List[0].PartialResourceList;
   PartialList->Version = 1;