From: Frank Li <Frank.li@nxp.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: alexandre.belloni@bootlin.com, linux-i3c@lists.infradead.org
Subject: Re: [PATCH V3 05/11] i3c: mipi-i3c-hci-pci: Enable MSI support
Date: Tue, 16 Dec 2025 12:03:48 -0500 [thread overview]
Message-ID: <aUGQ9Kak8FXL1exD@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20251216165642.164583-6-adrian.hunter@intel.com>
On Tue, Dec 16, 2025 at 06:56:36PM +0200, Adrian Hunter wrote:
> Enable MSI support by using pci_alloc_irq_vectors() to request all
> supported IRQ types. Do not call pci_free_irq_vectors() because for
> resource-managed devices (those initialized with pcim_enable_device()),
> IRQ vector allocation is automatically managed. See
> pci_setup_msi_context() and pcim_setup_msi_release() for details.
>
> Note: The current documentation for pci_alloc_irq_vectors() does not
> mention this behavior.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
>
> Changes in V3:
>
> Enhance commit message
>
> Changes in V2:
> New patch split from "i3c: mipi-i3c-hci-pci: Add support for
> Multi-Bus Instances"
>
>
> drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c b/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
> index 8ade911e3835..0fd3587671e1 100644
> --- a/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
> +++ b/drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
> @@ -203,6 +203,10 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
>
> pci_set_master(pci);
>
> + ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_ALL_TYPES);
> + if (ret < 0)
> + return ret;
> +
> memset(&res, 0, sizeof(res));
>
> res[0].flags = IORESOURCE_MEM;
> @@ -210,8 +214,8 @@ static int mipi_i3c_hci_pci_probe(struct pci_dev *pci,
> res[0].end = pci_resource_end(pci, 0);
>
> res[1].flags = IORESOURCE_IRQ;
> - res[1].start = pci->irq;
> - res[1].end = pci->irq;
> + res[1].start = pci_irq_vector(hci->pci, 0);
> + res[1].end = res[1].start;
>
> dev_id = ida_alloc(&mipi_i3c_hci_pci_ida, GFP_KERNEL);
> if (dev_id < 0)
> --
> 2.51.0
>
>
> --
> linux-i3c mailing list
> linux-i3c@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-i3c
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2025-12-16 17:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 16:56 [PATCH V3 00/11] i3c: mipi-i3c-hci-pci: Define Multi-Bus Instances for Intel controllers Adrian Hunter
2025-12-16 16:56 ` [PATCH V3 01/11] i3c: mipi-i3c-hci: Remove duplicate blank lines Adrian Hunter
2025-12-16 16:56 ` [PATCH V3 02/11] i3c: mipi-i3c-hci: Stop reading Extended Capabilities if capability ID is 0 Adrian Hunter
2025-12-16 16:56 ` [PATCH V3 03/11] i3c: mipi-i3c-hci: Quieten initialization messages Adrian Hunter
2025-12-16 16:56 ` [PATCH V3 04/11] i3c: mipi-i3c-hci-pci: Do not repeatedly check for NULL driver_data Adrian Hunter
2025-12-16 16:56 ` [PATCH V3 05/11] i3c: mipi-i3c-hci-pci: Enable MSI support Adrian Hunter
2025-12-16 17:03 ` Frank Li [this message]
2025-12-16 16:56 ` [PATCH V3 06/11] i3c: mipi-i3c-hci-pci: Assign unique device names and IDs for Intel LPSS I3C Adrian Hunter
2025-12-16 17:08 ` Frank Li
2025-12-16 17:14 ` Adrian Hunter
2025-12-16 18:56 ` Adrian Hunter
2025-12-17 19:24 ` Frank Li
2025-12-16 16:56 ` [PATCH V3 07/11] i3c: mipi-i3c-hci: Allow for Multi-Bus Instances Adrian Hunter
2025-12-16 17:10 ` Frank Li
2025-12-16 16:56 ` [PATCH V3 08/11] i3c: mipi-i3c-hci-pci: Pass base regs as platform data to i3c core device Adrian Hunter
2025-12-16 17:12 ` Frank Li
2025-12-16 16:56 ` [PATCH V3 09/11] i3c: mipi-i3c-hci-pci: Convert to MFD driver Adrian Hunter
2025-12-16 16:56 ` [PATCH V3 10/11] i3c: mipi-i3c-hci-pci: Add support for Multi-Bus Instances Adrian Hunter
2025-12-16 17:16 ` Frank Li
2025-12-16 16:56 ` [PATCH V3 11/11] i3c: mipi-i3c-hci-pci: Define Multi-Bus instances for supported controllers Adrian Hunter
2025-12-16 17:18 ` Frank Li
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=aUGQ9Kak8FXL1exD@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=adrian.hunter@intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox