@@ -1554,7 +1554,9 @@ PCIBus *pci_find_bus(PCIBus *bus, int bus_num)
/* try child bus */
if (!bus->parent_dev /* host pci bridge */ ||
- (bus->parent_dev->config[PCI_SECONDARY_BUS] < bus_num &&
+ (!(pci_get_word(bus->parent_dev->config + PCI_BRIDGE_CONTROL) &
+ PCI_BRIDGE_CTL_BUS_RESET) /* Don't walk the bus if it's reset. */ &&
+ bus->parent_dev->config[PCI_SECONDARY_BUS] < bus_num &&
bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS])) {
for (; bus; bus = sec) {
QLIST_FOREACH(sec, &bus->child, sibling) {