Inter-revision diff: patch 2

Comparing v2 (message) to v1 (message)

--- v2
+++ v1
@@ -1,65 +1,41 @@
-This patch adds the machine dependent call for
-pcibios_bus_add_device, since the previous patch
-separated the calls out between the PowerNV and PowerVM.
-
-The difference here is that for the PowerVM environment
-we do not want match_driver set because in this environment
-we do not want the VF device drivers to load immediately, due to
-firmware loading the device node when VF device is assigned to the
-logical partition.
-
-This patch will depend on the patch linked below, which is under
-review.
-
-https://patchwork.kernel.org/patch/9882915/
+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/eeh_pseries.c | 24 ++++++++++++++++++++++++
- 1 file changed, 24 insertions(+)
+ arch/powerpc/platforms/pseries/pci.c | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
 
-diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
-index 1eef46d9cf30..ac72011a045c 100644
---- a/arch/powerpc/platforms/pseries/eeh_pseries.c
-+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
-@@ -64,6 +64,27 @@ static unsigned char slot_errbuf[RTAS_ERROR_LOG_MAX];
- static DEFINE_SPINLOCK(slot_errbuf_lock);
- static int eeh_error_buf_size;
+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
  
-+void pseries_pcibios_bus_add_device(struct pci_dev *pdev)
++#ifdef CONFIG_PCI_IOV
++void pci_bus_match_virtfn_driver(struct pci_dev *dev)
 +{
-+	struct pci_dn *pdn = pci_get_pdn(pdev);
++	/*
++	 * 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
 +
-+	if (!pdev->is_virtfn)
-+		return;
-+
-+	pdn->device_id  =  pdev->device;
-+	pdn->vendor_id  =  pdev->vendor;
-+	pdn->class_code =  pdev->class;
-+
-+	/*
-+	 * The following operations will fail if VF's sysfs files
-+	 * aren't created or its resources aren't finalized.
-+	 */
-+	eeh_add_device_early(pdn);
-+	eeh_add_device_late(pdev);
-+	eeh_sysfs_add_device(pdev);
-+	pdev->match_driver = -1;
-+}
-+
- /**
-  * pseries_eeh_init - EEH platform dependent initialization
-  *
-@@ -120,6 +141,9 @@ static int pseries_eeh_init(void)
- 	/* Set EEH probe mode */
- 	eeh_add_flag(EEH_PROBE_MODE_DEVTREE | EEH_ENABLE_IO_FOR_LOG);
- 
-+	/* Set EEH machine dependent code */
-+	ppc_md.pcibios_bus_add_device = pseries_pcibios_bus_add_device;
-+
- 	return 0;
- }
- 
+ static void __init pSeries_request_regions(void)
+ {
+ 	if (!isa_io_base)
 -- 
 2.11.0 (Apple Git-81)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help