From: Helmut Grohne Date: Mon, 4 Jun 2018 10:22:05 +0000 (+0200) Subject: serial: xuartps: fix typo in cdns_uart_startup X-Git-Tag: rel_imx_4.19.35_1.1.0~9470^2~61 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=68d12bb267da44f50167e64a95f1581cb729e5fc;p=linux.git serial: xuartps: fix typo in cdns_uart_startup The bit mask changes in commit 6e14f7c1f2c2 ("tty: xuartps: Improve startup function") doesn't do what the commit message advertises. The original behaviour was clearing the RX_DIS bit, but due to missing ~, that bit is now the only bit kept. Currently, the regression is harmless, because the previous write to the control register sets it to TXRST | RXRST. Thus the RX_DIS bit is previously cleared. The *RST bits are cleared by the hardware, so this commit does not currently change behaviour, but makes future changes less risky. Link: https://www.spinics.net/lists/linux-serial/msg23157.html Signed-off-by: Helmut Grohne Fixes: 6e14f7c1f2c2 ("tty: xuartps: Improve startup function") Reviewed-by: Sören Brinkmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 8a3e34234e98..b0d2a6c5afcb 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -829,7 +829,7 @@ static int cdns_uart_startup(struct uart_port *port) * the receiver. */ status = readl(port->membase + CDNS_UART_CR); - status &= CDNS_UART_CR_RX_DIS; + status &= ~CDNS_UART_CR_RX_DIS; status |= CDNS_UART_CR_RX_EN; writel(status, port->membase + CDNS_UART_CR);