Commit 172c33cb authored by Jan Kiszka's avatar Jan Kiszka Committed by Greg Kroah-Hartman

serial: exar: Enable MSI support

Use pci_alloc_irq_vectors to enable MSI when available. At least the
XR17V352 supports this.
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e12357e
...@@ -283,10 +283,16 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) ...@@ -283,10 +283,16 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
priv->board = board; 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)); memset(&uart, 0, sizeof(uart));
uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ
| UPF_EXAR_EFR; | UPF_EXAR_EFR;
uart.port.irq = pcidev->irq; uart.port.irq = pci_irq_vector(pcidev, 0);
uart.port.dev = &pcidev->dev; uart.port.dev = &pcidev->dev;
for (i = 0; i < nr_ports && i < maxnr; i++) { for (i = 0; i < nr_ports && i < maxnr; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment