Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "serial: imx: initialized DMA w/o HW flow enabled"

This reverts commit 068500e08dc87ea9a453cc4a500cf3ab28d0f936.

According to some tests, SDMA support is broken at least for i.MX6 without
HW flow control. Different forms of data-corruption appear either with
the ROM firmware for the SDMA controller as well as when loading Freescale
provided SDMA firmware versions 1.1 or 3.1.

Signed-off-by: David Jander <david@protonic.nl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

David Jander and committed by
Greg Kroah-Hartman
907eda32 dec273ec

+7 -8
+7 -8
drivers/tty/serial/imx.c
··· 1121 1121 1122 1122 writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); 1123 1123 1124 - /* Can we enable the DMA support? */ 1125 - if (is_imx6q_uart(sport) && !uart_console(port) && 1126 - !sport->dma_is_inited) 1127 - imx_uart_dma_init(sport); 1128 - 1129 1124 spin_lock_irqsave(&sport->port.lock, flags); 1130 1125 /* Reset fifo's and state machines */ 1131 1126 i = 100; ··· 1137 1142 */ 1138 1143 writel(USR1_RTSD, sport->port.membase + USR1); 1139 1144 writel(USR2_ORE, sport->port.membase + USR2); 1140 - 1141 - if (sport->dma_is_inited && !sport->dma_is_enabled) 1142 - imx_enable_dma(sport); 1143 1145 1144 1146 temp = readl(sport->port.membase + UCR1); 1145 1147 temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN; ··· 1308 1316 } else { 1309 1317 ucr2 |= UCR2_CTSC; 1310 1318 } 1319 + 1320 + /* Can we enable the DMA support? */ 1321 + if (is_imx6q_uart(sport) && !uart_console(port) 1322 + && !sport->dma_is_inited) 1323 + imx_uart_dma_init(sport); 1311 1324 } else { 1312 1325 termios->c_cflag &= ~CRTSCTS; 1313 1326 } ··· 1429 1432 if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) 1430 1433 imx_enable_ms(&sport->port); 1431 1434 1435 + if (sport->dma_is_inited && !sport->dma_is_enabled) 1436 + imx_enable_dma(sport); 1432 1437 spin_unlock_irqrestore(&sport->port.lock, flags); 1433 1438 } 1434 1439