Skip to content

Commit

Permalink
serial: 8250_pxa: Configure tx_loadsz to match FIFO IRQ level
Browse files Browse the repository at this point in the history
commit 5208e7c upstream.

The FIFO is 64 bytes, but the FCR is configured to fire the TX interrupt
when the FIFO is half empty (bit 3 = 0). Thus, we should only write 32
bytes when a TX interrupt occurs.

This fixes a problem observed on the PXA168 that dropped a bunch of TX
bytes during large transmissions.

Fixes: ab28f51 ("serial: rewrite pxa2xx-uart to use 8250_core")
Signed-off-by: Doug Brown <doug@schmorgal.com>
Link: https://lore.kernel.org/r/20240519191929.122202-1-doug@schmorgal.com
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
dougg3 authored and gregkh committed Jul 5, 2024
1 parent 33eae51 commit 0047568
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/tty/serial/8250/8250_pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ static int serial_pxa_probe(struct platform_device *pdev)
uart.port.regshift = 2;
uart.port.irq = irq;
uart.port.fifosize = 64;
uart.tx_loadsz = 32;
uart.port.flags = UPF_IOREMAP | UPF_SKIP_TEST | UPF_FIXED_TYPE;
uart.port.dev = &pdev->dev;
uart.port.uartclk = clk_get_rate(data->clk);
Expand Down

0 comments on commit 0047568

Please sign in to comment.