powerpc/eeh: Keep PE during hotplug
When we do normal hotplug, the PE (shadow EEH structure) shouldn't be kept around. However, we need to keep it if the hotplug an artifial one caused by EEH errors recovery. Since we remove EEH device through the PCI hook pcibios_release_device(), the flag "purge_pe" passed to various functions is meaningless. So the patch removes the meaningless flag and introduce new flag "EEH_PE_KEEP" to save the PE while doing hotplug during EEH error recovery. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
c7b51bce63
commit
807a827d4e
@@ -362,8 +362,10 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
|
||||
* devices are expected to be attached soon when calling
|
||||
* into pcibios_add_pci_devices().
|
||||
*/
|
||||
if (bus)
|
||||
__pcibios_remove_pci_devices(bus, 0);
|
||||
if (bus) {
|
||||
eeh_pe_state_mark(pe, EEH_PE_KEEP);
|
||||
pcibios_remove_pci_devices(bus);
|
||||
}
|
||||
|
||||
/* Reset the pci controller. (Asserts RST#; resets config space).
|
||||
* Reconfigure bridges and devices. Don't try to bring the system
|
||||
@@ -386,6 +388,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
|
||||
if (bus) {
|
||||
ssleep(5);
|
||||
pcibios_add_pci_devices(bus);
|
||||
eeh_pe_state_clear(pe, EEH_PE_KEEP);
|
||||
}
|
||||
|
||||
pe->tstamp = tstamp;
|
||||
|
Reference in New Issue
Block a user