Patch "tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tty-serial-samsung-fix-tx_empty-to-return-tiocser_te.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 18b998deb9f821d0ac9dceac74bbed60494af6ac
Author: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>
Date:   Fri Jan 19 10:45:08 2024 +0000

    tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT
    
    [ Upstream commit 314c2b399288f0058a8c5b6683292cbde5f1531b ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Sam Protsenko <semen.protsenko@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240119104526.1221243-2-tudor.ambarus@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 07fb8a9dac633..5a4d88e134715 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -990,11 +990,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 */




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux