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] [PATCH] pci: fix pci_find_bus().
Date: Fri, 9 Apr 2010 19:13:24 +0900 [thread overview]
Message-ID: <20100409101324.GC14603@valinux.co.jp> (raw)
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
next reply other threads:[~2010-04-09 10:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 10:13 Isaku Yamahata [this message]
2010-04-09 23:48 ` [Qemu-devel] Re: [PATCH] pci: fix pci_find_bus() 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
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=20100409101324.GC14603@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).