All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: linux-serial@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH] Revert "serial: max310x: rework RX interrupt handling"
Date: Thu, 18 Feb 2021 06:55:53 +0300	[thread overview]
Message-ID: <20210218065553.864bbf0cc2b3d398504c5b95@mail.ru> (raw)
In-Reply-To: <20210217235345.7326201b@windsurf.home>

On Wed, 17 Feb 2021 23:53:45 +0100
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

Hello.

> > This reverts commit fce3c5c1a2d9cd888f2987662ce17c0c651916b2.
> > 
> > FIFO is triggered 4 intervals after receiving a byte, it's good
> > when we don't care about the time of reception, but are only
> > interested in the presence of any activity on the line.
> > Unfortunately, this method is not suitable for all tasks,
> > for example, the RS-485 protocol will not work properly,
> > since the state machine must track the request-response time
> > and after the timeout expires, a decision is made that the device
> > on the line is not responding.
> > 
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> 
> Thanks for the feedback. Should we switch between one mode and the
> other depending on whether RS232 or RS485 is used ? Or is there some
> appropriate user-space interface to ask the UART driver to tweak this
> kind of configuration ?

I wrote a little inaccurately, I did not mean a physical interface RS-485,
but rather a time-critical MODBUS protocol. (In our case it used on top on RS-485).

I do not know how best to solve this problem, it may be an additional parameter
for the devicetree, but in this case it is not clear how to manage it if the
devicetree is not used ...
This could be a Kconfig item (but something's not very good either).
Probably the best solution is to adapt some kind of IOCTL (or control via SYSFS).

In any case i feel free to test your modifications to the driver.

Thanks!
-- 
Alexander Shiyan <shc_work@mail.ru>

  reply	other threads:[~2021-02-18  3:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17  8:06 [PATCH] Revert "serial: max310x: rework RX interrupt handling" Alexander Shiyan
2021-02-17 22:53 ` Thomas Petazzoni
2021-02-18  3:55   ` Alexander Shiyan [this message]
2021-02-18  6:51     ` Thomas Petazzoni
2021-02-18  7:11       ` Greg Kroah-Hartman
2021-02-18  7:20         ` Thomas Petazzoni
2021-02-18  8:07           ` Greg Kroah-Hartman

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=20210218065553.864bbf0cc2b3d398504c5b95@mail.ru \
    --to=shc_work@mail.ru \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.