aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/eeh_pseries.c
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2014-04-24 04:00:23 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-04-28 03:34:48 -0400
commit26833a5029b710b12f00607fa255ce86909836ad (patch)
tree5cb9346366dd79cbf15de078b503fec369229428 /arch/powerpc/platforms/pseries/eeh_pseries.c
parentfd5cee7ce8f488768f918e73231d4859a520eb33 (diff)
powerpc/eeh: Make the delay for PE reset unified
Basically, we have 3 types of resets to fulfil PE reset: fundamental, hot and PHB reset. For the later 2 cases, we need PCI bus reset hold and settlement delay as specified by PCI spec. PowerNV and pSeries platforms are running on top of different firmware and some of the delays have been covered by underly firmware (PowerNV). The patch makes the delays unified to be done in backend, instead of EEH core. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh_pseries.c')
-rw-r--r--arch/powerpc/platforms/pseries/eeh_pseries.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index 2f1ba64fc831..0bec0c02c5e7 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -532,11 +532,19 @@ static int pseries_eeh_reset(struct eeh_pe *pe, int option)
532 /* If fundamental-reset not supported, try hot-reset */ 532 /* If fundamental-reset not supported, try hot-reset */
533 if (option == EEH_RESET_FUNDAMENTAL && 533 if (option == EEH_RESET_FUNDAMENTAL &&
534 ret == -8) { 534 ret == -8) {
535 option = EEH_RESET_HOT;
535 ret = rtas_call(ibm_set_slot_reset, 4, 1, NULL, 536 ret = rtas_call(ibm_set_slot_reset, 4, 1, NULL,
536 config_addr, BUID_HI(pe->phb->buid), 537 config_addr, BUID_HI(pe->phb->buid),
537 BUID_LO(pe->phb->buid), EEH_RESET_HOT); 538 BUID_LO(pe->phb->buid), option);
538 } 539 }
539 540
541 /* We need reset hold or settlement delay */
542 if (option == EEH_RESET_FUNDAMENTAL ||
543 option == EEH_RESET_HOT)
544 msleep(EEH_PE_RST_HOLD_TIME);
545 else
546 msleep(EEH_PE_RST_SETTLE_TIME);
547
540 return ret; 548 return ret;
541} 549}
542 550