From: Heiner Kallweit <hkallweit1@gmail.com>
To: Philipp Stanner <pstanner@redhat.com>, Niklas Cassel <cassel@kernel.org>
Cc: Damien Le Moal <dlemoal@kernel.org>,
linux-ide@vger.kernel.org,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] ata: ahci: Don't call pci_intx() directly
Date: Tue, 5 Nov 2024 16:51:08 +0100 [thread overview]
Message-ID: <c6cfefcf-ff1e-4194-9384-67eeea77c346@gmail.com> (raw)
In-Reply-To: <5e56bf9bd7b65ecbf1bdb0af8569c4548c335220.camel@redhat.com>
On 05.11.2024 16:22, Philipp Stanner wrote:
> On Mon, 2024-11-04 at 14:23 +0100, Heiner Kallweit wrote:
>> On 04.11.2024 09:30, Niklas Cassel wrote:
>>> On Fri, Nov 01, 2024 at 11:38:53PM +0100, Heiner Kallweit wrote:
>>>> pci_intx() should be called by PCI core and some virtualization
>>>> code
>>>> only. In PCI device drivers use the appropriate
>>>> pci_alloc_irq_vectors()
>>>> call.
>>>
>>> Hello Heiner,
>>>
>>> as you might or might not know, this patch conflicts with a
>>> Philipp's
>>> already acked patch:
>>> https://lore.kernel.org/linux-ide/20241015185124.64726-10-pstanner@redhat.com/
>>>
>> I know, therefore he's on cc. Fully migrating PCI device drivers to
>> the
>> pci_alloc_irq_vectors() should be done anyway and is the cleaner
>> alternative to changing pci_intx(). However for some drivers this is
>> a rather
>> complex task, therefore I understand Philipp's approach to adjust
>> pci_intx()
>> first. He's incorporating other review feedback in his series, so
>> with the
>> next re-spin he could remove the ahci patch from his series.
>
> As I have stated before, this is not just about cleaning up pci_intx().
>
> Again:
> pci_alloc_irq_vectors() USES pci_intx(), and my series does address
> that in its MSI patch.
>
That's clear. The point is that in the end only PCI core and some
virtualization stuff should use a low-level function like pci_intx().
Device drivers should never use pci_intx() directly, managed or not.
I think all the hassle with managed intx could be avoided if PCI core
would unconditionally reset register PCI_COMMAND (or at least the most
relevant bits) to the initial value on driver exit.
> If you want to help, a careful review of the MSI bits would be helpful.
> Your patch here uses pci_intx(), you just don't see it anymore.
>
> That said, in principle it's of course possible for me to drop patches
> while we're still in review, but I tend to think that it's causing both
> you and me more work if the pci_intx() vs. pci_alloc_irq_vectors() is
> worked on out of all times right now.
>
> It also causes more work load for the reviewers, since they'd have
> reviewed my patch for nothing and would have to review yours then.
>
> Also be aware that I am not yet sure whether the devres aspect should
> also be removed or made more explicit in MSI. Take a look at
> pcim_setup_msi_release().
>
> In the worst case you might just replace one problem with another
> before we figured it all out.
>
> Regards,
> P.
>
>>>
>>> Kind regards,
>>> Niklas
>>
>> Heiner
>>
>
prev parent reply other threads:[~2024-11-05 15:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 22:38 [PATCH] ata: ahci: Don't call pci_intx() directly Heiner Kallweit
2024-11-04 8:30 ` Niklas Cassel
2024-11-04 13:23 ` Heiner Kallweit
2024-11-04 18:36 ` Niklas Cassel
2024-11-04 19:40 ` Heiner Kallweit
2024-11-05 15:22 ` Philipp Stanner
2024-11-05 15:51 ` Heiner Kallweit [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c6cfefcf-ff1e-4194-9384-67eeea77c346@gmail.com \
--to=hkallweit1@gmail.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=pstanner@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox