[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] pci: fix pci_find_bus().
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH] pci: fix pci_find_bus(). |
Date: |
Fri, 9 Apr 2010 19:13:24 +0900 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
When looking down child bus, it looked parent bridge's
bus number.
It should look child bridge's.
Cc: Blue Swirl <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/pci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 0dbca17..2f6907b 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1557,9 +1557,9 @@ PCIBus *pci_find_bus(PCIBus *bus, int bus_num)
/* try child bus */
QLIST_FOREACH(sec, &bus->child, sibling) {
- if (!bus->parent_dev /* pci host bridge */
+ if (!sec->parent_dev /* pci host bridge */
|| (pci_bus_num(sec) <= bus_num &&
- bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS]) ) {
+ bus_num <= sec->parent_dev->config[PCI_SUBORDINATE_BUS]) ) {
ret = pci_find_bus(sec, bus_num);
if (ret) {
return ret;
--
1.6.6.1