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]
Date:   Thu, 2 Nov 2023 14:20:30 +0530
From:   Vignesh Raghavendra <vigneshr@...com>
To:     Ronald Wahl <rwahl@....de>, <linux-kernel@...r.kernel.org>,
        <linux-serial@...r.kernel.org>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Ronald Wahl <ronald.wahl@...itan.com>, <stable@...r.kernel.org>
Subject: Re: [PATCH v4] serial: 8250: 8250_omap: Do not start RX DMA on THRI
 interrupt



On 01/11/23 22:44, Ronald Wahl wrote:
> From: Ronald Wahl <ronald.wahl@...itan.com>
> 
> Starting RX DMA on THRI interrupt is too early because TX may not have
> finished yet.
> 
> This change is inspired by commit 90b8596ac460 ("serial: 8250: Prevent
> starting up DMA Rx on THRI interrupt") and fixes DMA issues I had with
> an AM62 SoC that is using the 8250 OMAP variant.
> 
> Cc: stable@...r.kernel.org
> Fixes: c26389f998a8 ("serial: 8250: 8250_omap: Add DMA support for UARTs on K3 SoCs")
> Signed-off-by: Ronald Wahl <ronald.wahl@...itan.com>
> ---
> V4: - add missing braces to fix build warning
> 
> V3: - add Cc: stable@...r.kernel.org
> 
> V2: - add Fixes: tag
>     - fix author
> 
>  drivers/tty/serial/8250/8250_omap.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
> index c7ab2963040b..1122f37fe744 100644
> --- a/drivers/tty/serial/8250/8250_omap.c
> +++ b/drivers/tty/serial/8250/8250_omap.c
> @@ -1282,10 +1282,12 @@ static int omap_8250_dma_handle_irq(struct uart_port *port)
> 
>  	status = serial_port_in(port, UART_LSR);
> 
> -	if (priv->habit & UART_HAS_EFR2)
> -		am654_8250_handle_rx_dma(up, iir, status);
> -	else
> -		status = omap_8250_handle_rx_dma(up, iir, status);
> +	if ((iir & 0x3f) != UART_IIR_THRI) {
> +		if (priv->habit & UART_HAS_EFR2)
> +			am654_8250_handle_rx_dma(up, iir, status);
> +		else
> +			status = omap_8250_handle_rx_dma(up, iir, status);
> +	}

Reviewed-by: Vignesh Raghavendra <vigneshr@...com>

Thanks for the fix!

> 
>  	serial8250_modem_status(up);
>  	if (status & UART_LSR_THRE && up->dma->tx_err) {
> --
> 2.41.0
> 

-- 
Regards
Vignesh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ