* Don't try to check devices that are obviously not on PCI anymore.
* Fix a warning about pci_address::segment potentially being used uninitialized. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41760 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -462,6 +462,7 @@ ensure_all_functions_matched(pci_module_info* pci, uint8 bus,
|
|||||||
== PCI_header_type_PCI_to_PCI_bridge) {
|
== PCI_header_type_PCI_to_PCI_bridge) {
|
||||||
|
|
||||||
pci_address pciAddress;
|
pci_address pciAddress;
|
||||||
|
pciAddress.segment = 0;
|
||||||
pciAddress.bus = bus;
|
pciAddress.bus = bus;
|
||||||
pciAddress.device = device;
|
pciAddress.device = device;
|
||||||
pciAddress.function = function;
|
pciAddress.function = function;
|
||||||
@@ -579,6 +580,13 @@ read_irq_routing_table_recursive(acpi_module_info* acpi, pci_module_info* pci,
|
|||||||
pciAddress.function = 0;
|
pciAddress.function = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pciAddress.device >= kMaxPCIDeviceCount
|
||||||
|
|| pciAddress.function >= kMaxPCIFunctionCount) {
|
||||||
|
// we don't seem to be on the PCI bus anymore
|
||||||
|
// (just a different type of device)
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
uint8 headerType = pci->read_pci_config(pciAddress.bus,
|
uint8 headerType = pci->read_pci_config(pciAddress.bus,
|
||||||
pciAddress.device, pciAddress.function, PCI_header_type, 1);
|
pciAddress.device, pciAddress.function, PCI_header_type, 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user