Skip to content

Commit 40f79e2

Browse files
Thomas-fouriergregkh
authored andcommitted
pch_uart: Fix dma_sync_sg_for_device() nents value
commit 6c0e9f0 upstream. The dma_sync_sg_for_device() functions should be called with the same nents as the dma_map_sg(), not the value the map function returned according to the documentation in Documentation/core-api/dma-api.rst:450: With the sync_sg API, all the parameters must be the same as those passed into the sg mapping API. Fixes: da3564e ("pch_uart: add multi-scatter processing") Cc: stable <[email protected]> Signed-off-by: Thomas Fourier <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9ecfed9 commit 40f79e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/pch_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
954954
__func__);
955955
return 0;
956956
}
957-
dma_sync_sg_for_device(port->dev, priv->sg_tx_p, nent, DMA_TO_DEVICE);
957+
dma_sync_sg_for_device(port->dev, priv->sg_tx_p, num, DMA_TO_DEVICE);
958958
priv->desc_tx = desc;
959959
desc->callback = pch_dma_tx_complete;
960960
desc->callback_param = priv;

0 commit comments

Comments
 (0)