Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: ondra@faster.cz
Cc: Russell King <linux@armlinux.org.uk>,
	Jiri Slaby <jirislaby@kernel.org>,
	Lino Sanfilippo <l.sanfilippo@kunbus.com>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: amba-pl011: Fix RTS handling in RS485 mode
Date: Wed, 4 Dec 2024 16:39:22 +0100	[thread overview]
Message-ID: <2024120456-shrug-unsafe-7dac@gregkh> (raw)
In-Reply-To: <20241123-master-v1-1-260194426ea3@faster.cz>

On Sat, Nov 23, 2024 at 09:26:51PM +0100, Miroslav Ondra via B4 Relay wrote:
> From: Miroslav Ondra <ondra@faster.cz>
> 
> Use hrtimer instead of udelay and mdelay calls in interrupt
> handler to support shared interrupt lines.
> Replace simple bool variable rs485_tx_started by 4-state
> variable rs485_tx_state.

This says what you are doing, not _what_ you are doing.  Please fix this
up.

> 
> Signed-off-by: Miroslav Ondra <ondra@faster.cz>
> ---
> Data loss on serial line was observed during communication through
> serial ports ttyAMA1 and ttyAMA2 interconnected via RS485 transcievers.
> Both ports are in one BCM2711 (Compute Module CM40) and they share 
> the same interrupt line.
> 
> The problem is caused by long waiting for tx queue flush in the function
> pl011_rs485_tx_stop. Udelay or mdelay are used to wait.
> The function is called from the interrupt handler. If multiple devices
> share a single interrupt line, late processing of pending interrupts
> and data loss may occur. When operation of both devices are synchronous,
> collisions are quite often.
> 
> This rework is based on the method used in tty/serial/imx.c
> Use hrtimer instead of udelay and mdelay calls.
> Replace simple bool variable rs485_tx_started by 4-state variable
> rs485_tx_state.

This info is great, why not put this in the changelog text instead?

thanks,

greg k-h

      reply	other threads:[~2024-12-04 15:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-23 20:26 [PATCH] serial: amba-pl011: Fix RTS handling in RS485 mode Miroslav Ondra via B4 Relay
2024-12-04 15:39 ` Greg Kroah-Hartman [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=2024120456-shrug-unsafe-7dac@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=l.sanfilippo@kunbus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ondra@faster.cz \
    /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