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; member
258 if (ppt->msi.num_msgs == 0) in ppt_teardown_msi()
261 for (i = 0; i < ppt->msi.num_msgs; i++) { in ppt_teardown_msi()
262 rid = ppt->msi.startrid + i; in ppt_teardown_msi()
263 res = ppt->msi.res[i]; in ppt_teardown_msi()
264 cookie = ppt->msi.cookie[i]; in ppt_teardown_msi()
272 ppt->msi.res[i] = NULL; in ppt_teardown_msi()
273 ppt->msi.cookie[i] = NULL; in ppt_teardown_msi()
276 if (ppt->msi.startrid == 1) in ppt_teardown_msi()
279 ppt->msi.num_msgs = 0; in ppt_teardown_msi()
579 if (ppt->msi.startrid == 0) in pptintr()
600 /* Reject attempts to enable MSI while MSI-X is active. */ in ppt_setup_msi()
617 startrid = 1; /* MSI */ in ppt_setup_msi()
627 * Make sure that we can allocate all the MSI vectors that are needed in ppt_setup_msi()
643 ppt->msi.startrid = startrid; in ppt_setup_msi()
649 ppt->msi.num_msgs = i + 1; in ppt_setup_msi()
650 ppt->msi.cookie[i] = NULL; in ppt_setup_msi()
653 ppt->msi.res[i] = bus_alloc_resource_any(ppt->dev, SYS_RES_IRQ, in ppt_setup_msi()
655 if (ppt->msi.res[i] == NULL) in ppt_setup_msi()
658 ppt->msi.arg[i].pptdev = ppt; in ppt_setup_msi()
659 ppt->msi.arg[i].addr = addr; in ppt_setup_msi()
660 ppt->msi.arg[i].msg_data = msg + i; in ppt_setup_msi()
662 error = bus_setup_intr(ppt->dev, ppt->msi.res[i], in ppt_setup_msi()
664 pptintr, NULL, &ppt->msi.arg[i], in ppt_setup_msi()
665 &ppt->msi.cookie[i]); in ppt_setup_msi()
691 /* Reject attempts to enable MSI-X while MSI is active. */ in ppt_setup_msix()
692 if (ppt->msi.num_msgs != 0) in ppt_setup_msix()
701 * Allocate the MSI-X table in ppt_setup_msix()
772 /* Setup the MSI-X interrupt */ in ppt_setup_msix()