tty: Allow RI, DSR and CTS modem status bits in tiocmset
Allow modem status bits like RI, DSR and CTS in tiocmset. TTY drivers,
for example USB function serial driver, which talks to DCE on behalf
DTE and running in DCE are interested in these bits.
CRs-fixed: 300912
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 6556f74..b6aee25 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2515,8 +2515,11 @@
clear = ~val;
break;
}
- set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP;
- clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP;
+
+ set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP|TIOCM_CD|
+ TIOCM_RI|TIOCM_DSR|TIOCM_CTS;
+ clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2|TIOCM_LOOP|TIOCM_CD|
+ TIOCM_RI|TIOCM_DSR|TIOCM_CTS;
return tty->ops->tiocmset(tty, set, clear);
}