Skip to content

Commit 5b91ae5

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 <m.szyprowski@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 41bdf97 commit 5b91ae5

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

drivers/tty/serial/samsung.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -866,15 +866,12 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p)
866866
dma->rx_conf.direction = DMA_DEV_TO_MEM;
867867
dma->rx_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
868868
dma->rx_conf.src_addr = p->port.mapbase + S3C2410_URXH;
869-
dma->rx_conf.src_maxburst = 16;
869+
dma->rx_conf.src_maxburst = 1;
870870

871871
dma->tx_conf.direction = DMA_MEM_TO_DEV;
872872
dma->tx_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
873873
dma->tx_conf.dst_addr = p->port.mapbase + S3C2410_UTXH;
874-
if (dma_get_cache_alignment() >= 16)
875-
dma->tx_conf.dst_maxburst = 16;
876-
else
877-
dma->tx_conf.dst_maxburst = 1;
874+
dma->tx_conf.dst_maxburst = 1;
878875

879876
dma_cap_zero(mask);
880877
dma_cap_set(DMA_SLAVE, mask);

0 commit comments

Comments
 (0)