diag: Fix support for resizing buffers used in reading smd data

When an oversized packet is being read from an smd
channel we resize the buffer into which the data is being
read. The current implementation does not correctly use
and reassign the resized buffer. Make modifications to correctly
reassign the resized buffer so that it can be used properly.

CRs-Fixed: 532167
Change-Id: I1031b80147c90193c358ab3c32a3c0fedae5348e
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
diff --git a/drivers/char/diag/diag_debugfs.c b/drivers/char/diag/diag_debugfs.c
index aa88b37..c4f762d 100644
--- a/drivers/char/diag/diag_debugfs.c
+++ b/drivers/char/diag/diag_debugfs.c
@@ -86,6 +86,25 @@
 		"Lpass hdlc encoding: %d\n"
 		"RIVA hdlc encoding: %d\n"
 		"Modem CMD hdlc encoding: %d\n"
+		"Modem DATA in_buf_1_size: %d\n"
+		"Modem DATA in_buf_2_size: %d\n"
+		"ADSP DATA in_buf_1_size: %d\n"
+		"ADSP DATA in_buf_2_size: %d\n"
+		"RIVA DATA in_buf_1_size: %d\n"
+		"RIVA DATA in_buf_2_size: %d\n"
+		"Modem DATA in_buf_1_raw_size: %d\n"
+		"Modem DATA in_buf_2_raw_size: %d\n"
+		"ADSP DATA in_buf_1_raw_size: %d\n"
+		"ADSP DATA in_buf_2_raw_size: %d\n"
+		"RIVA DATA in_buf_1_raw_size: %d\n"
+		"RIVA DATA in_buf_2_raw_size: %d\n"
+		"Modem CMD in_buf_1_size: %d\n"
+		"Modem CMD in_buf_1_raw_size: %d\n"
+		"Modem CNTL in_buf_1_size: %d\n"
+		"ADSP CNTL in_buf_1_size: %d\n"
+		"RIVA CNTL in_buf_1_size: %d\n"
+		"Modem DCI in_buf_1_size: %d\n"
+		"Modem DCI CMD in_buf_1_size: %d\n"
 		"logging_mode: %d\n"
 		"real_time_mode: %d\n",
 		(unsigned int)driver->smd_data[MODEM_DATA].ch,
@@ -133,6 +152,25 @@
 		driver->smd_data[LPASS_DATA].encode_hdlc,
 		driver->smd_data[WCNSS_DATA].encode_hdlc,
 		driver->smd_cmd[MODEM_DATA].encode_hdlc,
+		(unsigned int)driver->smd_data[MODEM_DATA].buf_in_1_size,
+		(unsigned int)driver->smd_data[MODEM_DATA].buf_in_2_size,
+		(unsigned int)driver->smd_data[LPASS_DATA].buf_in_1_size,
+		(unsigned int)driver->smd_data[LPASS_DATA].buf_in_2_size,
+		(unsigned int)driver->smd_data[WCNSS_DATA].buf_in_1_size,
+		(unsigned int)driver->smd_data[WCNSS_DATA].buf_in_2_size,
+		(unsigned int)driver->smd_data[MODEM_DATA].buf_in_1_raw_size,
+		(unsigned int)driver->smd_data[MODEM_DATA].buf_in_2_raw_size,
+		(unsigned int)driver->smd_data[LPASS_DATA].buf_in_1_raw_size,
+		(unsigned int)driver->smd_data[LPASS_DATA].buf_in_2_raw_size,
+		(unsigned int)driver->smd_data[WCNSS_DATA].buf_in_1_raw_size,
+		(unsigned int)driver->smd_data[WCNSS_DATA].buf_in_2_raw_size,
+		(unsigned int)driver->smd_cmd[MODEM_DATA].buf_in_1_size,
+		(unsigned int)driver->smd_cmd[MODEM_DATA].buf_in_1_raw_size,
+		(unsigned int)driver->smd_cntl[MODEM_DATA].buf_in_1_size,
+		(unsigned int)driver->smd_cntl[LPASS_DATA].buf_in_1_size,
+		(unsigned int)driver->smd_cntl[WCNSS_DATA].buf_in_1_size,
+		(unsigned int)driver->smd_dci[MODEM_DATA].buf_in_1_size,
+		(unsigned int)driver->smd_dci_cmd[MODEM_DATA].buf_in_1_size,
 		driver->logging_mode,
 		driver->real_time_mode);