From 6dc98524f3673a1c49bffcc738a7a7c09af7c989 Mon Sep 17 00:00:00 2001 From: Caleb Palmer Date: Fri, 12 Oct 2018 15:41:57 -0500 Subject: Reconfig loop only when setting bad bits not clearing Change-Id: Ieb487b6587ff957d371c8049208f1368ab5d6c24 CQ: SW448578 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67447 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Brian J. Stegmiller Reviewed-by: Zane C. Shelley --- src/usr/fapi2/attribute_service.C | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/usr') diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C index b43f151aa..f729bab87 100644 --- a/src/usr/fapi2/attribute_service.C +++ b/src/usr/fapi2/attribute_service.C @@ -1604,11 +1604,19 @@ ReturnCode fapiAttrSetBadDqBitmap( // Loop through all DQs for (uint8_t j = 0; j < mss::BAD_DQ_BYTE_COUNT; j++) { - if ( l_tmpData[i][j] != l_prev_data[i][j] ) + // Loop through all bits + for ( uint8_t k = 0; k < mss::BITS_PER_BYTE; k++ ) { - badDqSet = true; - break; + uint8_t prevBit = (l_prev_data[i][j] >> k) & 0x01; + uint8_t newBit = (l_tmpData[i][j] >> k) & 0x01; + // Check for differences, and the bit was set, not cleared + if ( (prevBit != newBit) && (newBit != 0) ) + { + badDqSet = true; + break; + } } + if ( badDqSet ) break; } if ( badDqSet ) break; } -- cgit v1.2.1