aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2015-10-07 23:58:52 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2015-10-21 05:06:57 -0400
commit527d10ef3a315d3cb9dc098dacd61889a6c26439 (patch)
tree1951429fe0119a2065e6a60e21d68714e6fd0c2c
parent879c26d4f6a2b573d75cc235946019b6208ed6bc (diff)
powerpc/eeh: Don't unfreeze PHB PE after reset
On PowerNV platform, the PE is kept in frozen state until the PE reset is completed to avoid recursive EEH error caused by MMIO access during the period of EEH reset. The PE's frozen state is cleared after BARs of PCI device included in the PE are restored and enabled. However, we needn't clear the frozen state for PHB PE explicitly at this point as there is no real PE for PHB PE. As the PHB PE is always binding with PE#0, we actually clear PE#0, which is wrong. It doesn't incur any problem though. This checks if the PE is PHB PE and doesn't clear the frozen state if it is. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/kernel/eeh_driver.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 89eb4bc34d3a..3a626edbb319 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -587,10 +587,16 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
587 eeh_ops->configure_bridge(pe); 587 eeh_ops->configure_bridge(pe);
588 eeh_pe_restore_bars(pe); 588 eeh_pe_restore_bars(pe);
589 589
590 /* Clear frozen state */ 590 /*
591 rc = eeh_clear_pe_frozen_state(pe, false); 591 * If it's PHB PE, the frozen state on all available PEs should have
592 if (rc) 592 * been cleared by the PHB reset. Otherwise, we unfreeze the PE and its
593 return rc; 593 * child PEs because they might be in frozen state.
594 */
595 if (!(pe->type & EEH_PE_PHB)) {
596 rc = eeh_clear_pe_frozen_state(pe, false);
597 if (rc)
598 return rc;
599 }
594 600
595 /* Give the system 5 seconds to finish running the user-space 601 /* Give the system 5 seconds to finish running the user-space
596 * hotplug shutdown scripts, e.g. ifdown for ethernet. Yes, 602 * hotplug shutdown scripts, e.g. ifdown for ethernet. Yes,