From: Jiang Liu <liuj97@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Yinghai Lu <yinghai@kernel.org>,
Xudong Hao <xudong.hao@intel.com>
Cc: Yijing Wang <wangyijing@huawei.com>,
linux-pci@vger.kernel.org, Jiang Liu <jiang.liu@huawei.com>
Subject: [PATCH 2/3] PCI, ACPI: Don't glue ACPI dev with pci VFs
Date: Fri, 31 May 2013 12:21:30 +0800 [thread overview]
Message-ID: <1369974092-11450-2-git-send-email-jiang.liu@huawei.com> (raw)
In-Reply-To: <1369974092-11450-1-git-send-email-jiang.liu@huawei.com>
From: Yinghai Lu <yinghai@kernel.org>
When sriov is enabled, VF could just start after PF in pci tree.
like c1:00.0 will be PF, and c1:00.1 and after will be VF.
acpi do have dev with same ADR. that will make them get glued
wrongly.
Skip that if it is virtfn.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
---
drivers/pci/pci-acpi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index e4b1fb2..720f3a2 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -321,6 +321,10 @@ static int acpi_pci_find_device(struct device *dev, acpi_handle *handle)
u64 addr;
pci_dev = to_pci_dev(dev);
+ /* don't mix vf with real pci device */
+ if (pci_dev->is_virtfn)
+ return -ENODEV;
+
/* Please ref to ACPI spec for the syntax of _ADR */
addr = (PCI_SLOT(pci_dev->devfn) << 16) | PCI_FUNC(pci_dev->devfn);
*handle = acpi_get_child(DEVICE_ACPI_HANDLE(dev->parent), addr);
--
1.8.1.2
next prev parent reply other threads:[~2013-05-31 4:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 4:21 [PATCH 1/3] PCI: set correct value for iov device before device Jiang Liu
2013-05-31 4:21 ` Jiang Liu [this message]
2013-05-31 21:40 ` [PATCH 2/3] PCI, ACPI: Don't glue ACPI dev with pci VFs Bjorn Helgaas
2013-06-04 21:48 ` Bjorn Helgaas
2013-06-04 21:57 ` Yinghai Lu
2013-06-04 22:00 ` Bjorn Helgaas
2013-06-04 22:08 ` Yinghai Lu
2013-06-04 22:44 ` Rafael J. Wysocki
2013-06-04 22:49 ` Rafael J. Wysocki
2013-06-04 22:57 ` Yinghai Lu
2013-06-04 23:51 ` Rafael J. Wysocki
2013-06-05 15:55 ` Yinghai Lu
2013-06-05 16:21 ` Bjorn Helgaas
2013-05-31 4:21 ` [PATCH 3/3] PCI: Hide remove and rescan sysfs interfaces for SR-IOV virtual functions Jiang Liu
2013-06-05 18:32 ` Bjorn Helgaas
2013-06-05 18:31 ` [PATCH 1/3] PCI: set correct value for iov device before device 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=1369974092-11450-2-git-send-email-jiang.liu@huawei.com \
--to=liuj97@gmail.com \
--cc=bhelgaas@google.com \
--cc=jiang.liu@huawei.com \
--cc=linux-pci@vger.kernel.org \
--cc=wangyijing@huawei.com \
--cc=xudong.hao@intel.com \
--cc=yinghai@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).