Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alex Elder and committed by
David S. Miller
c781e1d4 e8a1b0ef

+3 -2
+3 -2
drivers/net/ipa/gsi_trans.c
··· 399 399 /* assert(which < trans->tre_count); */ 400 400 401 401 /* 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). 404 404 */ 405 405 sg = &trans->sgl[which]; 406 406 407 407 sg_set_buf(sg, buf, size); 408 408 sg_dma_address(sg) = addr; 409 + sg_dma_len(sg) = sg->length; 409 410 410 411 info = &trans->info[which]; 411 412 info->opcode = opcode;