Re: [PATCH 7/7] serial: exar: Enable MSI support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 7, 2017 at 6:10 PM, Jan Kiszka <jan.kiszka@xxxxxxxxxxx> wrote:
> Use pci_alloc_irq_vectors to enable MSI when available. At least the
> XR17V352 supports this.
>

FWIW:
Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>

> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
> ---
>  drivers/tty/serial/8250/8250_exar.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
> index 13cc1da..236de60 100644
> --- a/drivers/tty/serial/8250/8250_exar.c
> +++ b/drivers/tty/serial/8250/8250_exar.c
> @@ -284,10 +284,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++) {
> --
> 2.1.4
>



-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux