Skip to content

Commit 172c33c

Browse files
jan-kiszkagregkh
authored andcommitted
serial: exar: Enable MSI support
Use pci_alloc_irq_vectors to enable MSI when available. At least the XR17V352 supports this. Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7e12357 commit 172c33c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/tty/serial/8250/8250_exar.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,16 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
283283

284284
priv->board = board;
285285

286+
pci_set_master(pcidev);
287+
288+
rc = pci_alloc_irq_vectors(pcidev, 1, 1, PCI_IRQ_ALL_TYPES);
289+
if (rc < 0)
290+
return rc;
291+
286292
memset(&uart, 0, sizeof(uart));
287293
uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ
288294
| UPF_EXAR_EFR;
289-
uart.port.irq = pcidev->irq;
295+
uart.port.irq = pci_irq_vector(pcidev, 0);
290296
uart.port.dev = &pcidev->dev;
291297

292298
for (i = 0; i < nr_ports && i < maxnr; i++) {

0 commit comments

Comments
 (0)