From: Adrian Hunter Date: Tue, 6 Jan 2026 16:44:10 +0000 (+0200) Subject: i3c: mipi-i3c-hci-pci: Enable MSI support X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b43181b724e8b98f1c42d44db8f3c132a932773e;p=thirdparty%2Fkernel%2Flinux.git i3c: mipi-i3c-hci-pci: Enable MSI support 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 Reviewed-by: Frank Li Link: https://patch.msgid.link/20260106164416.67074-6-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni --- 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 8ade911e38358..0fd3587671e13 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)