Skip to content

Commit d09959e

Browse files
shimodaygregkh
authored andcommitted
serial: sh-sci: Fix length of scatterlist
This patch fixes an issue that the "length" of scatterlist should be set using sg_dma_len(). Otherwise, a dmaengine driver cannot work correctly if CONFIG_NEED_SG_DMA_LENGTH=y. Fixes: 7b39d90 (serial: sh-sci: Fix NULL pointer dereference if HIGHMEM is enabled) Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ac8f3bf commit d09959e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ static void sci_request_dma(struct uart_port *port)
14371437
sg_init_table(sg, 1);
14381438
s->rx_buf[i] = buf;
14391439
sg_dma_address(sg) = dma;
1440-
sg->length = s->buf_len_rx;
1440+
sg_dma_len(sg) = s->buf_len_rx;
14411441

14421442
buf += s->buf_len_rx;
14431443
dma += s->buf_len_rx;

0 commit comments

Comments
 (0)