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>
This commit is contained in:
committed by
David S. Miller
parent
e8a1b0efd6
commit
c781e1d4f3
@@ -399,13 +399,14 @@ void gsi_trans_cmd_add(struct gsi_trans *trans, void *buf, u32 size,
|
|||||||
/* assert(which < trans->tre_count); */
|
/* assert(which < trans->tre_count); */
|
||||||
|
|
||||||
/* Set the page information for the buffer. We also need to fill in
|
/* Set the page information for the buffer. We also need to fill in
|
||||||
* the DMA address for the buffer (something dma_map_sg() normally
|
* the DMA address and length for the buffer (something dma_map_sg()
|
||||||
* does).
|
* normally does).
|
||||||
*/
|
*/
|
||||||
sg = &trans->sgl[which];
|
sg = &trans->sgl[which];
|
||||||
|
|
||||||
sg_set_buf(sg, buf, size);
|
sg_set_buf(sg, buf, size);
|
||||||
sg_dma_address(sg) = addr;
|
sg_dma_address(sg) = addr;
|
||||||
|
sg_dma_len(sg) = sg->length;
|
||||||
|
|
||||||
info = &trans->info[which];
|
info = &trans->info[which];
|
||||||
info->opcode = opcode;
|
info->opcode = opcode;
|
||||||
|
|||||||
Reference in New Issue
Block a user