Lines Matching full:msi
82 * If the MSI-X table is located in the middle of a BAR then that MMIO
83 * region gets split into two segments - one segment above the MSI-X table
84 * and the other segment below the MSI-X table - with a hole in place of
85 * the MSI-X table so accesses to it can be trapped and emulated.
125 } msi; member
945 if (ppt->msi.num_msgs == 0) in ppt_teardown_msi()
948 for (i = 0; i < ppt->msi.num_msgs; i++) { in ppt_teardown_msi()
951 (void) ddi_intr_get_cap(ppt->msi.inth[i], &intr_cap); in ppt_teardown_msi()
953 ddi_intr_block_disable(&ppt->msi.inth[i], 1); in ppt_teardown_msi()
955 ddi_intr_disable(ppt->msi.inth[i]); in ppt_teardown_msi()
957 ddi_intr_remove_handler(ppt->msi.inth[i]); in ppt_teardown_msi()
958 ddi_intr_free(ppt->msi.inth[i]); in ppt_teardown_msi()
960 ppt->msi.inth[i] = NULL; in ppt_teardown_msi()
963 kmem_free(ppt->msi.inth, ppt->msi.inth_sz); in ppt_teardown_msi()
964 ppt->msi.inth = NULL; in ppt_teardown_msi()
965 ppt->msi.inth_sz = 0; in ppt_teardown_msi()
966 ppt->msi.is_fixed = B_FALSE; in ppt_teardown_msi()
968 ppt->msi.num_msgs = 0; in ppt_teardown_msi()
1288 return (ppt->msi.is_fixed ? DDI_INTR_UNCLAIMED : DDI_INTR_CLAIMED); in pptintr()
1309 /* Reject attempts to enable MSI while MSI-X is active. */ in ppt_setup_msi()
1332 ppt->msi.is_fixed = B_TRUE; in ppt_setup_msi()
1346 ppt->msi.inth_sz = numvec * sizeof (ddi_intr_handle_t); in ppt_setup_msi()
1347 ppt->msi.inth = kmem_zalloc(ppt->msi.inth_sz, KM_SLEEP); in ppt_setup_msi()
1348 if (ddi_intr_alloc(ppt->pptd_dip, ppt->msi.inth, intr_type, 0, in ppt_setup_msi()
1350 kmem_free(ppt->msi.inth, ppt->msi.inth_sz); in ppt_setup_msi()
1366 ppt->msi.num_msgs = i + 1; in ppt_setup_msi()
1367 ppt->msi.arg[i].pptdev = ppt; in ppt_setup_msi()
1368 ppt->msi.arg[i].addr = addr; in ppt_setup_msi()
1369 ppt->msi.arg[i].msg_data = msg + i; in ppt_setup_msi()
1371 if (ddi_intr_add_handler(ppt->msi.inth[i], pptintr, in ppt_setup_msi()
1372 &ppt->msi.arg[i], NULL) != DDI_SUCCESS) in ppt_setup_msi()
1375 (void) ddi_intr_get_cap(ppt->msi.inth[i], &intr_cap); in ppt_setup_msi()
1377 res = ddi_intr_block_enable(&ppt->msi.inth[i], 1); in ppt_setup_msi()
1379 res = ddi_intr_enable(ppt->msi.inth[i]); in ppt_setup_msi()
1410 /* Reject attempts to enable MSI-X while MSI is active. */ in ppt_setup_msix()
1411 if (ppt->msi.num_msgs != 0) { in ppt_setup_msix()
1418 * Allocate the MSI-X table in ppt_setup_msix()
1471 /* Setup the MSI-X interrupt */ in ppt_setup_msix()