[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vev9=mkNxi__eH3Lj+a9_rNBQ8M90EGgvsjbtQ_OqcOtg@mail.gmail.com>
Date: Thu, 26 Aug 2021 17:08:35 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Utkarsh Verma <utkarshverma294@...il.com>,
Jiri Slaby <jirislaby@...nel.org>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] serial: 8250_mid: Use pci_irq_vector() to get IRQ
On Tue, Aug 17, 2021 at 3:59 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
> On Tue, Aug 17, 2021 at 01:44:01PM +0530, Utkarsh Verma wrote:
> > Instead of a direct assignment, use pci_irq_vector() to get the
> > Linux IRQ number.
>
> Why is this needed?
It's not.
> > + uart.port.irq = pci_irq_vector(pdev, 0);
>
> What problem does this solve?
>
> Do not describe what you are doing, but rather, _why_ you are doing it.
I think I know what was the motivation here, but actually there is no
problem with current code. Indeed, when we enable MSI we have to
update the vIRQ line, but this is done in the platform related
->setup() callbacks (for example, dnv_setup() does it). So we have two
scenarios:
1) there is no MSI enabled and in this case pdev->irq is correct;
2) we have MSI enabled and we need to update previously saved pdev->irq.
What you, Utkarsh, are doing in the patch has no effect, because at
that point MSI will never be enabled and pci_irq_vector(pdev, 0) will
return the very same value as kept in pdev->irq.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists