aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-05-07 14:14:03 -0500
committerDavid S. Miller <davem@davemloft.net>2020-05-11 14:00:29 -0700
commitc781e1d4f3e23d5fc138dad2fd98ca0e0dd9c592 (patch)
tree2efff94e9cd4f62b262ec387ef5dcf9b9d50315d /drivers/net/ipa
parenthinic: fix a bug of ndo_stop (diff)
downloadlinux-dev-c781e1d4f3e23d5fc138dad2fd98ca0e0dd9c592.tar.xz
linux-dev-c781e1d4f3e23d5fc138dad2fd98ca0e0dd9c592.zip
net: ipa: set DMA length in gsi_trans_cmd_add()
When a command gets added to a transaction for the AP->command channel we set the DMA address of its scatterlist entry, but not its DMA length. Fix this bug. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa')
-rw-r--r--drivers/net/ipa/gsi_trans.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ipa/gsi_trans.c b/drivers/net/ipa/gsi_trans.c
index 2fd21d75367d..bdbfeed359db 100644
--- a/drivers/net/ipa/gsi_trans.c
+++ b/drivers/net/ipa/gsi_trans.c
@@ -399,13 +399,14 @@ void gsi_trans_cmd_add(struct gsi_trans *trans, void *buf, u32 size,
/* assert(which < trans->tre_count); */
/* Set the page information for the buffer. We also need to fill in
- * the DMA address for the buffer (something dma_map_sg() normally
- * does).
+ * the DMA address and length for the buffer (something dma_map_sg()
+ * normally does).
*/
sg = &trans->sgl[which];
sg_set_buf(sg, buf, size);
sg_dma_address(sg) = addr;
+ sg_dma_len(sg) = sg->length;
info = &trans->info[which];
info->opcode = opcode;