diff options
author | Wei Yang <weiyang@linux.vnet.ibm.com> | 2016-03-04 00:53:08 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-03-08 23:58:19 +0100 |
commit | c29fa27d26e3189009ba42786f0c0dce14a90940 (patch) | |
tree | b27eb383418a45732c4c9b7203bc59d3ccae18b2 /arch/powerpc/platforms/powernv/eeh-powernv.c | |
parent | powerpc/eeh: EEH device for VF (diff) | |
download | linux-c29fa27d26e3189009ba42786f0c0dce14a90940.tar.xz linux-c29fa27d26e3189009ba42786f0c0dce14a90940.zip |
powerpc/eeh: Create PE for VFs
This creates PEs for VFs in the weak function pcibios_bus_add_device().
Those PEs for VFs are identified with newly introduced flag EEH_PE_VF
so that we treat them differently during EEH recovery.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to '')
-rw-r--r-- | arch/powerpc/platforms/powernv/eeh-powernv.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c index 811917219bf1..830526e72cce 100644 --- a/arch/powerpc/platforms/powernv/eeh-powernv.c +++ b/arch/powerpc/platforms/powernv/eeh-powernv.c @@ -1503,6 +1503,22 @@ static struct eeh_ops pnv_eeh_ops = { .restore_config = pnv_eeh_restore_config }; +void pcibios_bus_add_device(struct pci_dev *pdev) +{ + struct pci_dn *pdn = pci_get_pdn(pdev); + + if (!pdev->is_virtfn) + return; + + /* + * 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); +} + /** * eeh_powernv_init - Register platform dependent EEH operations * |