From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>, Lukas Wunner <lukas@wunner.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
vz@mleia.com, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org,
linux-serial <linux-serial@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
p.rosenberger@kunbus.com,
Lino Sanfilippo <l.sanfilippo@kunbus.com>
Subject: Re: [PATCH 5/8] dt_bindings: rs485: Correct delay values
Date: Mon, 27 Jun 2022 12:23:42 +0300 (EEST) [thread overview]
Message-ID: <9f3accf9-319-f0b-9035-9cff3c6cbf@linux.intel.com> (raw)
In-Reply-To: <c8919968-74e8-fc9d-15b4-daa28b48d8d8@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]
On Sat, 25 Jun 2022, Ilpo Järvinen wrote:
> On Thu, 23 Jun 2022, Lino Sanfilippo wrote:
>
> > On 23.06.22 at 18:29, Andy Shevchenko wrote:
> > > On Wed, Jun 22, 2022 at 05:46:56PM +0200, Lino Sanfilippo wrote:
> > >> From: Lino Sanfilippo <l.sanfilippo@kunbus.com>
> > >>
> > >> The maximum allowed delay for RTS before and RTS after send is 100 ms.
> > >> Adjust the documentation accordingly.
> > >
> > >
> > > Is it only documentation issue? If the code allows this to be set higher
> > > than 100, we may not change the documentation since this an ABI (from
> > > firmware <--> kernel perspective) we need to support old variants.
> > >
> >
> > Well currently the documentation claims that a maximum of 1000 msecs is allowed but
> > nothing actually checks the values read from device tree/ACPI and so it is possible
> > to set much higher values (note that the UART drivers dont check the delays read from
> > DT/ACPI either, the only exception I found is max310x which clamps it to 15 ms).
> >
> > We already have a maximum of 100 ms defined for RTS delays set via TIOCSRS485. To be
> > consistent with TIOCSRS485 the same limit is used for DT/ACPI values in this patch.
> >
> > I am aware that this changes the firmware/kernel ABI. But we had a similar situation when
> > the sanity checks for TIOCSRS485 were introduced
> > (see https://lore.kernel.org/all/20220410104642.32195-2-LinoSanfilippo@gmx.de/)
> > since before we did not have those limits for all drivers (some drivers clamped the
> > values itself but many did not care).
> > Furthermore 100 ms is already a very high value for RTS delays (which are usually rather
> > in usecs range). So IMHO the risk is very low to break anything when values are clamped
> > that are higher than that.
>
> Did you see this development direction (from Lukas):
>
> https://lore.kernel.org/linux-serial/20220309125908.GA9283@wunner.de/
>
> ?
>
> Effectively, he wants to making a compat threshold at 1msec and beyond
> that the input value would be interpreted as nsecs.
I was thinking this more the other day and came up with the idea of adding
SER_RS485_DELAY_RTS_NSEC and SER_RS485_DELAY_RTS_MSEC flags instead of
magic threshold and deprecate specifying those delays w/o either flag.
That way we'd not need to change behavior and we provide an easy way to
keep the delay in msec if somebody really wants (just for the sake of
getting rid of the warning).
--
i.
next prev parent reply other threads:[~2022-06-27 9:23 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 15:46 [PATCH 0/8] Fixes and cleanup for RS485 Lino Sanfilippo
2022-06-22 15:46 ` [PATCH 1/8] serial: core: only get RS485 termination gpio if supported Lino Sanfilippo
2022-06-22 17:04 ` Andy Shevchenko
2022-06-23 1:59 ` Lino Sanfilippo
2022-06-23 9:45 ` Andy Shevchenko
2022-06-23 16:08 ` Lino Sanfilippo
2022-06-23 16:32 ` Andy Shevchenko
2022-06-23 20:19 ` Lino Sanfilippo
2022-06-25 19:49 ` Lukas Wunner
2022-06-27 9:05 ` Ilpo Järvinen
2022-07-02 16:50 ` Lino Sanfilippo
2022-06-22 15:46 ` [PATCH 2/8] serial: core, 8250: set RS485 termination gpio in serial core Lino Sanfilippo
2022-06-22 17:06 ` Andy Shevchenko
2022-06-23 2:03 ` Lino Sanfilippo
2022-06-25 10:40 ` Ilpo Järvinen
2022-06-26 15:41 ` Lino Sanfilippo
2022-06-25 19:58 ` Lukas Wunner
2022-06-26 13:36 ` Lino Sanfilippo
2022-06-28 8:31 ` Ilpo Järvinen
2022-06-22 15:46 ` [PATCH 3/8] serial: core: move sanitizing of RS485 delays into own function Lino Sanfilippo
2022-06-23 16:25 ` Andy Shevchenko
2022-06-23 20:17 ` Lino Sanfilippo
2022-06-25 9:37 ` Ilpo Järvinen
2022-06-22 15:46 ` [PATCH 4/8] serial: core: sanitize RS485 delays read from device tree Lino Sanfilippo
2022-06-25 10:05 ` Ilpo Järvinen
2022-06-26 14:25 ` Lino Sanfilippo
2022-06-22 15:46 ` [PATCH 5/8] dt_bindings: rs485: Correct delay values Lino Sanfilippo
2022-06-23 16:29 ` Andy Shevchenko
2022-06-23 20:17 ` Lino Sanfilippo
2022-06-25 9:54 ` Ilpo Järvinen
2022-06-27 9:23 ` Ilpo Järvinen [this message]
2022-06-28 10:03 ` Andy Shevchenko
2022-06-29 23:50 ` Lino Sanfilippo
2022-06-22 15:46 ` [PATCH 6/8] serial: 8250_dwlib: remove redundant sanity check for RS485 flags Lino Sanfilippo
2022-06-25 10:21 ` Ilpo Järvinen
2022-06-22 15:46 ` [PATCH 7/8] serial: ar933x: Remove redundant assignment in rs485_config Lino Sanfilippo
2022-06-25 10:14 ` Ilpo Järvinen
2022-06-26 14:09 ` Lino Sanfilippo
2022-06-27 8:14 ` Ilpo Järvinen
2022-06-30 0:33 ` Lino Sanfilippo
2022-06-22 15:46 ` [PATCH 8/8] serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags Lino Sanfilippo
2022-06-25 10:18 ` Ilpo Järvinen
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=9f3accf9-319-f0b-9035-9cff3c6cbf@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=LinoSanfilippo@gmx.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--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=lukas@wunner.de \
--cc=p.rosenberger@kunbus.com \
--cc=robh+dt@kernel.org \
--cc=vz@mleia.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
Powered by JetHome