diff options
author | Johan Hovold <johan@kernel.org> | 2017-11-03 15:30:58 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-28 16:03:35 +0100 |
commit | cda64188ca918fcddc8c6e89bbee5a38b029117a (patch) | |
tree | 89aaae796b9c24dab36f17cfe6f71b678f86f878 /drivers/tty/serdev | |
parent | serdev: ttyport: release tty lock sooner on open (diff) | |
download | linux-cda64188ca918fcddc8c6e89bbee5a38b029117a.tar.xz linux-cda64188ca918fcddc8c6e89bbee5a38b029117a.zip |
serdev: ttyport: ignore carrier detect to avoid hangups
Serdev currently does not support hangups so make sure to set CLOCAL to
prevent loss of carrier from triggering one.
Note however that not all tty drivers honour CLOCAL.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serdev')
-rw-r--r-- | drivers/tty/serdev/serdev-ttyport.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c index f76a8e044e4e..75f312ed96e8 100644 --- a/drivers/tty/serdev/serdev-ttyport.c +++ b/drivers/tty/serdev/serdev-ttyport.c @@ -115,6 +115,8 @@ static int ttyport_open(struct serdev_controller *ctrl) ktermios.c_cflag &= ~(CSIZE | PARENB); ktermios.c_cflag |= CS8; ktermios.c_cflag |= CRTSCTS; + /* Hangups are not supported so make sure to ignore carrier detect. */ + ktermios.c_cflag |= CLOCAL; tty_set_termios(tty, &ktermios); set_bit(SERPORT_ACTIVE, &serport->flags); |