From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Jiri Slaby <jslaby@suse.cz>, LiangCheng Wang <zaq14760@gmail.com>
Cc: shawnguo@kernel.org, s.hauer@pengutronix.de,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
kernel@pengutronix.de, festevam@gmail.com,
u.kleine-koenig@pengutronix.de, cniedermaier@dh-electronics.com,
l.sanfilippo@kunbus.com, linux@rasmusvillemoes.dk,
stefan.eichenberger@toradex.com, tglx@linutronix.de,
rickaran@axis.com, LKML <linux-kernel@vger.kernel.org>,
linux-serial <linux-serial@vger.kernel.org>,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] drivers: tty: imx: fix flags of rs485 not work properly
Date: Fri, 20 Sep 2024 18:58:21 +0300 (EEST) [thread overview]
Message-ID: <f09c546e-4f0c-81a0-8acf-24f4e5d29229@linux.intel.com> (raw)
In-Reply-To: <7a31001d-da37-4deb-a366-084a4027bcd2@suse.cz>
On Fri, 6 Sep 2024, Jiri Slaby wrote:
> It seems gmail refuses to send this to zaq14760@gmail.com (the author).
>
> On 06. 09. 24, 4:19, LiangCheng Wang wrote:
> > The rs485.flags are lost in functions such as imx_uart_stop_tx(),
> > causing the function of RS485 to be invalid when using the
> > serial port as the RS485 port. Use a variable to store the state to
> > avoid this issue.
>
> AFAICT, this feels rather wrong. Any rs485 experts around?
It is wrong. The patch makes no sense at all and prevents
reconfiguring/setting rs485 from userspace.
> At minimum, how are the flags "lost" and why this does not matter to other
> drivers?
Perhaps some userspace program is altering rs485 settings, definitely
nothing in imx_uart_stop_tx() writes to it. I'm skeptical it would be a
problem in the kernel, especially given the patch that is supposed to
"avoid the issue" (whatever the issue is).
> > --- a/drivers/tty/serial/imx.c
> > +++ b/drivers/tty/serial/imx.c
> > @@ -209,7 +209,7 @@ struct imx_port {
> > const struct imx_uart_data *devdata;
> > struct mctrl_gpios *gpios;
> > -
> > + int flags;
>
> Definitely not int for flags.
Driver is not supposed to duplicate the rs485 flags at all.
--
i.
next prev parent reply other threads:[~2024-09-20 15:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 2:19 [PATCH 1/1] drivers: tty: imx: fix flags of rs485 not work properly LiangCheng Wang
2024-09-06 6:03 ` Jiri Slaby
2024-09-20 15:58 ` Ilpo Järvinen [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-09-05 6:20 LiangCheng Wang
2024-09-05 11:03 ` Fabio Estevam
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=f09c546e-4f0c-81a0-8acf-24f4e5d29229@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=cniedermaier@dh-electronics.com \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=jslaby@suse.cz \
--cc=kernel@pengutronix.de \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=rickaran@axis.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stefan.eichenberger@toradex.com \
--cc=tglx@linutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
--cc=zaq14760@gmail.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