From e881d3f3fafc849356ecd1e3a2f3bf669476ed2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 24 Mar 2016 14:24:20 +0100 Subject: [PATCH] serial: imx: fix polarity of RI MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When in DTE mode, the bit USR2_RIIN is active low. So invert the logic accordingly. Fixes: 90ebc4838666 ("serial: imx: repair and complete handshaking") Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/imx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 66cc3d1..7cfb482 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -800,9 +800,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport) if (!(usr1 & USR2_DCDIN)) tmp |= TIOCM_CAR; - /* in DCE mode RIIN is always 0 */ - if (readl(sport->port.membase + USR2) & USR2_RIIN) - tmp |= TIOCM_RI; + if (sport->dte_mode) + if (!(readl(sport->port.membase + USR2) & USR2_RIIN)) + tmp |= TIOCM_RI; return tmp; } -- 2.7.4