[Feature][T106_eSDK]update from T106-V2.01.01.02P56U06.AP.15.11_CAP.15.11.01 to T106-V2.01.01.02P56U06.AP.17.02_CAP.17.02.02 -- code

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: Ib96b45ce27a9cc1e8e774c42334dfb86aa0da634
diff --git a/upstream/linux-5.10/kernel/ramdump/ramdump_device_trans.c b/upstream/linux-5.10/kernel/ramdump/ramdump_device_trans.c
index 40c920d..f3e91e9 100755
--- a/upstream/linux-5.10/kernel/ramdump/ramdump_device_trans.c
+++ b/upstream/linux-5.10/kernel/ramdump/ramdump_device_trans.c
@@ -620,6 +620,8 @@
 	/* interactive begin */
 	if(ramdump_device_init() < 0)
 		return;
+
+	ramdump_device_write_logbuf();
 	data_trans_max = RAMDUMP_SHARED_MEM_LEN - roundup(sizeof(ramdump_shmem_t), RAMDUMP_SHMEM_ALIGN_SIZE) - RAMDUMP_COMPRESS_OUT_LEN;
 	cap_to_server_msg.cmd = RAMDUMP_PC_INTERACTIVE_REQ;
 	ramdump_oss_data_trans_write((unsigned char*)(&cap_to_server_msg), sizeof(cap_to_server_msg));
@@ -635,8 +637,8 @@
 				ramdump_trans_server_interactive_req *server_to_cap_msg = (ramdump_trans_server_interactive_req *)req_buf;
 				/* data from server to cap */
 				ramdump_file_num = server_to_cap_msg->file_num;
-				ramdump_device_fp.file_num  = ramdump_file_num;
-				ramdump_spinand_fp.file_num = ramdump_file_num;
+				ramdump_device_fp.file_num  += ramdump_file_num;
+				ramdump_spinand_fp.file_num += ramdump_file_num;
 
 				/* data from cap to server */
 				cap_to_server_msg.cmd = RAMDUMP_PC_FILE_INFO_READ_REQ;
@@ -732,7 +734,6 @@
 			}
 			case RAMDUMP_TRANS_SERVER_FILE_TRANS_DONE_RSP:
 			{
-				ramdump_device_write_logbuf();
 				ramdump_device_close();
 				return;
 			}