Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260106164416.67074-6-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Adrian Hunter and committed by
Alexandre Belloni
b43181b7 d540d090

+6 -2
+6 -2
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c
··· 203 203 204 204 pci_set_master(pci); 205 205 206 + ret = pci_alloc_irq_vectors(pci, 1, 1, PCI_IRQ_ALL_TYPES); 207 + if (ret < 0) 208 + return ret; 209 + 206 210 memset(&res, 0, sizeof(res)); 207 211 208 212 res[0].flags = IORESOURCE_MEM; ··· 214 210 res[0].end = pci_resource_end(pci, 0); 215 211 216 212 res[1].flags = IORESOURCE_IRQ; 217 - res[1].start = pci->irq; 218 - res[1].end = pci->irq; 213 + res[1].start = pci_irq_vector(hci->pci, 0); 214 + res[1].end = res[1].start; 219 215 220 216 dev_id = ida_alloc(&mipi_i3c_hci_pci_ida, GFP_KERNEL); 221 217 if (dev_id < 0)