From: Isaku Yamahata <yamahata@valinux.co.jp>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] Re: [PATCH] pci: fix pci_find_bus().
Date: Sat, 10 Apr 2010 08:48:35 +0900 [thread overview]
Message-ID: <20100409234835.GA1232@valinux.co.jp> (raw)
In-Reply-To: <20100409101324.GC14603@valinux.co.jp>
Oh I sent out the wrong one. This is the correct one.
Sorry for noise.
>From 370c23c837070f78ca5715f032eacbf6747d42fb Mon Sep 17 00:00:00 2001
Message-Id: <370c23c837070f78ca5715f032eacbf6747d42fb.1270856742.git.yamahata@valinux.co.jp>
In-Reply-To: <cover.1270856742.git.yamahata@valinux.co.jp>
References: <cover.1270856742.git.yamahata@valinux.co.jp>
From: Isaku Yamahata <yamahata@valinux.co.jp>
Date: Fri, 9 Apr 2010 19:09:35 +0900
Subject: [PATCH] pci: fix pci_find_bus().
When looking down child bus, it should look parent bridge's
bus number, not child bus'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 | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 0dbca17..b6e6bbe 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1556,10 +1556,10 @@ 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 &&
- bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS]) ) {
+ if (!bus->parent_dev /* pci host bridge */
+ || (pci_bus_num(bus) <= bus_num &&
+ bus_num <= bus->parent_dev->config[PCI_SUBORDINATE_BUS])) {
+ QLIST_FOREACH(sec, &bus->child, sibling) {
ret = pci_find_bus(sec, bus_num);
if (ret) {
return ret;
--
1.6.6.1
--
yamahata
next prev parent reply other threads:[~2010-04-09 23:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 10:13 [Qemu-devel] [PATCH] pci: fix pci_find_bus() Isaku Yamahata
2010-04-09 23:48 ` Isaku Yamahata [this message]
2010-04-11 10:51 ` [Qemu-devel] " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100409234835.GA1232@valinux.co.jp \
--to=yamahata@valinux.co.jp \
--cc=blauwirbel@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).