Skip to content

Commit 9808f9b

Browse files
austriancodergregkh
authored andcommitted
serial: 8250_pci: handle FL_NOIRQ board flag
In commit 8428413 ("serial: 8250_pci: Implement MSI(-X) support") the way the irq gets allocated was changed. With that change the handling FL_NOIRQ got lost. Restore the old behaviour. Fixes: 8428413 ("serial: 8250_pci: Implement MSI(-X) support") Cc: <[email protected]> Signed-off-by: Christian Gmeiner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0160028 commit 9808f9b

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

drivers/tty/serial/8250/8250_pci.c

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3958,21 +3958,26 @@ pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)
39583958
uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
39593959
uart.port.uartclk = board->base_baud * 16;
39603960

3961-
if (pci_match_id(pci_use_msi, dev)) {
3962-
dev_dbg(&dev->dev, "Using MSI(-X) interrupts\n");
3963-
pci_set_master(dev);
3964-
rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
3961+
if (board->flags & FL_NOIRQ) {
3962+
uart.port.irq = 0;
39653963
} else {
3966-
dev_dbg(&dev->dev, "Using legacy interrupts\n");
3967-
rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY);
3968-
}
3969-
if (rc < 0) {
3970-
kfree(priv);
3971-
priv = ERR_PTR(rc);
3972-
goto err_deinit;
3964+
if (pci_match_id(pci_use_msi, dev)) {
3965+
dev_dbg(&dev->dev, "Using MSI(-X) interrupts\n");
3966+
pci_set_master(dev);
3967+
rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
3968+
} else {
3969+
dev_dbg(&dev->dev, "Using legacy interrupts\n");
3970+
rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY);
3971+
}
3972+
if (rc < 0) {
3973+
kfree(priv);
3974+
priv = ERR_PTR(rc);
3975+
goto err_deinit;
3976+
}
3977+
3978+
uart.port.irq = pci_irq_vector(dev, 0);
39733979
}
39743980

3975-
uart.port.irq = pci_irq_vector(dev, 0);
39763981
uart.port.dev = &dev->dev;
39773982

39783983
for (i = 0; i < nr_ports; i++) {

0 commit comments

Comments
 (0)