]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
serial: exar: Enable MSI support
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 8 Feb 2017 16:09:09 +0000 (17:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Feb 2017 14:13:26 +0000 (15:13 +0100)
Use pci_alloc_irq_vectors to enable MSI when available. At least the
XR17V352 supports this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_exar.c

index f612da326e82bf0fc9142b8582fd304cff7cb574..b89c4ffc048655dc65c241afef5bfb21c13841bd 100644 (file)
@@ -283,10 +283,16 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
 
        priv->board = board;
 
+       pci_set_master(pcidev);
+
+       rc = pci_alloc_irq_vectors(pcidev, 1, 1, PCI_IRQ_ALL_TYPES);
+       if (rc < 0)
+               return rc;
+
        memset(&uart, 0, sizeof(uart));
        uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ
                          | UPF_EXAR_EFR;
-       uart.port.irq = pcidev->irq;
+       uart.port.irq = pci_irq_vector(pcidev, 0);
        uart.port.dev = &pcidev->dev;
 
        for (i = 0; i < nr_ports && i < maxnr; i++) {