On Fri, Jan 07, 2022 at 09:23:17AM +0100, Jiri Slaby wrote: > On 02. 01. 22, 18:52, Lukas Wunner wrote: > > --- a/drivers/tty/serial/serial_core.c > > +++ b/drivers/tty/serial/serial_core.c > > @@ -2389,7 +2389,8 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state, > > * We probably don't need a spinlock around this, but > > One line above, it states: > --- keep the DTR setting that is set in uart_set_options() Yes: * Ensure that the modem control lines are de-activated. * keep the DTR setting that is set in uart_set_options() In other words, clear all bits in port->mctrl except DTR (if it's been set before by uart_set_options()). That's what the code below is supposed to achieve: > > */ > > spin_lock_irqsave(&port->lock, flags); > > - port->ops->set_mctrl(port, port->mctrl & TIOCM_DTR); > > + port->mctrl &= TIOCM_DTR; > > + port->ops->set_mctrl(port, port->mctrl); > > So I don't think this is correct -- either the comment is wrong now or the > code... Why do you think so? I don't quite follow. Thanks, Lukas