Lines Matching defs:dip

74 static pcie_hp_ctrl_t *pciehpc_create_controller(dev_info_t *dip);
75 static void pciehpc_destroy_controller(dev_info_t *dip);
102 static void pciehpc_handle_power_fault(dev_info_t *dip);
115 * dip - Devinfo node pointer to the hot plug bus node
124 pciehpc_init(dev_info_t *dip, caddr_t arg)
129 PCIE_DBG("pciehpc_init() called (dip=%p)\n", (void *)dip);
132 if ((ctrl_p = PCIE_GET_HP_CTRL(dip)) != NULL) {
134 ddi_driver_name(dip), ddi_get_instance(dip));
139 ctrl_p = pciehpc_create_controller(dip);
150 (void) pci_resource_setup(dip);
152 PCIE_DISABLE_ERRORS(dip);
205 PCIE_ENABLE_ERRORS(dip);
206 (void) pci_resource_destroy(dip);
208 pciehpc_destroy_controller(dip);
217 pciehpc_uninit(dev_info_t *dip)
221 PCIE_DBG("pciehpc_uninit() called (dip=%p)\n", (void *)dip);
223 /* get the soft state structure for this dip */
224 if ((ctrl_p = PCIE_GET_HP_CTRL(dip)) == NULL) {
239 PCIE_ENABLE_ERRORS(dip);
244 (void) pci_resource_destroy(dip);
247 pciehpc_destroy_controller(dip);
264 pciehpc_intr(dev_info_t *dip)
268 pcie_bus_t *bus_p = PCIE_DIP2BUS(dip);
271 /* get the soft state structure for this dip */
272 if ((ctrl_p = PCIE_GET_HP_CTRL(dip)) == NULL)
342 pciehpc_handle_power_fault(dip);
366 ddi_driver_name(dip),
367 ddi_get_instance(dip),
370 (void) ndi_hp_state_change_req(dip,
377 ddi_driver_name(dip),
378 ddi_get_instance(dip),
400 (void) ndi_hp_state_change_req(dip,
428 pciehpc_hp_ops(dev_info_t *dip, char *cn_name, ddi_hp_op_t op,
435 PCIE_DBG("pciehpc_hp_ops: dip=%p cn_name=%s op=%x arg=%p\n",
436 dip, cn_name, op, arg);
438 if ((ctrl_p = PCIE_GET_HP_CTRL(dip)) == NULL)
932 * associated with this dip.
935 pciehpc_create_controller(dev_info_t *dip)
938 pcie_bus_t *bus_p = PCIE_DIP2BUS(dip);
941 ctrl_p->hc_dip = dip;
957 PCIE_SET_HP_CTRL(dip, ctrl_p);
966 pciehpc_destroy_controller(dev_info_t *dip)
969 pcie_bus_t *bus_p = PCIE_DIP2BUS(dip);
971 /* get the soft state structure for this dip */
972 if ((ctrl_p = PCIE_GET_HP_CTRL(dip)) == NULL)
975 PCIE_SET_HP_CTRL(dip, NULL);
991 dev_info_t *dip = ctrl_p->hc_dip;
994 if (ndi_hp_register(dip, &slot_p->hs_info) != NDI_SUCCESS) {
1000 pcie_hp_create_occupant_props(dip, makedevice(ddi_driver_major(dip),
1016 dev_info_t *dip = ctrl_p->hc_dip;
1018 pcie_hp_delete_occupant_props(dip, makedevice(ddi_driver_major(dip),
1022 if (ndi_hp_unregister(dip, slot_p->hs_info.cn_name) != NDI_SUCCESS) {
2220 pciehpc_handle_power_fault(dev_info_t *dip)
2226 ndi_hold_devi(dip);
2228 if (!taskq_dispatch(system_taskq, pciehpc_power_fault_handler, dip,
2230 ndi_rele_devi(dip);
2232 "Failed to dispatch power fault handler, dip %p\n", dip);
2239 dev_info_t *dip = (dev_info_t *)arg;
2243 /* get the soft state structure for this dip */
2244 if ((ctrl_p = PCIE_GET_HP_CTRL(dip)) == NULL) {
2245 ndi_rele_devi(dip);
2254 (void) ndi_hp_state_change_req(dip,
2262 ndi_rele_devi(dip);