mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT
[ Upstream commit314c2b3992
] 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:1da177e4c3
("Linux-2.6.12-rc2") Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Link: https://lore.kernel.org/r/20240119104526.1221243-2-tudor.ambarus@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1eb9ab1f9f
commit
1639e9c7a3
1 changed files with 2 additions and 3 deletions
|
@ -922,11 +922,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 */
|
||||
|
|
Loading…
Reference in a new issue