From: Lukas Wunner <lukas@wunner.de>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Russell King <linux@armlinux.org.uk>,
Lino Sanfilippo <LinoSanfilippo@gmx.de>,
Philipp Rosenberger <p.rosenberger@kunbus.com>,
Jochen Mades <jochen@mades.net>,
Su Bao Cheng <baocheng.su@siemens.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Chao Zeng <chao.zeng@siemens.com>,
linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: core: Keep mctrl register state and cached copy in sync
Date: Fri, 7 Jan 2022 09:51:58 +0100 [thread overview]
Message-ID: <20220107085158.GA8218@wunner.de> (raw)
In-Reply-To: <f3848788-822c-2125-0f2e-10f9962d11ba@kernel.org>
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
prev parent reply other threads:[~2022-01-07 8:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-02 17:52 [PATCH] serial: core: Keep mctrl register state and cached copy in sync Lukas Wunner
2022-01-07 8:23 ` Jiri Slaby
2022-01-07 8:51 ` Lukas Wunner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220107085158.GA8218@wunner.de \
--to=lukas@wunner.de \
--cc=LinoSanfilippo@gmx.de \
--cc=baocheng.su@siemens.com \
--cc=chao.zeng@siemens.com \
--cc=gregkh@linuxfoundation.org \
--cc=jan.kiszka@siemens.com \
--cc=jirislaby@kernel.org \
--cc=jochen@mades.net \
--cc=linux-serial@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=p.rosenberger@kunbus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).