powerpc/eeh: powerpc/eeh: Support error recovery for VF PE
PFs are enumerated on PCI bus, while VFs are created by PF's driver. In EEH recovery, it has two cases: 1. Device and driver is EEH aware, error handlers are called. 2. Device and driver is not EEH aware, un-plug the device and plug it again by enumerating it. The special thing happens on the second case. For a PF, we could use the original pci core to enumerate the bus, while for VF we need to record the VFs which aer un-plugged then plug it again. Also The patch caches the VF index in pci_dn, which can be used to calculate VF's bus, device and function number. Those information helps to locate the VF's PCI device instance when doing hotplug during EEH recovery if necessary. 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>
This commit is contained in:

committed by
Michael Ellerman

parent
0dc2830e0a
commit
67086e32b5
@@ -140,9 +140,11 @@ struct eeh_dev {
|
||||
int af_cap; /* Saved AF capability */
|
||||
struct eeh_pe *pe; /* Associated PE */
|
||||
struct list_head list; /* Form link list in the PE */
|
||||
struct list_head rmv_list; /* Record the removed edevs */
|
||||
struct pci_controller *phb; /* Associated PHB */
|
||||
struct pci_dn *pdn; /* Associated PCI device node */
|
||||
struct pci_dev *pdev; /* Associated PCI device */
|
||||
bool in_error; /* Error flag for edev */
|
||||
struct pci_dev *physfn; /* Associated SRIOV PF */
|
||||
struct pci_bus *bus; /* PCI bus for partial hotplug */
|
||||
};
|
||||
|
Reference in New Issue
Block a user