diff mbox

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

Message ID 1480450282-18860-1-git-send-email-tim.gardner@canonical.com
State New
Headers show

Commit Message

Tim Gardner Nov. 29, 2016, 8:11 p.m. UTC
From: Gavin Shan <gwshan@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@linux.vnet.ibm.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/powerpc/kernel/eeh_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Seth Forshee Dec. 1, 2016, 1:22 p.m. UTC | #1

Luis Henriques Dec. 8, 2016, 6:04 p.m. UTC | #2
Applied to xenial master-next branch.

Cheers,
--
Luís
diff mbox

Patch

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);