Lines Matching refs:px_p

52 static int px_enable_err_intr(px_t *px_p);
53 static void px_disable_err_intr(px_t *px_p);
59 static void px_set_mps(px_t *px_p);
193 px_t *px_p = INST_TO_STATE(instance); in px_info() local
201 if (px_p == NULL) { in px_info()
206 *result = (void *)px_p->px_dip; in px_info()
224 px_t *px_p; /* per bus state pointer */ in px_attach() local
247 px_p = INST_TO_STATE(instance); in px_attach()
248 px_p->px_dip = dip; in px_attach()
249 mutex_init(&px_p->px_mutex, NULL, MUTEX_DRIVER, NULL); in px_attach()
250 px_p->px_soft_state = PCI_SOFT_STATE_CLOSED; in px_attach()
256 px_dbg_attach(dip, &px_p->px_dbg_hdl); in px_attach()
263 if (px_get_props(px_p, dip) == DDI_FAILURE) in px_attach()
270 px_p->px_dev_hdl = dev_hdl; in px_attach()
273 px_p->px_bdf = px_lib_get_bdf(px_p); in px_attach()
279 if ((ret = px_ib_attach(px_p)) != DDI_SUCCESS) in px_attach()
282 if (px_cb_attach(px_p) != DDI_SUCCESS) in px_attach()
291 if ((px_mmu_attach(px_p)) != DDI_SUCCESS) in px_attach()
294 if ((px_msiq_attach(px_p)) != DDI_SUCCESS) in px_attach()
297 if ((px_msi_attach(px_p)) != DDI_SUCCESS) in px_attach()
300 if ((px_pec_attach(px_p)) != DDI_SUCCESS) in px_attach()
303 if ((px_dma_attach(px_p)) != DDI_SUCCESS) in px_attach()
306 if ((px_fm_attach(px_p)) != DDI_SUCCESS) in px_attach()
313 if ((px_enable_err_intr(px_p)) != DDI_SUCCESS) in px_attach()
322 (void) px_set_mps(px_p); in px_attach()
347 px_cpr_add_callb(px_p); in px_attach()
357 px_p->px_state = PX_ATTACHED; in px_attach()
385 px_disable_err_intr(px_p); in px_attach()
387 px_fm_detach(px_p); in px_attach()
389 px_pec_detach(px_p); in px_attach()
391 px_msi_detach(px_p); in px_attach()
393 px_msiq_detach(px_p); in px_attach()
395 px_mmu_detach(px_p); in px_attach()
398 px_ib_detach(px_p); in px_attach()
404 px_free_props(px_p); in px_attach()
407 px_dbg_detach(dip, &px_p->px_dbg_hdl); in px_attach()
408 mutex_destroy(&px_p->px_mutex); in px_attach()
417 px_p = INST_TO_STATE(instance); in px_attach()
419 mutex_enter(&px_p->px_mutex); in px_attach()
422 if (px_p->px_state != PX_SUSPENDED) { in px_attach()
423 DBG(DBG_ATTACH, px_p->px_dip, in px_attach()
429 px_msiq_resume(px_p); in px_attach()
432 px_p->px_state = PX_ATTACHED; in px_attach()
434 mutex_exit(&px_p->px_mutex); in px_attach()
454 px_t *px_p = INST_TO_STATE(instance); in px_detach() local
461 if (px_p->px_state != PX_ATTACHED) { in px_detach()
466 mutex_enter(&px_p->px_mutex); in px_detach()
475 px_cpr_rem_callb(px_p); in px_detach()
483 mutex_exit(&px_p->px_mutex); in px_detach()
495 px_p->px_state = PX_DETACHED; in px_detach()
499 px_disable_err_intr(px_p); in px_detach()
500 px_fm_detach(px_p); in px_detach()
501 px_pec_detach(px_p); in px_detach()
504 px_msi_detach(px_p); in px_detach()
505 px_msiq_detach(px_p); in px_detach()
506 px_mmu_detach(px_p); in px_detach()
507 px_ib_detach(px_p); in px_detach()
516 px_free_props(px_p); in px_detach()
518 px_dbg_detach(dip, &px_p->px_dbg_hdl); in px_detach()
519 mutex_exit(&px_p->px_mutex); in px_detach()
520 mutex_destroy(&px_p->px_mutex); in px_detach()
522 px_p->px_dev_hdl = 0; in px_detach()
529 mutex_exit(&px_p->px_mutex); in px_detach()
533 px_p->px_state = PX_SUSPENDED; in px_detach()
534 mutex_exit(&px_p->px_mutex); in px_detach()
540 mutex_exit(&px_p->px_mutex); in px_detach()
546 px_enable_err_intr(px_t *px_p) in px_enable_err_intr() argument
549 px_fm_cb_enable(px_p); in px_enable_err_intr()
552 if (px_cb_add_intr(&px_p->px_cb_fault) != DDI_SUCCESS) in px_enable_err_intr()
556 if (px_err_add_intr(&px_p->px_fault) != DDI_SUCCESS) in px_enable_err_intr()
560 if (px_pec_msg_add_intr(px_p) != DDI_SUCCESS) in px_enable_err_intr()
566 px_err_rem_intr(&px_p->px_fault); in px_enable_err_intr()
568 px_cb_rem_intr(&px_p->px_cb_fault); in px_enable_err_intr()
570 px_fm_cb_disable(px_p); in px_enable_err_intr()
576 px_disable_err_intr(px_t *px_p) in px_disable_err_intr() argument
578 px_pec_msg_rem_intr(px_p); in px_disable_err_intr()
579 px_err_rem_intr(&px_p->px_fault); in px_disable_err_intr()
580 px_cb_rem_intr(&px_p->px_cb_fault); in px_disable_err_intr()
581 px_fm_cb_disable(px_p); in px_disable_err_intr()
585 px_cb_attach(px_t *px_p) in px_cb_attach() argument
587 px_fault_t *fault_p = &px_p->px_cb_fault; in px_cb_attach()
588 dev_info_t *dip = px_p->px_dip; in px_cb_attach()
592 px_p->px_inos[PX_INTR_XBC], &sysino) != DDI_SUCCESS) in px_cb_attach()
598 fault_p->px_intr_ino = px_p->px_inos[PX_INTR_XBC]; in px_cb_attach()
612 px_t *px_p = INST_TO_STATE(instance); in px_pwr_setup() local
634 mutex_init(&px_p->px_l23ready_lock, NULL, MUTEX_DRIVER, in px_pwr_setup()
636 cv_init(&px_p->px_l23ready_cv, NULL, CV_DRIVER, NULL); in px_pwr_setup()
640 hdl.ih_cb_arg1 = px_p; in px_pwr_setup()
650 &px_p->px_pm_msiq_id) != DDI_SUCCESS) { in px_pwr_setup()
655 px_lib_msg_setmsiq(dip, PCIE_PME_ACK_MSG, px_p->px_pm_msiq_id); in px_pwr_setup()
658 if (px_ib_update_intr_state(px_p, px_p->px_dip, hdl.ih_inum, in px_pwr_setup()
659 px_msiqid_to_devino(px_p, px_p->px_pm_msiq_id), px_pwr_pil, in px_pwr_setup()
671 px_p->px_pm_msiq_id); in px_pwr_setup()
673 mutex_destroy(&px_p->px_l23ready_lock); in px_pwr_setup()
674 cv_destroy(&px_p->px_l23ready_cv); in px_pwr_setup()
686 px_t *px_p = INST_TO_STATE(instance); in px_pwr_teardown() local
701 px_p->px_pm_msiq_id); in px_pwr_teardown()
703 (void) px_ib_update_intr_state(px_p, px_p->px_dip, hdl.ih_inum, in px_pwr_teardown()
704 px_msiqid_to_devino(px_p, px_p->px_pm_msiq_id), px_pwr_pil, in px_pwr_teardown()
707 px_p->px_pm_msiq_id = (msiqid_t)-1; in px_pwr_teardown()
709 cv_destroy(&px_p->px_l23ready_cv); in px_pwr_teardown()
710 mutex_destroy(&px_p->px_l23ready_lock); in px_pwr_teardown()
728 px_t *px_p = DIP_TO_STATE(dip); in px_map() local
794 if (rval = px_reloc_reg(dip, rdip, px_p, rp)) in px_map()
802 if (rval = px_xlate_reg(px_p, rp, &p_regspec)) in px_map()
840 px_t *px_p = DIP_TO_STATE(dip); in px_dma_setup() local
841 px_mmu_t *mmu_p = px_p->px_mmu_p; in px_dma_setup()
854 if (ret = px_dma_type(px_p, dmareq, mp)) in px_dma_setup()
856 if (ret = px_dma_pfn(px_p, dmareq, mp)) in px_dma_setup()
861 ret = px_dvma_win(px_p, dmareq, mp); in px_dma_setup()
876 ret = px_dma_physwin(px_p, dmareq, mp); in px_dma_setup()
908 px_t *px_p = DIP_TO_STATE(dip); in px_dma_allochdl() local
930 if (rval = px_dma_attr2hdl(px_p, mp)) { in px_dma_allochdl()
967 px_t *px_p = DIP_TO_STATE(dip); in px_dma_bindhdl() local
968 px_mmu_t *mmu_p = px_p->px_mmu_p; in px_dma_bindhdl()
981 if (ret = px_dma_type(px_p, dmareq, mp)) in px_dma_bindhdl()
983 if (ret = px_dma_pfn(px_p, dmareq, mp)) in px_dma_bindhdl()
988 if (ret = px_dvma_win(px_p, dmareq, mp)) in px_dma_bindhdl()
1008 if (ret = px_dma_physwin(px_p, dmareq, mp)) in px_dma_bindhdl()
1048 px_t *px_p = DIP_TO_STATE(dip); in px_dma_unbindhdl() local
1049 px_mmu_t *mmu_p = px_p->px_mmu_p; in px_dma_unbindhdl()
1117 px_t *px_p = DIP_TO_STATE(dip); in px_dma_win() local
1118 px_mmu_t *mmu_p = px_p->px_mmu_p; in px_dma_win()
1219 px_t *px_p = DIP_TO_STATE(dip); in px_dma_ctlops() local
1220 return (px_fdvma_reserve(dip, rdip, px_p, in px_dma_ctlops()
1224 px_t *px_p = DIP_TO_STATE(dip); in px_dma_ctlops() local
1225 return (px_fdvma_release(dip, px_p, mp)); in px_dma_ctlops()
1268 px_t *px_p = DIP_TO_STATE(dip); in px_ctlops() local
1274 return (px_init_child(px_p, (dev_info_t *)arg)); in px_ctlops()
1277 return (px_uninit_child(px_p, (dev_info_t *)arg)); in px_ctlops()
1317 pf_init(rdip, (void *)px_p->px_fm_ibc, as->cmd); in px_ctlops()
1399 px_t *px_p = DIP_TO_STATE(dip); in px_intr_ops() local
1420 (px_p->px_supp_intr_types | DDI_INTR_TYPE_FIXED) : in px_intr_ops()
1421 px_p->px_supp_intr_types); in px_intr_ops()
1446 px_set_mps(px_t *px_p) in px_set_mps() argument
1452 dip = px_p->px_dip; in px_set_mps()
1458 if (px_lib_get_root_complex_mps(px_p, dip, in px_set_mps()
1476 (void) px_lib_set_root_complex_mps(px_p, dip, bus_p->bus_mps); in px_set_mps()