lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2024120456-shrug-unsafe-7dac@gregkh>
Date: Wed, 4 Dec 2024 16:39:22 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: ondra@...ter.cz
Cc: Russell King <linux@...linux.org.uk>, Jiri Slaby <jirislaby@...nel.org>,
	Lino Sanfilippo <l.sanfilippo@...bus.com>,
	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH] serial: amba-pl011: Fix RTS handling in RS485 mode

On Sat, Nov 23, 2024 at 09:26:51PM +0100, Miroslav Ondra via B4 Relay wrote:
> From: Miroslav Ondra <ondra@...ter.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@...ter.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ