All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: bhelgaas@google.com, kw@linux.com, manivannan.sadhasivam@linaro.org
Cc: Frank Li <Frank.Li@nxp.com>,
	linux-pci@vger.kernel.org, Damien Le Moal <dlemoal@kernel.org>,
	Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Subject: Re: [PATCH] misc: pci_endpoint_test: Defer IRQ allocation until ioctl(PCITEST_SET_IRQTYPE)
Date: Mon, 14 Apr 2025 17:14:26 +0200	[thread overview]
Message-ID: <Z_0mUhHzGqNrMBGg@ryzen> (raw)
In-Reply-To: <20250402085659.4033434-2-cassel@kernel.org>

On Wed, Apr 02, 2025 at 10:57:00AM +0200, Niklas Cassel wrote:
> Commit a402006d48a9 ("misc: pci_endpoint_test: Remove global 'irq_type'
> and 'no_msi'") changed so that the default IRQ vector requested by
> pci_endpoint_test_probe() was no longer the module param 'irq_type',
> but instead test->irq_type. test->irq_type is by default
> IRQ_TYPE_UNDEFINED (until someone calls ioctl(PCITEST_SET_IRQTYPE)).
> 
> However, the commit also changed so that after initializing test->irq_type
> to IRQ_TYPE_UNDEFINED, it also overrides it with driver_data->irq_type, if
> the PCI device and vendor ID provides driver_data.
> 
> This causes a regression for PCI device and vendor IDs that do not provide
> driver_data, and the driver now fails to probe on such platforms.
> 
> Considering that the pci endpoint selftests and the old pcitest always
> call ioctl(PCITEST_SET_IRQTYPE) before performing any test that requires
> IRQs, simply remove the allocation of IRQs in pci_endpoint_test_probe(),
> and defer it until ioctl(PCITEST_SET_IRQTYPE) has been called.
> 
> A positive side effect of this is that even if the endpoint controller has
> issues with IRQs, the user can do still do all the tests/ioctls() that do
> not require working IRQs, e.g. PCITEST_BAR and PCITEST_BARS.
> 
> This also means that we can remove the now unused irq_type from
> driver_data. The irq_type will always be the one configured by the user
> using ioctl(PCITEST_SET_IRQTYPE). (A user that does not know, or care
> which irq_type that is used, can use PCITEST_IRQ_TYPE_AUTO. This has
> superseded the need for a default irq_type in driver_data.)
> 
> Fixes: a402006d48a9c ("misc: pci_endpoint_test: Remove global 'irq_type' and 'no_msi'")
> Signed-off-by: Niklas Cassel <cassel@kernel.org>

Considering that e.g. NXP platforms are currently broken without this,
this should go into v6.15 IMHO.


Kind regards,
Niklas

      parent reply	other threads:[~2025-04-14 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  8:57 [PATCH] misc: pci_endpoint_test: Defer IRQ allocation until ioctl(PCITEST_SET_IRQTYPE) Niklas Cassel
2025-04-02 20:01 ` Frank Li
2025-04-02 22:44   ` Niklas Cassel
2025-04-03 21:45     ` Frank Li
2025-04-09  7:03 ` Manivannan Sadhasivam
2025-04-14 15:14 ` Niklas Cassel [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=Z_0mUhHzGqNrMBGg@ryzen \
    --to=cassel@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=dlemoal@kernel.org \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=kw@linux.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.