From: "Bryant G. Ly" <bryantly@linux.vnet.ibm.com>
To: bhelgaas@google.com, benh@kernel.crashing.org, paulus@samba.org,
mpe@ellerman.id.au
Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
"Bryant G. Ly" <bryantly@linux.vnet.ibm.com>,
"Juan J . Alvarez" <jjalvare@us.ibm.com>
Subject: [PATCH v1 2/3] pseries: Override pci_bus_match_virtfn_driver
Date: Mon, 18 Sep 2017 14:26:50 -0500 [thread overview]
Message-ID: <20170918192651.78404-3-bryantly@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170918192651.78404-1-bryantly@linux.vnet.ibm.com>
For Powervm SR-IOV (Pseries) enablement we dont want to match
the virtual function's device drivers since firmware
plans to load the device node in the device tree
dynamically when Novalink assigns the VF to a partition.
Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com>
Signed-off-by: Juan J. Alvarez <jjalvare@us.ibm.com>
---
arch/powerpc/platforms/pseries/pci.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 09eba5a9929a..15d5145a622d 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -58,6 +58,23 @@ void pcibios_name_device(struct pci_dev *dev)
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_name_device);
#endif
+#ifdef CONFIG_PCI_IOV
+void pci_bus_match_virtfn_driver(struct pci_dev *dev)
+{
+ /*
+ * Per PSeries SR-IOV requirement there is no need to
+ * match virtual function device driver as firmware
+ * will load the device node in the device tree dynamically.
+ * Since there is no matching of device driver there is
+ * no failure when attaching driver, therefore there is no
+ * need to remove sysfs file. Furthermore, the VF platform
+ * management still needs to exist in sysfs files to be used
+ * by management.
+ */
+ dev->is_added = 1;
+}
+#endif
+
static void __init pSeries_request_regions(void)
{
if (!isa_io_base)
--
2.11.0 (Apple Git-81)
next prev parent reply other threads:[~2017-09-18 19:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 19:26 [PATCH v1 0/3] Prepartion for SR-IOV PowerVM Enablement Bryant G. Ly
2017-09-18 19:26 ` [PATCH v1 1/3] powerpc/kernel: Split up pci_bus_add_device Bryant G. Ly
2017-09-20 5:31 ` kbuild test robot
2017-09-21 20:43 ` Bjorn Helgaas
2017-09-22 13:46 ` Bryant G. Ly
2017-09-18 19:26 ` Bryant G. Ly [this message]
2017-09-18 19:26 ` [PATCH v1 3/3] powerpc/kernel: Separate SR-IOV Calls Bryant G. Ly
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=20170918192651.78404-3-bryantly@linux.vnet.ibm.com \
--to=bryantly@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=jjalvare@us.ibm.com \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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).