Skip to content

Commit 3ee82c6

Browse files
jhovoldgregkh
authored andcommitted
serial: imx: fix overrun interrupts in DMA mode
Commit 76821e2 ("serial: imx: ensure that RX irqs are off if RX is off") accidentally enabled overrun interrupts unconditionally when deferring DMA enable until after the receiver has been enabled during startup. Fix this by using the DMA-initialised instead of DMA-enabled flag to determine whether overrun interrupts should be enabled. Note that overrun interrupts are already accounted for in imx_uart_clear_rx_errors() when using DMA since commit 41d98b5 ("serial: imx-serial - update RX error counters when DMA is used"). Fixes: 76821e2 ("serial: imx: ensure that RX irqs are off if RX is off") Cc: [email protected] # 4.17 Cc: Uwe Kleine-König <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0e4deb5 commit 3ee82c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ static int imx_uart_startup(struct uart_port *port)
14481448
imx_uart_writel(sport, ucr1, UCR1);
14491449

14501450
ucr4 = imx_uart_readl(sport, UCR4) & ~(UCR4_OREN | UCR4_INVR);
1451-
if (!sport->dma_is_enabled)
1451+
if (!dma_is_inited)
14521452
ucr4 |= UCR4_OREN;
14531453
if (sport->inverted_rx)
14541454
ucr4 |= UCR4_INVR;

0 commit comments

Comments
 (0)