From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] PCI: Fix device node for virtual bus
Date: Thu, 13 Nov 2014 11:45:56 +1100 [thread overview]
Message-ID: <20141113004556.GA24858@shangw> (raw)
In-Reply-To: <CAErSpo6Jx0wp7v9NAVMfj011QgXvPsuutMNHg6da_NFsTp4c5g@mail.gmail.com>
On Wed, Nov 12, 2014 at 12:02:08PM -0700, Bjorn Helgaas wrote:
>On Tue, Nov 11, 2014 at 10:24 PM, Gavin Shan <gwshan@linux.vnet.ibm.com> wrote:
>> On Tue, Nov 11, 2014 at 09:08:23PM -0700, Bjorn Helgaas wrote:
>>>On Tue, Nov 11, 2014 at 8:11 PM, Gavin Shan <gwshan@linux.vnet.ibm.com> wrote:
>>>> On Tue, Nov 11, 2014 at 07:55:19PM -0700, Bjorn Helgaas wrote:
>>>>>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?
>>>>>
>>>>
>>>> I don't have opened bug for it. I just found the problem (maybe not
>>>> a problem) when reading the code: The original implementation binds
>>>> PHB device-tree node with "virtual bus", which doesn't make sense.
>>>
>>>Does this result in something being wrong in sysfs? How is this bug
>>>visible to users?
>>>
>>
>> No, I don't think it caused anything wrong in sysfs. So I'm not sure
>> it's a real problem and need the fix. Please judge.
>
>Well, that's not really the way I work. If somebody proposes a patch,
>I expect the changelog to be an argument for why the patch is needed.
>I'm not disagreeing with your patch; I'm just trying to get you to
>provide the justification for it. I'm not an OF expert, so it's not
>obvious to me. I probably could spend some time researching it and
>convince myself, but I would rather have *you* convince me :)
>
Thank you for the detailed explaining. I'm trying to convince you.
Please drop it in case I fail :)
Basically, we have 3 types of buses with SR-IOV case inclusive:
(A) root bus leading from PHB; (B) normal bus leading from PCI
bridge; (C) virtual bus to hold SR-IOV VFs. A's device node is set
to PHB's device node and B's device node is equal to parent PCI
bridge's device node. So the device node of PCI bus is set that
one of parent device (either PHB or PCI bridge for A/B). For (C),
the bus's device node would be NULL, which is consistent with that
its parent device is NULL.
Kernel code can convert PCI bus to its corresponding device node
with function pci_bus_to_OF_node(). The code is usually unware
what type (PHB, PCI bridge or device) the device node is. With
current code, we poke the PHB device node for SR-IOV virtual buses.
and potentially wrong properties retrieved. I personally don't
think it's appropriate and it's worthy to have NULL device nodes
for those virtual buses.
>>>> Yes, I guess it should be marked for stable if you don't object.
>
>Once we know what the user-visible effect of this change is, it will
>probably be obvious whether it should be marked for stable. If it
>doesn't really fix anything, it probably should not go to stable.
>
Yep, it's not good candidate for stable.
Thanks,
Gavin
next prev parent reply other threads:[~2014-11-13 0:46 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
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 [this message]
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=20141113004556.GA24858@shangw \
--to=gwshan@linux.vnet.ibm.com \
--cc=bhelgaas@google.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).