Merge "ipa: Fix the collection of packets context on crash"
diff --git a/drivers/platform/msm/ipa/ipa_v3/dump/ipa4.5/ipa_reg_dump.c b/drivers/platform/msm/ipa/ipa_v3/dump/ipa4.5/ipa_reg_dump.c
index 28b4359..f38bd47 100644
--- a/drivers/platform/msm/ipa/ipa_v3/dump/ipa4.5/ipa_reg_dump.c
+++ b/drivers/platform/msm/ipa/ipa_v3/dump/ipa4.5/ipa_reg_dump.c
@@ -1309,10 +1309,11 @@
* IPA_CTX_ID register space
*/
if (io->read == act_read) {
- memcpy((void *)ipa_reg_save.pkt_ctntx,
- (const void *)
- (ipa3_ctx->reg_collection_base + ofst),
- sizeof(ipa_reg_save.pkt_ctntx));
+ for (i = 0; i < IPA_HW_PKT_CTNTX_MAX; i++) {
+ memcpy((void *)(&(ipa_reg_save.pkt_ctntx[i])),
+ (void*)(ipa3_ctx->reg_collection_base + HWIO_IPA_CTX_ID_m_CTX_NUM_n_ADDR(i, 0)),
+ sizeof(ipa_reg_save.pkt_ctntx[0]));
+ }
for_cfg.value =
IPA_READ_SCALER_REG(IPA_RSRC_MNGR_DB_CFG);
diff --git a/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.0/ipa_pkt_cntxt.h b/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.0/ipa_pkt_cntxt.h
index f54d59e..535ec6c 100644
--- a/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.0/ipa_pkt_cntxt.h
+++ b/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.0/ipa_pkt_cntxt.h
@@ -248,7 +248,9 @@
u64 ulso_mss : 16; /* Word 16 Bits 48-63 */
u64 maci_calculated_lsbs : 64; /* Word 17 Bits 0-63 */
u64 maci_calculated_msbs : 64; /* Word 18 Bits 0-63 */
- u64 padding_bytes_cnt : 16; /* Word 19 Bits 0-16 */
+ u64 padding_bytes_cnt : 16; /* Word 19 Bits 0-15 */
+ u64 not_used8 : 48; /* Word 19 Bits 16-63 */
+
} __packed;
#endif /* #if !defined(_IPA_PKT_CNTXT_H_) */
diff --git a/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.0/ipa_reg_dump.c b/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.0/ipa_reg_dump.c
index 28b4359..f38bd47 100644
--- a/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.0/ipa_reg_dump.c
+++ b/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.0/ipa_reg_dump.c
@@ -1309,10 +1309,11 @@
* IPA_CTX_ID register space
*/
if (io->read == act_read) {
- memcpy((void *)ipa_reg_save.pkt_ctntx,
- (const void *)
- (ipa3_ctx->reg_collection_base + ofst),
- sizeof(ipa_reg_save.pkt_ctntx));
+ for (i = 0; i < IPA_HW_PKT_CTNTX_MAX; i++) {
+ memcpy((void *)(&(ipa_reg_save.pkt_ctntx[i])),
+ (void*)(ipa3_ctx->reg_collection_base + HWIO_IPA_CTX_ID_m_CTX_NUM_n_ADDR(i, 0)),
+ sizeof(ipa_reg_save.pkt_ctntx[0]));
+ }
for_cfg.value =
IPA_READ_SCALER_REG(IPA_RSRC_MNGR_DB_CFG);
diff --git a/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.5/ipa_reg_dump.c b/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.5/ipa_reg_dump.c
index 55ff42e..17e60ae 100644
--- a/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.5/ipa_reg_dump.c
+++ b/drivers/platform/msm/ipa/ipa_v3/dump/ipa5.5/ipa_reg_dump.c
@@ -1206,10 +1206,11 @@
* IPA_CTX_ID register space
*/
if (io->read == act_read) {
- memcpy((void *)ipa_reg_save.pkt_ctntx,
- (const void *)
- (ipa3_ctx->reg_collection_base + ofst),
- sizeof(ipa_reg_save.pkt_ctntx));
+ for (i = 0; i < IPA_HW_PKT_CTNTX_MAX; i++) {
+ memcpy((void *)(&(ipa_reg_save.pkt_ctntx[i])),
+ (void*)(ipa3_ctx->reg_collection_base + HWIO_IPA_CTX_ID_m_CTX_NUM_n_ADDR(i, 0)),
+ sizeof(ipa_reg_save.pkt_ctntx[0]));
+ }
for_cfg.value =
IPA_READ_SCALER_REG(IPA_RSRC_MNGR_DB_CFG);