summaryrefslogtreecommitdiffstats
path: root/src/usr/scom/scom.C
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2013-11-13 09:32:01 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-12-12 16:27:50 -0600
commit948809ead9262fe86e78e303f3e5d1a19388f7ee (patch)
treef96f47384b95e865c9a324747f687f7cc0ca8d59 /src/usr/scom/scom.C
parent07c9716fcf31ce5352ce412a643071ea89bd2ca1 (diff)
downloadtalos-hostboot-948809ead9262fe86e78e303f3e5d1a19388f7ee.tar.gz
talos-hostboot-948809ead9262fe86e78e303f3e5d1a19388f7ee.zip
IBSCOM Enablement and Error Handling
Enable IBSCOM for Centaur DD2.x chips Add appropriate error handling Flip scom to FSI after IBSCOM fail Enable reconfig loop cleanup Code verified on hardware Change-Id: I394789b900e5779dded78dd5fbcc9b9257e856fb RTC: 69115 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7410 Tested-by: Jenkins Server Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com> Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/scom/scom.C')
-rw-r--r--src/usr/scom/scom.C25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/usr/scom/scom.C b/src/usr/scom/scom.C
index 7b5ecaf27..b15f72406 100644
--- a/src/usr/scom/scom.C
+++ b/src/usr/scom/scom.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -36,12 +36,13 @@
#include <errl/errlmanager.H>
#include "scom.H"
#include <scom/scomreasoncodes.H>
+#include <ibscom/ibscomreasoncodes.H>
#include <sys/time.h>
// Trace definition
trace_desc_t* g_trac_scom = NULL;
-TRAC_INIT(&g_trac_scom, "SCOM", KILOBYTE, TRACE::BUFFER_SLOW); //1K
+TRAC_INIT(&g_trac_scom, SCOM_COMP_NAME, KILOBYTE, TRACE::BUFFER_SLOW); //1K
namespace SCOM
@@ -102,7 +103,6 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
bool l_indScomError = false;
uint64_t temp_io_buffer = 0;
- //@todo - determine hwhat an appropriate timeout value
enum { MAX_INDSCOM_TIMEOUT_NS = 100000 }; //=.1ms
// If the indirect scom bit is 0, then doing a regular scom
@@ -213,8 +213,7 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
break;
}
- //TODO tmp remove for VPO, need better polling strategy -- RTC43738
- //nanosleep( 0, 10000 ); //sleep for 10,000 ns
+ nanosleep( 0, 10000 ); //sleep for 10,000 ns
elapsed_indScom_time_ns += 10000;
}while ( elapsed_indScom_time_ns <= MAX_INDSCOM_TIMEOUT_NS);
@@ -336,8 +335,7 @@ errlHndl_t checkIndirectAndDoScom(DeviceFW::OperationType i_opType,
}
- //TODO tmp remove for VPO, need better polling strategy -- RTC43738
- //nanosleep( 0, 10000 ); //sleep for 10,000 ns
+ nanosleep( 0, 10000 ); //sleep for 10,000 ns
elapsed_indScom_time_ns += 10000;
}while ( elapsed_indScom_time_ns <= MAX_INDSCOM_TIMEOUT_NS);
@@ -464,6 +462,19 @@ errlHndl_t doScomOp(DeviceFW::OperationType i_opType,
}while(0);
+ //Look for special retry codes
+ if( l_err
+ && (0xFFFFFFFF != i_accessType)
+ && (l_err->reasonCode() == IBSCOM::IBSCOM_RETRY_DUE_TO_ERROR) )
+ {
+ delete l_err;
+ TRACFCOMP(g_trac_scom, "Forcing retry of Scom to %.16X on %.8X", i_addr, TARGETING::get_huid(i_target));
+ // use the unused i_accessType parameter to avoid an infinite recursion
+ int64_t accessType_flag = 0xFFFFFFFF;
+ l_err = doScomOp( i_opType, i_target, io_buffer,
+ io_buflen, accessType_flag, i_addr );
+ }
+
return l_err;
}
OpenPOWER on IntegriCloud