All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] ns16550: reject IRQ above nr_irqs_gsi
@ 2022-05-10 15:58 Marek Marczykowski-Górecki
  2022-05-10 15:58 ` [PATCH v3 2/2] ns16550: Add more device IDs for Intel LPSS UART Marek Marczykowski-Górecki
  2022-05-11  7:20 ` [PATCH v3 1/2] ns16550: reject IRQ above nr_irqs_gsi Roger Pau Monné
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Marczykowski-Górecki @ 2022-05-10 15:58 UTC (permalink / raw)
  To: xen-devel
  Cc: Marek Marczykowski-Górecki, Andrew Cooper, George Dunlap,
	Jan Beulich, Julien Grall, Stefano Stabellini, Wei Liu

Intel LPSS has INTERRUPT_LINE set to 0xff by default, that is declared
by the PCI Local Bus Specification Revision 3.0 (from 2004) as
"unknown"/"no connection". Fallback to poll mode in this case.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
Changes in v3:
 - change back to checking 0xff explicitly
 - adjust commit message, include spec reference
 - change warning to match the above
Changes in v2:
 - add log message
 - extend commit message
 - code style fix
---
 xen/drivers/char/ns16550.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index fb75cee4a13a..b4434ad815e1 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1238,6 +1238,15 @@ pci_uart_config(struct ns16550 *uart, bool_t skip_amt, unsigned int idx)
                             pci_conf_read8(PCI_SBDF(0, b, d, f),
                                            PCI_INTERRUPT_LINE) : 0;
 
+                if ( uart->irq == 0xff )
+                {
+                    printk(XENLOG_WARNING
+                           "ns16550: %02x:%02x.%u has no legacy IRQ %d, "
+                           "falling back to a poll mode\n",
+                           b, d, f, uart->irq);
+                    uart->irq = 0;
+                }
+
                 return 0;
             }
         }
-- 
2.35.1



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

end of thread, other threads:[~2022-05-11  7:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 15:58 [PATCH v3 1/2] ns16550: reject IRQ above nr_irqs_gsi Marek Marczykowski-Górecki
2022-05-10 15:58 ` [PATCH v3 2/2] ns16550: Add more device IDs for Intel LPSS UART Marek Marczykowski-Górecki
2022-05-11  7:20 ` [PATCH v3 1/2] ns16550: reject IRQ above nr_irqs_gsi Roger Pau Monné
2022-05-11  7:57   ` Roger Pau Monné

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.