Skip to content

Commit

Permalink
MDIA: Add Wrapper to HWP calls
Browse files Browse the repository at this point in the history
Change-Id: Idc2bbb0b99a85980d3832e96f0e0fff058e5bdac
CQ: SW381290
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36964
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
cnpalmer authored and dcrowell77 committed Feb 27, 2017
1 parent 7989df3 commit 6ffa45c
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/usr/diag/mdia/mdiasm.C
Expand Up @@ -505,9 +505,7 @@ void StateMachine::processCommandTimeout(const MonitorIDs & i_monitorIDs)
else
{
fapi2::Target<fapi2::TARGET_TYPE_MCBIST> fapiMcbist(target);
fapi2::ReturnCode fapirc = memdiags::stop(fapiMcbist);

err = fapi2::rcToErrl(fapirc);
FAPI_INVOKE_HWP( err, memdiags::stop, fapiMcbist );

if ( nullptr != err )
{
Expand Down Expand Up @@ -934,8 +932,6 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)

do
{
fapi2::ReturnCode fapirc;

// new command...use the full range
//target type is MBA
if (TYPE_MBA == trgtType)
Expand Down Expand Up @@ -1078,8 +1074,8 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
{
case START_RANDOM_PATTERN:

fapirc = memdiags::sf_init(fapiMcbist,
mss::mcbist::PATTERN_RANDOM);
FAPI_INVOKE_HWP( err, memdiags::sf_init, fapiMcbist,
mss::mcbist::PATTERN_RANDOM );
MDIA_FAST("sm: random init %p on: %x", fapiMcbist,
get_huid(target));
break;
Expand All @@ -1098,7 +1094,8 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
stopCond.set_pause_on_nce_hard(mss::ON);
}

fapirc = memdiags::sf_read(fapiMcbist, stopCond);
FAPI_INVOKE_HWP( err, memdiags::sf_read, fapiMcbist,
stopCond );
MDIA_FAST("sm: scrub %p on: %x", fapiMcbist,
get_huid(target));
break;
Expand All @@ -1112,7 +1109,8 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
case START_PATTERN_6:
case START_PATTERN_7:

fapirc = memdiags::sf_init(fapiMcbist, workItem);
FAPI_INVOKE_HWP( err, memdiags::sf_init, fapiMcbist,
workItem );
MDIA_FAST("sm: init %p on: %x", fapiMcbist,
get_huid(target));
break;
Expand All @@ -1122,7 +1120,6 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
workItem, get_huid(target));
break;
}
err = fapi2::rcToErrl(fapirc);
if( nullptr != err )
{
MDIA_FAST("sm: Running Maint Cmd failed");
Expand Down Expand Up @@ -1340,8 +1337,7 @@ bool StateMachine::processMaintCommandEvent(const MaintCommandEvent & i_event)
MDIA_FAST("sm: stopping command: %p", target);

fapi2::Target<fapi2::TARGET_TYPE_MCBIST> fapiMcbist(target);
fapi2::ReturnCode fapirc = memdiags::stop(fapiMcbist);
err = fapi2::rcToErrl(fapirc);
FAPI_INVOKE_HWP( err, memdiags::stop, fapiMcbist );

if(nullptr != err)
{
Expand Down

0 comments on commit 6ffa45c

Please sign in to comment.