Lines Matching full:msi
59 * If the MSI-X table is located in the middle of a BAR then that MMIO
60 * region gets split into two segments - one segment above the MSI-X table
61 * and the other segment below the MSI-X table - with a hole in place of
62 * the MSI-X table so accesses to it can be trapped and emulated.
68 MALLOC_DEFINE(M_PPTMSIX, "pptmsix", "Passthru MSI-X resources");
94 } msi;
247 if (ppt->msi.num_msgs == 0)
250 for (i = 0; i < ppt->msi.num_msgs; i++) {
251 rid = ppt->msi.startrid + i;
252 res = ppt->msi.res[i];
253 cookie = ppt->msi.cookie[i];
261 ppt->msi.res[i] = NULL;
262 ppt->msi.cookie[i] = NULL;
265 if (ppt->msi.startrid == 1)
268 ppt->msi.num_msgs = 0;
564 if (ppt->msi.startrid == 0)
585 /* Reject attempts to enable MSI while MSI-X is active. */
602 startrid = 1; /* MSI */
612 * Make sure that we can allocate all the MSI vectors that are needed
628 ppt->msi.startrid = startrid;
634 ppt->msi.num_msgs = i + 1;
635 ppt->msi.cookie[i] = NULL;
638 ppt->msi.res[i] = bus_alloc_resource_any(ppt->dev, SYS_RES_IRQ,
640 if (ppt->msi.res[i] == NULL)
643 ppt->msi.arg[i].pptdev = ppt;
644 ppt->msi.arg[i].addr = addr;
645 ppt->msi.arg[i].msg_data = msg + i;
647 error = bus_setup_intr(ppt->dev, ppt->msi.res[i],
649 pptintr, NULL, &ppt->msi.arg[i],
650 &ppt->msi.cookie[i]);
676 /* Reject attempts to enable MSI-X while MSI is active. */
677 if (ppt->msi.num_msgs != 0)
686 * Allocate the MSI-X table
754 /* Setup the MSI-X interrupt */