Skip to content

Commit c781e1d

Browse files
Alex Elderdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e8a1b0e commit c781e1d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/net/ipa/gsi_trans.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,14 @@ void gsi_trans_cmd_add(struct gsi_trans *trans, void *buf, u32 size,
399399
/* assert(which < trans->tre_count); */
400400

401401
/* Set the page information for the buffer. We also need to fill in
402-
* the DMA address for the buffer (something dma_map_sg() normally
403-
* does).
402+
* the DMA address and length for the buffer (something dma_map_sg()
403+
* normally does).
404404
*/
405405
sg = &trans->sgl[which];
406406

407407
sg_set_buf(sg, buf, size);
408408
sg_dma_address(sg) = addr;
409+
sg_dma_len(sg) = sg->length;
409410

410411
info = &trans->info[which];
411412
info->opcode = opcode;

0 commit comments

Comments
 (0)