From 436ab65e026ae1260b7e7cab905a23096bf7e1e5 Mon Sep 17 00:00:00 2001
From: veega2022 <zhuweijia@huawei.com>
Date: Wed, 10 May 2023 17:39:59 +0800
Subject: [PATCH 01/18] fix hikptool rciep rsp filed error problem

union hikp_space_rsp 0xF8h is reserved and 0xFCh is cpl_status

Signed-off-by: hesiyuan <hesiyuan4@huawei.com>
---
 libhikptdev/src/rciep/hikpt_rciep.c | 2 +-
 libhikptdev/src/rciep/hikpt_rciep.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libhikptdev/src/rciep/hikpt_rciep.c b/libhikptdev/src/rciep/hikpt_rciep.c
index 9b7a82a..5c7e82f 100644
--- a/libhikptdev/src/rciep/hikpt_rciep.c
+++ b/libhikptdev/src/rciep/hikpt_rciep.c
@@ -97,7 +97,7 @@ static uint32_t hikp_wait_for_cpl_status(void)
 	uint32_t status;
 
 	do {
-		status = g_hikp_req->field.cpl_status;
+		status = g_hikp_rsp->field.cpl_status;
 		if (status != HIKP_INIT_STAT)
 			return status;
 		count--;
diff --git a/libhikptdev/src/rciep/hikpt_rciep.h b/libhikptdev/src/rciep/hikpt_rciep.h
index 093724a..8fbb3c0 100644
--- a/libhikptdev/src/rciep/hikpt_rciep.h
+++ b/libhikptdev/src/rciep/hikpt_rciep.h
@@ -75,8 +75,8 @@ union hikp_space_rsp {
 		uint32_t version; /* 000h */
 		uint32_t rsp_para_num; /* 004h */
 		uint32_t data[HIKP_RSP_DATA_MAX]; /* 008h */
-		uint32_t cpl_status; /* 0F8h */
-		uint32_t pid_record; /* 0FCh */
+		uint32_t rsv; /* 0F8h */
+		uint32_t cpl_status; /* 0FCh */
 		struct iep_doorbell sw_db; /* 100h. Fixed and unmodifiable */
 	} field;
 
-- 
2.25.1

