Skip to content

Commit 6ffaa6e

Browse files
mszyprowgregkh
authored andcommitted
serial: samsung: fix maxburst parameter for DMA transactions
commit aa2f80e upstream. The best granularity of residue that DMA engine can report is in the BURST units, so the serial driver must use MAXBURST = 1 and DMA_SLAVE_BUSWIDTH_1_BYTE if it relies on exact number of bytes transferred by DMA engine. Fixes: 62c37ee ("serial: samsung: add dma reqest/release functions") Signed-off-by: Marek Szyprowski <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3269081 commit 6ffaa6e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/tty/serial/samsung.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -860,15 +860,12 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p)
860860
dma->rx_conf.direction = DMA_DEV_TO_MEM;
861861
dma->rx_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
862862
dma->rx_conf.src_addr = p->port.mapbase + S3C2410_URXH;
863-
dma->rx_conf.src_maxburst = 16;
863+
dma->rx_conf.src_maxburst = 1;
864864

865865
dma->tx_conf.direction = DMA_MEM_TO_DEV;
866866
dma->tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
867867
dma->tx_conf.dst_addr = p->port.mapbase + S3C2410_UTXH;
868-
if (dma_get_cache_alignment() >= 16)
869-
dma->tx_conf.dst_maxburst = 16;
870-
else
871-
dma->tx_conf.dst_maxburst = 1;
868+
dma->tx_conf.dst_maxburst = 1;
872869

873870
dma_cap_zero(mask);
874871
dma_cap_set(DMA_SLAVE, mask);

0 commit comments

Comments
 (0)