Re: [PATCH 1/5] net: thunderx: switch to pci_alloc_irq_vectors

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

 



On Mon, Mar 27, 2017 at 1:59 PM, Christoph Hellwig <hch@xxxxxx> wrote:
> Remove the deprecated pci_enable_msix API in favour of it's successor.
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  drivers/net/ethernet/cavium/thunder/nic_main.c | 75 ++++++--------------------
>  1 file changed, 15 insertions(+), 60 deletions(-)
> -       nic->num_vec = pci_msix_vec_count(nic->pdev);
> -
> -       ret = pci_enable_msix(nic->pdev, nic->msix_entries, nic->num_vec);
> -       if (ret) {
> +       /* Enable MSI-X */
> +       ret = pci_alloc_irq_vectors(nic->pdev, nic->num_vec, nic->num_vec,
> +                       PCI_IRQ_MSIX);
nic->num_vec will always be zero here.

> +       while (--i >= 0)
> +               free_irq(pci_irq_vector(nic->pdev, i), nic);
> +       pci_free_irq_vectors(nic->pdev);
>         return ret;
IRQ handlers are not registered for all vectors to free them unconditionally

> +       int i;
> +
> +       for (i = 0; i < nic->num_vec; i++)
> +               free_irq(pci_irq_vector(nic->pdev, i), nic);
> +       pci_free_irq_vectors(nic->pdev);
>  }
Same as here.

How urgent is this ?
Can we comeup with a proper patch to fix this in couple of weeks, instead of
going with these untested patches ?



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux