serial: 8250_mid: enable MSI on Denverton
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 11 Jan 2017 14:31:36 +0000 (16:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2017 13:20:23 +0000 (14:20 +0100)
Enable MSI type of interrupt if PCI BIOS supports it.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_mid.c

index 6730d9eef81e7365c9473b459522b03ce6be51e5..85011c9ac0ee2263f2842c93034116cfe9f3287d 100644 (file)
@@ -164,8 +164,14 @@ static int dnv_setup(struct mid8250 *mid, struct uart_port *p)
        unsigned int bar = FL_GET_BASE(mid->board->flags);
        int ret;
 
+       ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
+       if (ret < 0)
+               return ret;
+
+       p->irq = pci_irq_vector(pdev, 0);
+
        chip->dev = &pdev->dev;
-       chip->irq = pdev->irq;
+       chip->irq = pci_irq_vector(pdev, 0);
        chip->regs = p->membase;
        chip->length = pci_resource_len(pdev, bar);
        chip->offset = DNV_DMA_CHAN_OFFSET;