Patch "serial: apbuart: fix console prompt on qemu" 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

    serial: apbuart: fix console prompt on qemu

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:
     serial-apbuart-fix-console-prompt-on-qemu.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 6ad23666d6e3d78562d15d1b3be3b897446651b6
Author: Sam Ravnborg <sam@xxxxxxxxxxxx>
Date:   Tue Dec 26 13:16:07 2023 +0100

    serial: apbuart: fix console prompt on qemu
    
    [ Upstream commit c6dcd8050fb7c2efec6946ae9c49bc186b0a7475 ]
    
    When using a leon kernel with qemu there where no console prompt.
    The root cause is the handling of the fifo size in the tx part of the
    apbuart driver.
    
    The qemu uart driver only have a very rudimentary status handling and do
    not report the number of chars queued in the tx fifo in the status register.
    So the driver ends up with a fifo size of 1.
    
    In the tx path the fifo size is divided by 2 - resulting in a fifo
    size of zero.
    
    The original implementation would always try to send one char, but
    after the introduction of uart_port_tx_limited() the fifo size is
    respected even for the first char.
    
    There seems to be no good reason to divide the fifo size with two - so
    remove this. It looks like something copied from the original amba driver.
    
    With qemu we now have a minimum fifo size of one char, so we show
    the prompt.
    
    Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
    Fixes: d11cc8c3c4b6 ("tty: serial: use uart_port_tx_limited()")
    Cc: Andreas Larsson <andreas@xxxxxxxxxxx>
    Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Cc: Jiri Slaby <jirislaby@xxxxxxxxxx>
    Cc:  <linux-serial@xxxxxxxxxxxxxxx>
    Cc:  <sparclinux@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231226121607.GA2622970@xxxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
index d7658f380838..d3cb341f2c55 100644
--- a/drivers/tty/serial/apbuart.c
+++ b/drivers/tty/serial/apbuart.c
@@ -122,7 +122,7 @@ static void apbuart_tx_chars(struct uart_port *port)
 {
 	u8 ch;
 
-	uart_port_tx_limited(port, ch, port->fifosize >> 1,
+	uart_port_tx_limited(port, ch, port->fifosize,
 		true,
 		UART_PUT_CHAR(port, ch),
 		({}));




[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