qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pci: fix pci_find_bus().
@ 2010-04-09 10:13 Isaku Yamahata
  2010-04-09 23:48 ` [Qemu-devel] " Isaku Yamahata
  2010-04-11 10:46 ` [Qemu-devel] Re: [PATCH] " Michael S. Tsirkin
  0 siblings, 2 replies; 7+ messages in thread
From: Isaku Yamahata @ 2010-04-09 10:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Michael S. Tsirkin

When looking down child bus, it looked parent bridge's
bus number.
It should look child bridge's.

Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH] pci: fix pci_find_bus()
@ 2010-02-08  6:38 Isaku Yamahata
  2010-02-08 10:30 ` [Qemu-devel] " Michael S. Tsirkin
  0 siblings, 1 reply; 7+ messages in thread
From: Isaku Yamahata @ 2010-02-08  6:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Michael S. Tsirkin

typo in c021f8e65f5009a5ab5711d9d5326fcab553ef1c.
comparison fix.

Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 hw/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/pci.c b/hw/pci.c
index 9ad63dd..e91d2e6 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1558,7 +1558,7 @@ 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 */
-            || (pci_bus_num(sec) >= bus_num &&
+            || (pci_bus_num(sec) <= bus_num &&
                 bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS]) ) {
             ret = pci_find_bus(sec, bus_num);
             if (ret) {
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-04-20 17:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-09 10:13 [Qemu-devel] [PATCH] pci: fix pci_find_bus() Isaku Yamahata
2010-04-09 23:48 ` [Qemu-devel] " Isaku Yamahata
2010-04-11 10:51   ` Michael S. Tsirkin
2010-04-12  2:58     ` [Qemu-devel] [PATCH v2] " Isaku Yamahata
2010-04-20 17:19       ` [Qemu-devel] " Blue Swirl
2010-04-11 10:46 ` [Qemu-devel] Re: [PATCH] " Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2010-02-08  6:38 [Qemu-devel] " Isaku Yamahata
2010-02-08 10:30 ` [Qemu-devel] " Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).