[PATCH Xenial SRU] UBUNTU: SAUCE: powerpc/eeh: Remove EEH_PE_PRI_BUS in full hotplug recovery

Tim Gardner tim.gardner at canonical.com
Tue Nov 29 20:11:22 UTC 2016


From: Gavin Shan <gwshan at linux.vnet.ibm.com>

BugLink: http://bugs.launchpad.net/bugs/1645826

commit 59ae8c6d5b45 ("powerpc/eeh: Fix invalid cached PE primary
bus") was wrongly backporting upstream commit a3aa256b7258: It
should clear the PE's flag (EEH_PE_PRI_BUS) in full hotplug instead
of partial hotplug scenario.

This fixes the issue by clearing EEH_PE_PRI_BUS in full hotplug
scenario only.

Fixes: 59ae8c6d5b45 ("powerpc/eeh: Fix invalid cached PE primary bus")
Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
 arch/powerpc/kernel/eeh_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index fdd6269..25d4a84 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -630,13 +630,13 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
 		 * rebuilt when adding PCI devices.
 		 */
 		eeh_pe_traverse(pe, eeh_pe_detach_dev, NULL);
+		eeh_pe_state_clear(pe, EEH_PE_PRI_BUS);
 		pcibios_add_pci_devices(bus);
 	} else if (frozen_bus && removed) {
 		pr_info("EEH: Sleep 5s ahead of partial hotplug\n");
 		ssleep(5);
 
 		eeh_pe_traverse(pe, eeh_pe_detach_dev, NULL);
-		eeh_pe_state_clear(pe, EEH_PE_PRI_BUS);
 		pcibios_add_pci_devices(frozen_bus);
 	}
 	eeh_pe_state_clear(pe, EEH_PE_KEEP);
-- 
2.7.4





More information about the kernel-team mailing list