[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPLW+4kxTUUTrXWOtoBvMFHa+cyRBba_JvLNuKny-rsStbgmSg@mail.gmail.com>
Date: Fri, 19 Jan 2024 10:27:21 -0600
From: Sam Protsenko <semen.protsenko@...aro.org>
To: Tudor Ambarus <tudor.ambarus@...aro.org>
Cc: gregkh@...uxfoundation.org, jirislaby@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
alim.akhtar@...sung.com, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-samsung-soc@...r.kernel.org,
andre.draszik@...aro.org, kernel-team@...roid.com, peter.griffin@...aro.org,
willmcvicker@...gle.com
Subject: Re: [PATCH v2 01/19] tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT
On Fri, Jan 19, 2024 at 4:45 AM Tudor Ambarus <tudor.ambarus@...aroorg> wrote:
>
> The core expects for tx_empty() either TIOCSER_TEMT when the tx is
> empty or 0 otherwise. s3c24xx_serial_txempty_nofifo() might return
> 0x4, and at least uart_get_lsr_info() tries to clear exactly
> TIOCSER_TEMT (BIT(1)). Fix tx_empty() to return TIOCSER_TEMT.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Tudor Ambarus <tudor.ambarus@...aro.org>
> ---
Reviewed-by: Sam Protsenko <semen.protsenko@...aro.org>
> drivers/tty/serial/samsung_tty.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> index 71d17d804fda..6fdb32b83346 100644
> --- a/drivers/tty/serial/samsung_tty.c
> +++ b/drivers/tty/serial/samsung_tty.c
> @@ -987,11 +987,10 @@ static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port)
> if ((ufstat & info->tx_fifomask) != 0 ||
> (ufstat & info->tx_fifofull))
> return 0;
> -
> - return 1;
> + return TIOCSER_TEMT;
> }
>
> - return s3c24xx_serial_txempty_nofifo(port);
> + return s3c24xx_serial_txempty_nofifo(port) ? TIOCSER_TEMT : 0;
> }
>
> /* no modem control lines */
> --
> 2.43.0.429.g432eaa2c6b-goog
>
Powered by blists - more mailing lists