int production_test_ss_ix_cx()

in drivers/input/touchscreen/st/fts_lib/ftsTest.c [4170:5488]


int production_test_ss_ix_cx(char *path_limits, int stop_on_fail,
			     struct TestToDo *todo)
{
	int ret;
	int count_fail = 0;

	int *thresholds = NULL;
	int trows, tcolumns;
	int *thresholds_min = NULL;
	int *thresholds_max = NULL;

	struct SelfSenseData ssCompData;
	struct TotSelfSenseData totCompData;

	u8 *adjhor = NULL;
	u8 *adjvert = NULL;

	short container;

	u16 *total_adjhor = NULL;
	u16 *total_adjvert = NULL;

	logError(0, "%s\n", TAG);
	logError(0, "%s SS IX CX testes are starting...\n", TAG);
	ret = readSelfSenseCompensationData(LOAD_CX_SS_TOUCH, &ssCompData);
	/* read the SS compensation data */
	if (ret < 0) {
		logError(1,
			 "%s production_test_data: readSelfSenseCompensationData failed... ERROR %08X\n",
			 TAG, ERROR_PROD_TEST_DATA);
		return ret | ERROR_PROD_TEST_DATA;
	}

	ret = readTotSelfSenseCompensationData(LOAD_PANEL_CX_TOT_SS_TOUCH,
					       &totCompData);
	/* read the TOT SS compensation data */
	if (ret < 0) {
		logError(1,
			 "%s production_test_data: readTotSelfSenseCompensationData failed... ERROR %08X\n",
			 TAG, ERROR_PROD_TEST_DATA);
		kfree(ssCompData.ix2_fm);
		kfree(ssCompData.ix2_sn);
		kfree(ssCompData.cx2_fm);
		kfree(ssCompData.cx2_sn);
		return ret | ERROR_PROD_TEST_DATA;
	}

	/************* SS FORCE IX **************/
	/* SS IX1 FORCE TEST */
	logError(0, "%s SS IX1 FORCE TEST:\n", TAG);
	if (todo->SelfForceIx1 == 1) {
		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_IX1_FORCE_MIN_MAX,
						&thresholds, &trows, &tcolumns);
		if (ret < 0 || (trows != 1 || tcolumns != 2)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX1_FORCE_MIN_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}
		container = (short)ssCompData.f_ix1;
		ret = checkLimitsMinMax(&container, 1, 1, thresholds[0],
					thresholds[1]);
		/* check the limits */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMinMax SS IX1 FORCE TEST failed... ERROR COUNT = %d\n",
				 TAG, ret);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS IX1 FORCE TEST:.................OK\n\n",
				 TAG);
	} else
		logError(0,
			 "%s SS IX1 FORCE TEST:.................SKIPPED\n\n",
			 TAG);

	kfree(thresholds);
	thresholds = NULL;
	/* SS IX2 FORCE TEST */
	logError(0, "%s SS IX2 FORCE MIN MAX TEST:\n", TAG);
	if (todo->SelfForceIx2 == 1) {
		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_IX2_FORCE_MAP_MIN,
						&thresholds_min, &trows,
						&tcolumns);
		/* load the min thresholds */
		if (ret < 0 || (trows != ssCompData.header.force_node ||
				tcolumns != 1)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX2_FORCE_MAP_MIN failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_IX2_FORCE_MAP_MAX,
						&thresholds_max, &trows,
						&tcolumns);
		/* load the max thresholds */
		if (ret < 0 || (trows != ssCompData.header.force_node ||
				tcolumns != 1)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX2_FORCE_MAP_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = checkLimitsMapFromU(ssCompData.ix2_fm,
					  ssCompData.header.force_node, 1,
					  thresholds_min,
					  thresholds_max);	/* check the
								 * values with
								 * thresholds
								 */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMap SS IX2 FORCE failed... ERROR COUNT = %d\n",
				 TAG, ret);
			logError(0,
				 "%s SS IX2 FORCE MIN MAX TEST:.................FAIL\n\n",
				 TAG);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS IX2 FORCE MIN MAX TEST:.................OK\n\n",
				 TAG);

		kfree(thresholds_min);
		thresholds_min = NULL;
		kfree(thresholds_max);
		thresholds_max = NULL;
	} else
		logError(0,
			 "%s SS IX2 FORCE MIN MAX TEST:.................SKIPPED\n\n",
			 TAG);

	logError(0, "%s SS IX2 FORCE ADJ TEST:\n", TAG);
	if (todo->SelfForceIx2Adj == 1) {
		/* SS IX2 FORCE ADJV TEST */
		logError(0, "%s SS IX2 FORCE ADJVERT TEST:\n", TAG);
		ret = computeAdjVertFromU(ssCompData.ix2_fm,
					  ssCompData.header.force_node, 1,
					  &adjvert);
		if (ret < 0) {
			logError(1,
				 "%s production_test_data: computeAdjVert SS IX2 FORCE ADJV failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}
		logError(0, "%s SS IX2 FORCE ADJV computed!\n", TAG);

		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_IX2_FORCE_ADJV_MAP_MAX,
						&thresholds_max, &trows,
						&tcolumns);	/* load the max
								 * thresholds
								 */
		if (ret < 0 || (trows != ssCompData.header.force_node - 1 ||
				tcolumns != 1)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX2_FORCE_ADJV_MAP_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = checkLimitsMapAdj(adjvert, ssCompData.header.force_node -
					1, 1, thresholds_max);	/* check the
								 * values with
								 * thresholds
								 */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMap SS IX2 FORCE failed... ERROR COUNT = %d\n",
				 TAG, ret);
			logError(0,
				 "%s SS IX2 FORCE ADJV TEST:.................FAIL\n\n",
				 TAG);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS IX2 FORCE ADJV TEST:.................OK\n\n",
				 TAG);

		kfree(thresholds_max);
		thresholds_max = NULL;
		kfree(adjvert);
		adjvert = NULL;
	} else
		logError(0,
			 "%s SS IX2 FORCE ADJ TEST:.................SKIPPED\n\n",
			 TAG);

	/* SS TOTAL FORCE IX */
	logError(0, "%s SS TOTAL IX FORCE TEST:\n", TAG);
	if (todo->SelfForceIxTotal == 1 || todo->SelfForceIxTotalAdj == 1) {
		logError(0, "%s SS TOTAL IX FORCE MIN MAX TEST:\n", TAG);
		if (todo->SelfForceIxTotal == 1) {
			ret = parseProductionTestLimits(path_limits,
					&limit_file, SS_TOTAL_IX_FORCE_MAP_MIN,
					&thresholds_min, &trows, &tcolumns);
						/* load the min thresholds */
			if (ret < 0 || (trows !=
					totCompData.header.force_node ||
					tcolumns != 1)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_IX_FORCE_MAP_MIN failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = parseProductionTestLimits(path_limits,
					&limit_file, SS_TOTAL_IX_FORCE_MAP_MAX,
					&thresholds_max, &trows, &tcolumns);
						/* load the max thresholds */
			if (ret < 0 || (trows !=
					totCompData.header.force_node ||
					tcolumns != 1)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_IX_FORCE_MAP_MAX failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = checkLimitsMapTotalFromU(totCompData.ix_fm,
						       totCompData.header.
						       force_node, 1,
						       thresholds_min,
						       thresholds_max);
			/* check the values with thresholds */
			if (ret != OK) {
				logError(1,
					 "%s production_test_data: checkLimitsMap  SS TOTAL IX FORCE failed... ERROR COUNT = %d\n",
					 TAG, ret);
				logError(0,
					 "%s SS TOTAL IX FORCE MIN MAX TEST:.................FAIL\n\n",
					 TAG);
				count_fail += 1;
				if (stop_on_fail)
					goto ERROR;
			} else
				logError(0,
					 "%s SS TOTAL IX FORCE MIN MAX TEST:.................OK\n\n",
					 TAG);

			kfree(thresholds_min);
			thresholds_min = NULL;
			kfree(thresholds_max);
			thresholds_max = NULL;
		} else
			logError(0,
				 "%s SS TOTAL IX FORCE MIN MAX TEST:.................SKIPPED\n",
				 TAG);

		logError(0, "%s SS TOTAL IX FORCE ADJ TEST:\n", TAG);
		if (todo->SelfForceIxTotalAdj == 1) {
			/* SS TOTAL IX FORCE ADJV TEST */
			logError(0, "%s SS TOTAL IX FORCE ADJVERT TEST:\n",
				 TAG);
			ret = computeAdjVertTotalFromU(totCompData.ix_fm,
						       totCompData.header.
						       force_node, 1,
						       &total_adjvert);
			if (ret < 0) {
				logError(1,
					 "%s production_test_data: computeAdjVert SS TOTAL IX FORCE ADJV failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}
			logError(0, "%s SS TOTAL IX FORCE ADJV computed!\n",
				 TAG);

			ret = parseProductionTestLimits(path_limits,
				&limit_file, SS_TOTAL_IX_FORCE_ADJV_MAP_MAX,
				&thresholds_max, &trows, &tcolumns);
			/* load the max thresholds */
			if (ret < 0 || (trows != totCompData.header.force_node -
					1 || tcolumns != 1)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_IX_FORCE_ADJV_MAP_MAX... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = checkLimitsMapAdjTotal(total_adjvert,
						     totCompData.header.
						     force_node - 1, 1,
						     thresholds_max);
			/* check the values with thresholds */
			if (ret != OK) {
				logError(1,
					 "%s production_test_data: checkLimitsMap SS TOTAL IX FORCE failed... ERROR COUNT = %d\n",
					 TAG, ret);
				logError(0,
					 "%s SS TOTAL IX FORCE ADJV TEST:.................FAIL\n\n",
					 TAG);
				count_fail += 1;
				if (stop_on_fail)
					goto ERROR;
			} else
				logError(0,
					 "%s SS TOTAL IX FORCE ADJV TEST:.................OK\n\n",
					 TAG);

			kfree(thresholds_max);
			thresholds_max = NULL;
			kfree(total_adjvert);
			total_adjvert = NULL;
		} else
			logError(0,
				 "%s SS TOTAL IX FORCE ADJ TEST:.................SKIPPED\n",
				 TAG);
	} else
		logError(0,
			 "%s SS TOTAL IX FORCE TEST:.................SKIPPED\n\n",
			 TAG);


	/************** SS SENSE IX **************/
	/* SS IX1 SENSE TEST */
	logError(0, "%s SS IX1 SENSE TEST:\n", TAG);
	if (todo->SelfSenseIx1 == 1) {
		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_IX1_SENSE_MIN_MAX,
						&thresholds, &trows, &tcolumns);
		if (ret < 0 || (trows != 1 || tcolumns != 2)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX1_SENSE_MIN_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		container = (short)ssCompData.s_ix1;
		ret = checkLimitsMinMax(&container, 1, 1, thresholds[0],
					thresholds[1]);
		/* check the limits */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMinMax SS IX1 SENSE TEST failed... ERROR COUNT = %d\n",
				 TAG, ret);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS IX1 SENSE TEST:.................OK\n\n",
				 TAG);
	} else
		logError(0,
			 "%s SS IX1 SENSE TEST:.................SKIPPED\n\n",
			 TAG);

	kfree(thresholds);
	thresholds = NULL;
	/* SS IX2 SENSE TEST */
	logError(0, "%s SS IX2 SENSE MIN MAX TEST:\n", TAG);
	if (todo->SelfSenseIx2 == 1) {
		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_IX2_SENSE_MAP_MIN,
						&thresholds_min, &trows,
						&tcolumns);
		/* load the min thresholds */
		if (ret < 0 || (trows != 1 || tcolumns !=
				ssCompData.header.sense_node)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX2_SENSE_MAP_MIN failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_IX2_SENSE_MAP_MAX,
						&thresholds_max, &trows,
						&tcolumns);
		/* load the max thresholds */
		if (ret < 0 || (trows != 1 || tcolumns !=
				ssCompData.header.sense_node)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX2_SENSE_MAP_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = checkLimitsMapFromU(ssCompData.ix2_sn, 1,
					  ssCompData.header.sense_node,
					  thresholds_min, thresholds_max);
		/* check the values with thresholds */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMap SS IX2 SENSE failed... ERROR COUNT = %d\n",
				 TAG, ret);
			logError(0,
				 "%s SS IX2 SENSE MIN MAX TEST:.................FAIL\n\n",
				 TAG);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS IX2 SENSE MIN MAX TEST:.................OK\n\n",
				 TAG);

		kfree(thresholds_min);
		thresholds_min = NULL;
		kfree(thresholds_max);
		thresholds_max = NULL;
	} else
		logError(0,
			 "%s SS IX2 SENSE MIN MAX TEST:.................SKIPPED\n\n",
			 TAG);

	logError(0, "%s SS IX2 SENSE ADJ TEST:\n", TAG);
	if (todo->SelfSenseIx2Adj == 1) {
		/* SS IX2 SENSE ADJH TEST */
		logError(0, "%s SS IX2 SENSE ADJHORIZ TEST:\n", TAG);
		ret = computeAdjHorizFromU(ssCompData.ix2_sn, 1,
					   ssCompData.header.sense_node,
					   &adjhor);
		if (ret < 0) {
			logError(1,
				 "%s production_test_data: computeAdjHoriz SS IX2 SENSE ADJH failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}
		logError(0, "%s SS IX2 SENSE ADJ HORIZ computed!\n", TAG);


		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_IX2_SENSE_ADJH_MAP_MAX,
						&thresholds_max, &trows,
						&tcolumns);
		/* load the max thresholds */
		if (ret < 0 || (trows != 1 || tcolumns !=
				ssCompData.header.sense_node - 1)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX2_SENSE_ADJH_MAP_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = checkLimitsMapAdj(adjhor, 1,
					ssCompData.header.sense_node - 1,
					thresholds_max);
		/* check the values with thresholds */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMapAdj SS IX2 SENSE ADJH failed... ERROR COUNT = %d\n",
				 TAG, ret);
			logError(0,
				 "%s SS IX2 SENSE ADJH TEST:.................FAIL\n\n",
				 TAG);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS IX2 SENSE ADJH TEST:.................OK\n\n",
				 TAG);

		kfree(thresholds_max);
		thresholds_max = NULL;
		kfree(adjhor);
		adjhor = NULL;
	} else
		logError(0,
			 "%s SS IX2 SENSE ADJ TEST:.................SKIPPED\n",
			 TAG);

	/* SS TOTAL IX SENSE */
	logError(0, "%s SS TOTAL IX SENSE TEST:\n", TAG);
	if (todo->SelfSenseIxTotal == 1 || todo->SelfSenseIxTotalAdj == 1) {
		logError(0, "%s SS TOTAL IX SENSE MIN MAX TEST:\n", TAG);
		if (todo->SelfSenseIxTotal == 1) {
			ret = parseProductionTestLimits(path_limits,
					&limit_file, SS_TOTAL_IX_SENSE_MAP_MIN,
					&thresholds_min, &trows, &tcolumns);
			/* load the min thresholds */
			if (ret < 0 || (trows != 1 || tcolumns !=
					totCompData.header.sense_node)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_IX_SENSE_MAP_MIN failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = parseProductionTestLimits(path_limits,
					&limit_file, SS_TOTAL_IX_SENSE_MAP_MAX,
					&thresholds_max, &trows, &tcolumns);
			/* load the max thresholds */
			if (ret < 0 || (trows != 1 || tcolumns !=
					totCompData.header.sense_node)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_IX_SENSE_MAP_MAX failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = checkLimitsMapTotalFromU(totCompData.ix_sn, 1,
						       totCompData.header.
						       sense_node,
						       thresholds_min,
						       thresholds_max);
			/* check the values with thresholds */
			if (ret != OK) {
				logError(1,
					 "%s production_test_data: checkLimitsMap SS TOTAL IX SENSE failed... ERROR COUNT = %d\n",
					 TAG, ret);
				logError(0,
					 "%s SS TOTAL IX SENSE MIN MAX TEST:.................FAIL\n\n",
					 TAG);
				count_fail += 1;
				if (stop_on_fail)
					goto ERROR;
			} else
				logError(0,
					 "%s SS TOTAL IX SENSE MIN MAX TEST:.................OK\n\n",
					 TAG);

			kfree(thresholds_min);
			thresholds_min = NULL;
			kfree(thresholds_max);
			thresholds_max = NULL;
		} else
			logError(0,
				 "%s SS TOTAL IX SENSE MIN MAX TEST:.................SKIPPED\n",
				 TAG);


		logError(0, "%s SS TOTAL IX SENSE ADJ TEST:\n", TAG);
		if (todo->SelfSenseIxTotalAdj == 1) {
			/* SS TOTAL IX SENSE ADJH TEST */
			logError(0, "%s SS TOTAL IX SENSE ADJHORIZ TEST:\n",
				 TAG);
			ret = computeAdjHorizTotalFromU(totCompData.ix_sn, 1,
							totCompData.header.
							sense_node,
							&total_adjhor);
			if (ret < 0) {
				logError(1,
					 "%s production_test_data: computeAdjHoriz SS TOTAL IX SENSE ADJH failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}
			logError(0,
				 "%s SS TOTAL IX SENSE ADJ HORIZ computed!\n",
				 TAG);


			ret = parseProductionTestLimits(path_limits,
				&limit_file, SS_TOTAL_IX_SENSE_ADJH_MAP_MAX,
				&thresholds_max, &trows, &tcolumns);
			/* load the max thresholds */
			if (ret < 0 || (trows != 1 || tcolumns !=
					totCompData.header.sense_node - 1)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_IX_SENSE_ADJH_MAP_MAX failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = checkLimitsMapAdjTotal(total_adjhor, 1,
						     totCompData.header.
						     sense_node - 1,
						     thresholds_max);
			/* check the values with thresholds */
			if (ret != OK) {
				logError(1,
					 "%s production_test_data: checkLimitsMapAdj SS TOTAL IX SENSE ADJH failed... ERROR COUNT = %d\n",
					 TAG, ret);
				logError(0,
					 "%s SS TOTAL IX SENSE ADJH TEST:.................FAIL\n\n",
					 TAG);
				count_fail += 1;
				if (stop_on_fail)
					goto ERROR;
			} else
				logError(0,
					 "%s SS TOTAL IX SENSE ADJH TEST:.................OK\n\n",
					 TAG);

			kfree(thresholds_max);
			thresholds_max = NULL;
			kfree(total_adjhor);
			total_adjhor = NULL;
		} else
			logError(0,
				 "%s SS TOTAL IX SENSE ADJ TEST:.................SKIPPED\n",
				 TAG);
	} else
		logError(0,
			 "%s SS TOTAL IX SENSE TEST:.................SKIPPED\n",
			 TAG);

	/************* SS SENSE CX **************/
	/* SS CX1 FORCE TEST */
	logError(0, "%s SS CX1 FORCE TEST:\n", TAG);
	if (todo->SelfForceCx1 == 1) {
		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_CX1_FORCE_MIN_MAX,
						&thresholds, &trows, &tcolumns);
		if (ret < 0 || (trows != 1 || tcolumns != 2)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_CX1_FORCE_MIN_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		container = (short)ssCompData.f_cx1;
		ret = checkLimitsMinMax(&container, 1, 1, thresholds[0],
					thresholds[1]);
		/* check the limits */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMinMax SS CX1 FORCE TEST failed... ERROR COUNT = %d\n",
				 TAG, ret);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS CX1 FORCE TEST:.................OK\n\n",
				 TAG);
		kfree(thresholds);
		thresholds = NULL;
	} else
		logError(0,
			 "%s SS CX1 FORCE TEST:.................SKIPPED\n\n",
			 TAG);



	/* SS CX2 FORCE TEST */
	logError(0, "%s SS CX2 FORCE MIN MAX TEST:\n", TAG);
	if (todo->SelfForceCx2 == 1) {
		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_CX2_FORCE_MAP_MIN,
						&thresholds_min, &trows,
						&tcolumns);
		/* load the min thresholds */
		if (ret < 0 || (trows != ssCompData.header.force_node ||
				tcolumns != 1)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_CX2_FORCE_MAP_MIN failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_CX2_FORCE_MAP_MAX,
						&thresholds_max, &trows,
						&tcolumns);
		/* load the max thresholds */
		if (ret < 0 || (trows != ssCompData.header.force_node ||
				tcolumns != 1)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_CX2_FORCE_MAP_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = checkLimitsMap(ssCompData.cx2_fm,
				     ssCompData.header.force_node, 1,
				     thresholds_min,
				     thresholds_max);
		/* check the values with thresholds */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMap SS CX2 FORCE failed... ERROR COUNT = %d\n",
				 TAG, ret);
			logError(0,
				 "%s SS CX2 FORCE MIN MAX TEST:.................FAIL\n\n",
				 TAG);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS CX2 FORCE MIN MAX TEST:.................OK\n\n",
				 TAG);

		kfree(thresholds_min);
		thresholds_min = NULL;
		kfree(thresholds_max);
		thresholds_max = NULL;
	} else
		logError(0,
			 "%s SS CX2 FORCE MIN MAX TEST:.................SKIPPED\n",
			 TAG);

	logError(0, "%s SS CX2 FORCE ADJ TEST:\n", TAG);
	if (todo->SelfForceCx2Adj == 1) {
		/* SS CX2 FORCE ADJV TEST */
		logError(0, "%s SS CX2 FORCE ADJVERT TEST:\n", TAG);
		ret = computeAdjVert(ssCompData.cx2_fm,
				     ssCompData.header.force_node, 1, &adjvert);
		/* compute the ADJV for CX2  FORCE */
		if (ret < 0) {
			logError(1,
				 "%s production_test_data: computeAdjVert SS CX2 FORCE ADJV failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}
		logError(0, "%s SS CX2 FORCE ADJV computed!\n", TAG);

		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_CX2_FORCE_ADJV_MAP_MAX,
						&thresholds_max, &trows,
						&tcolumns);
		/* load the max thresholds */
		if (ret < 0 || (trows != ssCompData.header.force_node - 1 ||
				tcolumns != 1)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_CX2_FORCE_ADJV_MAP_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = checkLimitsMapAdj(adjvert, ssCompData.header.force_node -
					1, 1, thresholds_max);
		/* check the values with thresholds */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMap SS IX2 FORCE failed... ERROR COUNT = %d\n",
				 TAG, ret);
			logError(0,
				 "%s SS CX2 FORCE ADJV TEST:.................FAIL\n\n",
				 TAG);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS CX2 FORCE ADJV TEST:.................OK\n\n",
				 TAG);

		kfree(thresholds_max);
		thresholds_max = NULL;
		kfree(adjvert);
		adjvert = NULL;
	} else
		logError(0,
			 "%s SS CX2 FORCE ADJ TEST:.................SKIPPED\n\n",
			 TAG);

	/* SS TOTAL CX FORCE */
	logError(0, "%s SS TOTAL CX FORCE TEST:\n", TAG);
	if (todo->SelfForceCxTotal == 1 || todo->SelfForceCxTotalAdj == 1) {
		logError(0, "%s SS TOTAL CX FORCE MIN MAX TEST:\n", TAG);
		if (todo->SelfForceCxTotal == 1) {
			ret = parseProductionTestLimits(path_limits,
					&limit_file, SS_TOTAL_CX_FORCE_MAP_MIN,
					&thresholds_min, &trows, &tcolumns);
			/* load the min thresholds */
			if (ret < 0 || (trows !=
					totCompData.header.force_node ||
					tcolumns != 1)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_CX_FORCE_MAP_MIN failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = parseProductionTestLimits(path_limits,
					&limit_file, SS_TOTAL_CX_FORCE_MAP_MAX,
					&thresholds_max, &trows, &tcolumns);
			/* load the max thresholds */
			if (ret < 0 || (trows !=
					totCompData.header.force_node ||
					tcolumns != 1)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_CX_FORCE_MAP_MAX failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = checkLimitsMapTotal(totCompData.cx_fm,
						  totCompData.header.force_node,
						  1, thresholds_min,
						  thresholds_max);
			/* check the values with thresholds */
			if (ret != OK) {
				logError(1,
					 "%s production_test_data: checkLimitsMap SS TOTAL FORCE failed... ERROR COUNT = %d\n",
					 TAG, ret);
				logError(0,
					 "%s SS TOTAL FORCE MIN MAX TEST:.................FAIL\n\n",
					 TAG);
				count_fail += 1;
				if (stop_on_fail)
					goto ERROR;
			} else
				logError(0,
					 "%s SS TOTAL FORCE MIN MAX TEST:.................OK\n\n",
					 TAG);

			kfree(thresholds_min);
			thresholds_min = NULL;
			kfree(thresholds_max);
			thresholds_max = NULL;
		} else
			logError(0,
				 "%s SS TOTAL CX FORCE MIN MAX TEST:.................SKIPPED\n",
				 TAG);

		/* SS TOTAL CX FORCE ADJV TEST */
		logError(0, "%s SS TOTAL CX FORCE ADJ TEST:\n", TAG);
		if (todo->SelfForceCxTotalAdj == 1) {
			logError(0, "%s SS TOTAL CX FORCE ADJVERT TEST:\n",
				 TAG);
			ret = computeAdjVertTotal(totCompData.cx_fm,
						  totCompData.header.force_node,
						  1, &total_adjvert);
			/* compute the ADJV for CX2  FORCE */
			if (ret < 0) {
				logError(1,
					 "%s production_test_data: computeAdjVert SS TOTAL CX FORCE ADJV failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}
			logError(0, "%s SS TOTAL CX FORCE ADJV computed!\n",
				 TAG);

			ret = parseProductionTestLimits(path_limits,
				&limit_file, SS_TOTAL_CX_FORCE_ADJV_MAP_MAX,
				&thresholds_max, &trows, &tcolumns);
			/* load the max thresholds */
			if (ret < 0 || (trows != totCompData.header.force_node -
					1 || tcolumns != 1)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_CX_FORCE_ADJV_MAP_MAX failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = checkLimitsMapAdjTotal(total_adjvert,
						     totCompData.header.
						     force_node - 1, 1,
						     thresholds_max);
			/* check the values with thresholds */
			if (ret != OK) {
				logError(1,
					 "%s production_test_data: checkLimitsMap SS TOTAL CX FORCE failed... ERROR COUNT = %d\n",
					 TAG, ret);
				logError(0,
					 "%s SS TOTAL CX FORCE ADJV TEST:.................FAIL\n\n",
					 TAG);
				count_fail += 1;
				if (stop_on_fail)
					goto ERROR;
			} else
				logError(0,
					 "%s SS TOTAL CX FORCE ADJV TEST:.................OK\n\n",
					 TAG);

			kfree(thresholds_max);
			thresholds_max = NULL;
			kfree(total_adjvert);
			total_adjvert = NULL;
		} else
			logError(0,
				 "%s SS TOTAL CX FORCE ADJ TEST:.................SKIPPED\n",
				 TAG);
	} else
		logError(0,
			 "%s SS TOTAL CX FORCE TEST:.................SKIPPED\n\n",
			 TAG);



	/************* SS SENSE CX *************/
	/* SS CX1 SENSE TEST */
	logError(0, "%s SS CX1 SENSE TEST:\n", TAG);
	if (todo->SelfSenseCx1 == 1) {
		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_CX1_SENSE_MIN_MAX,
						&thresholds, &trows, &tcolumns);
		if (ret < 0 || (trows != 1 || tcolumns != 2)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_CX1_SENSE_MIN_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		container = (short)ssCompData.s_cx1;
		ret = checkLimitsMinMax(&container, 1, 1, thresholds[0],
					thresholds[1]);
		/* check the limits */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMinMax SS CX1 SENSE TEST failed... ERROR COUNT = %d\n",
				 TAG, ret);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS CX1 SENSE TEST:.................OK\n\n",
				 TAG);
		kfree(thresholds);
		thresholds = NULL;
	} else
		logError(0,
			 "%s SS CX1 SENSE TEST:.................SKIPPED\n\n",
			 TAG);


	/* SS CX2 SENSE TEST */
	logError(0, "%s SS CX2 SENSE MIN MAX TEST:\n", TAG);
	if (todo->SelfSenseCx2 == 1) {
		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_CX2_SENSE_MAP_MIN,
						&thresholds_min, &trows,
						&tcolumns);
		/* load the min thresholds */
		if (ret < 0 || (trows != 1 || tcolumns !=
				ssCompData.header.sense_node)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_CX2_SENSE_MAP_MIN failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_CX2_SENSE_MAP_MAX,
						&thresholds_max, &trows,
						&tcolumns);
		/* load the max thresholds */
		if (ret < 0 || (trows != 1 || tcolumns !=
				ssCompData.header.sense_node)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_CX2_SENSE_MAP_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = checkLimitsMap(ssCompData.cx2_sn, 1,
				     ssCompData.header.sense_node,
				     thresholds_min, thresholds_max);
		/* check the values with thresholds */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMap SS CX2 SENSE failed... ERROR COUNT = %d\n",
				 TAG, ret);
			logError(0,
				 "%s SS CX2 SENSE MIN MAX TEST:.................FAIL\n\n",
				 TAG);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS CX2 SENSE MIN MAX TEST:.................OK\n\n",
				 TAG);

		kfree(thresholds_min);
		thresholds_min = NULL;
		kfree(thresholds_max);
		thresholds_max = NULL;
	} else
		logError(0,
			 "%s SS CX2 SENSE MIN MAX TEST:.................SKIPPED\n",
			 TAG);

	logError(0, "%s SS CX2 SENSE ADJ TEST:\n", TAG);
	if (todo->SelfSenseCx2Adj == 1) {
		/* SS CX2 SENSE ADJH TEST */
		logError(0, "%s SS CX2 SENSE ADJHORIZ TEST:\n", TAG);
		ret = computeAdjHoriz(ssCompData.cx2_sn, 1,
				      ssCompData.header.sense_node, &adjhor);
		if (ret < 0) {
			logError(1,
				 "%s production_test_data: computeAdjHoriz SS CX2 SENSE ADJH failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}
		logError(0, "%s SS CX2 SENSE ADJH computed!\n", TAG);


		ret = parseProductionTestLimits(path_limits, &limit_file,
						SS_CX2_SENSE_ADJH_MAP_MAX,
						&thresholds_max, &trows,
						&tcolumns);
		/* load the max thresholds */
		if (ret < 0 || (trows != 1 || tcolumns !=
				ssCompData.header.sense_node - 1)) {
			logError(1,
				 "%s production_test_data: parseProductionTestLimits SS_IX2_SENSE_MAP_MAX failed... ERROR %08X\n",
				 TAG, ERROR_PROD_TEST_DATA);
			ret |= ERROR_PROD_TEST_DATA;
			goto ERROR_LIMITS;
		}

		ret = checkLimitsMapAdj(adjhor, 1,
					ssCompData.header.sense_node - 1,
					thresholds_max);
		/* check the values with thresholds */
		if (ret != OK) {
			logError(1,
				 "%s production_test_data: checkLimitsMapAdj SS CX2 SENSE ADJH failed... ERROR COUNT = %d\n",
				 TAG, ret);
			logError(0,
				 "%s SS CX2 SENSE ADJH TEST:.................FAIL\n\n",
				 TAG);
			count_fail += 1;
			if (stop_on_fail)
				goto ERROR;
		} else
			logError(0,
				 "%s SS CX2 SENSE ADJH TEST:.................OK\n",
				 TAG);

		kfree(thresholds_max);
		thresholds_max = NULL;
		kfree(adjhor);
		adjhor = NULL;
	} else
		logError(0,
			 "%s SS CX2 SENSE ADJ TEST:.................SKIPPED\n\n",
			 TAG);

	/* SS TOTAL CX SENSE */
	logError(0, "%s SS TOTAL CX SENSE TEST:\n", TAG);
	if (todo->SelfSenseCxTotal == 1 || todo->SelfSenseCxTotalAdj == 1) {
		logError(0, "%s SS TOTAL CX SENSE MIN MAX TEST:\n", TAG);
		if (todo->SelfSenseCxTotal == 1) {
			ret = parseProductionTestLimits(path_limits,
					&limit_file, SS_TOTAL_CX_SENSE_MAP_MIN,
					&thresholds_min, &trows, &tcolumns);
			/* load the min thresholds */
			if (ret < 0 || (trows != 1 || tcolumns !=
					totCompData.header.sense_node)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_CX_SENSE_MAP_MIN failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = parseProductionTestLimits(path_limits,
					&limit_file, SS_TOTAL_CX_SENSE_MAP_MAX,
					&thresholds_max, &trows, &tcolumns);
			/* load the max thresholds */
			if (ret < 0 || (trows != 1 || tcolumns !=
					totCompData.header.sense_node)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_CX_SENSE_MAP_MAX failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = checkLimitsMapTotal(totCompData.cx_sn, 1,
						  totCompData.header.sense_node,
						  thresholds_min,
						  thresholds_max);
			/* check the values with thresholds */
			if (ret != OK) {
				logError(1,
					 "%s production_test_data: checkLimitsMap SS TOTAL CX SENSE failed... ERROR COUNT = %d\n",
					 TAG, ret);
				logError(0,
					 "%s SS TOTAL CX SENSE MIN MAX TEST:.................FAIL\n\n",
					 TAG);
				count_fail += 1;
				if (stop_on_fail)
					goto ERROR;
			} else
				logError(0,
					 "%s SS TOTAL CX SENSE MIN MAX TEST:.................OK\n\n",
					 TAG);

			kfree(thresholds_min);
			thresholds_min = NULL;
			kfree(thresholds_max);
			thresholds_max = NULL;
		} else
			logError(0,
				 "%s SS TOTAL CX SENSE MIN MAX TEST:.................SKIPPED\n",
				 TAG);


		/* SS TOTAL IX SENSE ADJH TEST */
		logError(0, "%s SS TOTAL CX SENSE ADJ TEST:\n", TAG);
		if (todo->SelfSenseCxTotalAdj == 1) {
			logError(0, "%s SS TOTAL CX SENSE ADJHORIZ TEST:\n",
				 TAG);
			ret = computeAdjHorizTotal(totCompData.cx_sn, 1,
					totCompData.header.sense_node,
					&total_adjhor);
			if (ret < 0) {
				logError(1,
					 "%s production_test_data: computeAdjHoriz SS TOTAL CX SENSE ADJH failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}
			logError(0,
				 "%s SS TOTAL CX SENSE ADJ HORIZ computed!\n",
				 TAG);


			ret = parseProductionTestLimits(path_limits,
				&limit_file, SS_TOTAL_CX_SENSE_ADJH_MAP_MAX,
				&thresholds_max, &trows, &tcolumns);
			/* load the max thresholds */
			if (ret < 0 || (trows != 1 || tcolumns !=
					totCompData.header.sense_node - 1)) {
				logError(1,
					 "%s production_test_data: parseProductionTestLimits SS_TOTAL_CX_SENSE_ADJH_MAP_MAX failed... ERROR %08X\n",
					 TAG, ERROR_PROD_TEST_DATA);
				ret |= ERROR_PROD_TEST_DATA;
				goto ERROR_LIMITS;
			}

			ret = checkLimitsMapAdjTotal(total_adjhor, 1,
						     totCompData.header.
						     sense_node - 1,
						     thresholds_max);
			/* check the values with thresholds */
			if (ret != OK) {
				logError(1,
					 "%s production_test_data: checkLimitsMapAdj SS TOTAL CX SENSE ADJH failed... ERROR COUNT = %d\n",
					 TAG, ret);
				logError(0,
					 "%s SS TOTAL CX SENSE ADJH TEST:.................FAIL\n\n",
					 TAG);
				count_fail += 1;
				if (stop_on_fail)
					goto ERROR;
			} else
				logError(0,
					 "%s SS TOTAL CX SENSE ADJH TEST:.................OK\n\n",
					 TAG);

			kfree(thresholds_max);
			thresholds_max = NULL;
			kfree(total_adjhor);
			total_adjhor = NULL;
		} else
			logError(0,
				 "%s SS TOTAL CX SENSE ADJ TEST:.................SKIPPED\n",
				 TAG);
	} else
		logError(0,
			 "%s SS TOTAL CX SENSE TEST:.................SKIPPED\n",
			 TAG);



ERROR:
	logError(0, "%s\n", TAG);
	if (count_fail == 0) {
		kfree(ssCompData.ix2_fm);
		ssCompData.ix2_fm = NULL;
		kfree(ssCompData.ix2_sn);
		ssCompData.ix2_sn = NULL;
		kfree(ssCompData.cx2_fm);
		ssCompData.cx2_fm = NULL;
		kfree(ssCompData.cx2_sn);
		ssCompData.cx2_sn = NULL;
		kfree(totCompData.ix_fm);
		totCompData.ix_fm = NULL;
		kfree(totCompData.ix_sn);
		totCompData.ix_sn = NULL;
		kfree(totCompData.cx_fm);
		totCompData.cx_fm = NULL;
		kfree(totCompData.cx_sn);
		totCompData.cx_sn = NULL;
		logError(0,
			 "%s SS IX CX testes finished!.................OK\n\n",
			 TAG);
		return OK;
	}
	/* print all kind of data in just one row for readability reason */
	print_frame_u8("SS Init Data Ix2_fm = ", array1dTo2d_u8(
			       ssCompData.ix2_fm,
			       ssCompData.header.force_node, 1),
		       ssCompData.header.force_node, 1);
	print_frame_i8("SS Init Data Cx2_fm = ", array1dTo2d_i8(
			       ssCompData.cx2_fm,
			       ssCompData.header.force_node, 1),
		       ssCompData.header.force_node, 1);
	print_frame_u8("SS Init Data Ix2_sn = ", array1dTo2d_u8(
			       ssCompData.ix2_sn,
			       ssCompData.header.sense_node,
			       ssCompData.header.sense_node), 1,
		       ssCompData.header.sense_node);
	print_frame_i8("SS Init Data Cx2_sn = ", array1dTo2d_i8(
			       ssCompData.cx2_sn,
			       ssCompData.header.sense_node,
			       ssCompData.header.sense_node), 1,
		       ssCompData.header.sense_node);
	print_frame_u16("TOT SS Init Data Ix_fm = ", array1dTo2d_u16(
				totCompData.ix_fm,
				totCompData.header.force_node, 1),
			totCompData.header.force_node, 1);
	print_frame_short("TOT SS Init Data Cx_fm = ",
			  array1dTo2d_short(totCompData.cx_fm,
					    totCompData.header.
					    force_node, 1),
			  totCompData.header.force_node, 1);
	print_frame_u16("TOT SS Init Data Ix_sn = ", array1dTo2d_u16(
				totCompData.ix_sn,
				totCompData.header.sense_node,
				totCompData.header.sense_node), 1,
			totCompData.header.sense_node);
	print_frame_short("TOT SS Init Data Cx_sn = ",
			  array1dTo2d_short(totCompData.cx_sn,
					    totCompData.header.
					    sense_node,
					    totCompData.header.
					    sense_node),
			  1, totCompData.header.sense_node);
	logError(0,
		 "%s SS IX CX testes finished!.................FAILED  fails_count = %d\n\n",
		 TAG, count_fail);
	if (thresholds != NULL)
		kfree(thresholds);
	if (thresholds_min != NULL)
		kfree(thresholds_min);
	if (thresholds_max != NULL)
		kfree(thresholds_max);
	if (adjhor != NULL)
		kfree(adjhor);
	if (adjvert != NULL)
		kfree(adjvert);
	if (total_adjhor != NULL)
		kfree(total_adjhor);
	if (total_adjvert != NULL)
		kfree(total_adjvert);
	if (ssCompData.ix2_fm != NULL)
		kfree(ssCompData.ix2_fm);
	if (ssCompData.ix2_sn != NULL)
		kfree(ssCompData.ix2_sn);
	if (ssCompData.cx2_fm != NULL)
		kfree(ssCompData.cx2_fm);
	if (ssCompData.cx2_sn != NULL)
		kfree(ssCompData.cx2_sn);
	if (totCompData.ix_fm != NULL)
		kfree(totCompData.ix_fm);
	if (totCompData.ix_sn != NULL)
		kfree(totCompData.ix_sn);
	if (totCompData.cx_fm != NULL)
		kfree(totCompData.cx_fm);
	if (totCompData.cx_sn != NULL)
		kfree(totCompData.cx_sn);
	return ERROR_TEST_CHECK_FAIL | ERROR_PROD_TEST_DATA;

ERROR_LIMITS:
	if (thresholds != NULL)
		kfree(thresholds);
	if (thresholds_min != NULL)
		kfree(thresholds_min);
	if (thresholds_max != NULL)
		kfree(thresholds_max);
	if (adjhor != NULL)
		kfree(adjhor);
	if (adjvert != NULL)
		kfree(adjvert);
	if (total_adjhor != NULL)
		kfree(total_adjhor);
	if (total_adjvert != NULL)
		kfree(total_adjvert);
	if (ssCompData.ix2_fm != NULL)
		kfree(ssCompData.ix2_fm);
	if (ssCompData.ix2_sn != NULL)
		kfree(ssCompData.ix2_sn);
	if (ssCompData.cx2_fm != NULL)
		kfree(ssCompData.cx2_fm);
	if (ssCompData.cx2_sn != NULL)
		kfree(ssCompData.cx2_sn);
	if (totCompData.ix_fm != NULL)
		kfree(totCompData.ix_fm);
	if (totCompData.ix_sn != NULL)
		kfree(totCompData.ix_sn);
	if (totCompData.cx_fm != NULL)
		kfree(totCompData.cx_fm);
	if (totCompData.cx_sn != NULL)
		kfree(totCompData.cx_sn);
	return ret;
}