All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ns16550: do not override fifo size if explicitly set
@ 2021-08-13 18:31 Marek Marczykowski-Górecki
  2021-08-13 18:31 ` [PATCH 2/2] ns16550: add Exar dual PCIe UART card support Marek Marczykowski-Górecki
  2021-08-16  7:42 ` [PATCH 1/2] ns16550: do not override fifo size if explicitly set Jan Beulich
  0 siblings, 2 replies; 9+ messages in thread
From: Marek Marczykowski-Górecki @ 2021-08-13 18:31 UTC (permalink / raw)
  To: xen-devel
  Cc: Marek Marczykowski-Górecki, Andrew Cooper, George Dunlap,
	Ian Jackson, Jan Beulich, Julien Grall, Stefano Stabellini,
	Wei Liu

If fifo size is already set via uart_params, do not force it to 16 - which
may not match the actual hardware. Specifically Exar cards have fifo of
256 bytes.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 xen/drivers/char/ns16550.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 16a73d0c0e47..97b85b0225cc 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -357,7 +357,8 @@ static void __init ns16550_init_preirq(struct serial_port *port)
     ns16550_setup_preirq(uart);
 
     /* Check this really is a 16550+. Otherwise we have no FIFOs. */
-    if ( ((ns_read_reg(uart, UART_IIR) & 0xc0) == 0xc0) &&
+    if ( uart->fifo_size <= 1 &&
+         ((ns_read_reg(uart, UART_IIR) & 0xc0) == 0xc0) &&
          ((ns_read_reg(uart, UART_FCR) & UART_FCR_TRG14) == UART_FCR_TRG14) )
         uart->fifo_size = 16;
 }
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-16 23:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 18:31 [PATCH 1/2] ns16550: do not override fifo size if explicitly set Marek Marczykowski-Górecki
2021-08-13 18:31 ` [PATCH 2/2] ns16550: add Exar dual PCIe UART card support Marek Marczykowski-Górecki
2021-08-16  7:55   ` Jan Beulich
2021-08-16  8:39     ` Marek Marczykowski-Górecki
2021-08-16  9:18       ` Jan Beulich
2021-08-16 10:25         ` Marek Marczykowski-Górecki
2021-08-16 12:18           ` Jan Beulich
2021-08-16 23:33             ` Marek Marczykowski-Górecki
2021-08-16  7:42 ` [PATCH 1/2] ns16550: do not override fifo size if explicitly set Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.