net: ipa: assign proper packet context base
authorAlex Elder <elder@linaro.org>
Wed, 28 Oct 2020 19:41:44 +0000 (14:41 -0500)
committerJakub Kicinski <kuba@kernel.org>
Sat, 31 Oct 2020 00:19:58 +0000 (17:19 -0700)
At the end of ipa_mem_setup() we write the local packet processing
context base register to tell it where the processing context memory
is.  But we are writing the wrong value.

The value written turns out to be the offset of the modem header
memory region (assigned earlier in the function).  Fix this bug.

Tested-by: Sujit Kautkar <sujitka@chromium.org>
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/ipa_mem.c

index 2d45c444a67fa0983ed292397dec520d0e0af25f..ecfd1f91fce3bc96f457bce0ead86e80ed860ddf 100644 (file)
@@ -89,7 +89,7 @@ int ipa_mem_setup(struct ipa *ipa)
        gsi_trans_commit_wait(trans);
 
        /* Tell the hardware where the processing context area is located */
-       iowrite32(ipa->mem_offset + offset,
+       iowrite32(ipa->mem_offset + ipa->mem[IPA_MEM_MODEM_PROC_CTX].offset,
                  ipa->reg_virt + IPA_REG_LOCAL_PKT_PROC_CNTXT_BASE_OFFSET);
 
        return 0;