Commit 9ec8efe9 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

serial: imx: only count 0->1 transitions for RNG

According to tty_ioctl(4) (from man-pages 4.04) the rng member only
counts 0->1 transitions. For the other signals (DSR, CD, CTS) both edges
are supposed to be counted.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 16804d68
...@@ -887,7 +887,7 @@ static void imx_mctrl_check(struct imx_port *sport) ...@@ -887,7 +887,7 @@ static void imx_mctrl_check(struct imx_port *sport)
sport->old_status = status; sport->old_status = status;
if (changed & TIOCM_RI) if (changed & TIOCM_RI && status & TIOCM_RI)
sport->port.icount.rng++; sport->port.icount.rng++;
if (changed & TIOCM_DSR) if (changed & TIOCM_DSR)
sport->port.icount.dsr++; sport->port.icount.dsr++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment