From: Bjorn Helgaas <bhelgaas@google.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] PCI: Fix device node for virtual bus
Date: Tue, 11 Nov 2014 19:55:19 -0700 [thread overview]
Message-ID: <CAErSpo7mEo61GP4oxcodKWFFXaaESae96qLiR1RE0CFsahr29g@mail.gmail.com> (raw)
In-Reply-To: <1415760163-12517-1-git-send-email-gwshan@linux.vnet.ibm.com>
On Tue, Nov 11, 2014 at 7:42 PM, Gavin Shan <gwshan@linux.vnet.ibm.com> wrote:
> pci_set_bus_of_node() sets virtual PCI bus's device node to PHB's
> device node wrongly. The patch fixes the issue.
This needs more detail. How is this bug visible to users? Is there a
bug report? Is this a regression? Should it be marked for stable?
We use "virtual bus" to refer to buses created for SR-IOV VFs that are
not on the same bus as the PF. These virtual buses have no bridge
device leading to them. But I think you're talking about something
totally different. Or maybe that *is* what you're talking about,
since this patch resembles 2ba29e270e97 ("PCI: Use pci_is_root_bus()
to check for root bus").
Bjorn
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> ---
> drivers/pci/of.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/of.c b/drivers/pci/of.c
> index f092993..7b2256b 100644
> --- a/drivers/pci/of.c
> +++ b/drivers/pci/of.c
> @@ -31,9 +31,9 @@ void pci_release_of_node(struct pci_dev *dev)
>
> void pci_set_bus_of_node(struct pci_bus *bus)
> {
> - if (bus->self == NULL)
> + if (pci_is_root_bus(bus))
> bus->dev.of_node = pcibios_get_phb_of_node(bus);
> - else
> + else if (bus->self)
> bus->dev.of_node = of_node_get(bus->self->dev.of_node);
> }
>
> --
> 1.8.3.2
>
next prev parent reply other threads:[~2014-11-12 2:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 2:42 [PATCH] PCI: Fix device node for virtual bus Gavin Shan
2014-11-12 2:55 ` Bjorn Helgaas [this message]
2014-11-12 3:11 ` Gavin Shan
2014-11-12 4:08 ` Bjorn Helgaas
2014-11-12 5:24 ` Gavin Shan
2014-11-12 19:02 ` Bjorn Helgaas
2014-11-13 0:45 ` Gavin Shan
2014-11-20 23:11 ` Bjorn Helgaas
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=CAErSpo7mEo61GP4oxcodKWFFXaaESae96qLiR1RE0CFsahr29g@mail.gmail.com \
--to=bhelgaas@google.com \
--cc=gwshan@linux.vnet.ibm.com \
--cc=linux-pci@vger.kernel.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).