Lines Matching defs:dip
155 ddi_fm_service_impact(dev_info_t *dip, int svc_impact)
161 mutex_enter(&(DEVI(dip)->devi_lock));
162 if (!DEVI_IS_DEVICE_OFFLINE(dip)) {
165 DEVI_SET_DEVICE_DOWN(dip);
168 ddi_fm_ereport_post(dip, buf, ena, DDI_NOSLEEP,
173 DEVI_SET_DEVICE_DEGRADED(dip);
174 if (DEVI_IS_DEVICE_DEGRADED(dip)) {
178 ddi_fm_ereport_post(dip, buf, ena, DDI_NOSLEEP,
181 } else if (DEVI_IS_DEVICE_DOWN(dip)) {
185 ddi_fm_ereport_post(dip, buf, ena, DDI_NOSLEEP,
191 DEVI_SET_DEVICE_UP(dip);
194 ddi_fm_ereport_post(dip, buf, ena, DDI_NOSLEEP,
201 ddi_fm_ereport_post(dip, buf, ena, DDI_NOSLEEP,
209 mutex_exit(&(DEVI(dip)->devi_lock));
213 i_ddi_drv_ereport_post(dev_info_t *dip, const char *error_class,
258 DVR_NAME, DATA_TYPE_STRING, ddi_driver_name(dip),
266 DVR_NAME, DATA_TYPE_STRING, ddi_driver_name(dip),
279 DVR_NAME, DATA_TYPE_STRING, ddi_driver_name(dip),
285 DVR_NAME, DATA_TYPE_STRING, ddi_driver_name(dip),
296 * for the ereport is communicated by the 'dip' argument. A minor node,
297 * an entity below 'dip', is represented by a non-null 'minor_name'
300 * 'devpath' argument - in this case 'dip' is the MPXIO client node and
310 * identity of the dip. For transport errors the caller should specify
311 * a NULL devid, even when there is a valid devid associated with the dip.
314 * just a dip: devpath, minor_name, and devid are all NULL. The
338 fm_dev_ereport_postv(dev_info_t *dip, dev_info_t *eqdip,
355 ASSERT(dip && eqdip && error_class);
359 * ddi_fm_ereport_post* interfaces call with eqdip == dip,
360 * ndi_fm_ereport_post* interfaces call with eqdip == ddi_parent(dip).
372 i_ddi_drv_ereport_post(dip, DVR_ECONTEXT, NULL, sflag);
408 i_ddi_drv_ereport_post(dip, DVR_EVER, NULL, sflag);
424 /* derive devpath from dip */
425 if (dip == ddi_root_node())
428 (void) ddi_pathname(dip, path);
485 ddi_fm_ereport_post(dev_info_t *dip,
490 ASSERT(dip && error_class);
492 fm_dev_ereport_postv(dip, dip, NULL, NULL, NULL, NULL,
498 ndi_fm_ereport_post(dev_info_t *dip,
503 ASSERT(dip && error_class && (sflag == DDI_SLEEP));
505 fm_dev_ereport_postv(dip, ddi_get_parent(dip), NULL, NULL, NULL, NULL,
518 i_ddi_fm_handler_enter(dev_info_t *dip)
520 struct i_ddi_fmhdl *hdl = DEVI(dip)->devi_fmhdl;
533 i_ddi_fm_handler_exit(dev_info_t *dip)
535 struct i_ddi_fmhdl *hdl = DEVI(dip)->devi_fmhdl;
542 i_ddi_fm_handler_owned(dev_info_t *dip)
544 struct i_ddi_fmhdl *hdl = DEVI(dip)->devi_fmhdl;
555 ddi_fm_handler_register(dev_info_t *dip, ddi_err_func_t handler,
571 i_ddi_drv_ereport_post(dip, DVR_ECONTEXT, NULL, DDI_NOSLEEP);
575 if (dip == ddi_root_node())
576 pdip = dip;
578 pdip = (dev_info_t *)DEVI(dip)->devi_parent;
582 if (!(DDI_FM_ERRCB_CAP(ddi_fm_capable(dip)) &&
584 i_ddi_drv_ereport_post(dip, DVR_EFMCAP, NULL, DDI_SLEEP);
592 /* Add dip to parent's target list of registered error handlers */
594 tgt->ft_dip = dip;
612 ddi_fm_handler_unregister(dev_info_t *dip)
626 i_ddi_drv_ereport_post(dip, DVR_ECONTEXT, NULL, DDI_NOSLEEP);
630 if (dip == ddi_root_node())
631 pdip = dip;
633 pdip = (dev_info_t *)DEVI(dip)->devi_parent;
637 if (!(DDI_FM_ERRCB_CAP(ddi_fm_capable(dip)) &&
639 i_ddi_drv_ereport_post(dip, DVR_EFMCAP, NULL, DDI_SLEEP);
648 if (dip == tgt->ft_dip) {
662 * Initialize Fault Management capabilities for this device instance (dip).
685 ddi_fm_init(dev_info_t *dip, int *fmcap, ddi_iblock_cookie_t *ibcp)
687 struct dev_info *devi = DEVI(dip);
692 if (!DEVI_IS_ATTACHING(dip)) {
693 i_ddi_drv_ereport_post(dip, DVR_ECONTEXT, NULL, DDI_NOSLEEP);
705 if (dip != ddi_root_node()) {
713 pcap = i_ndi_busop_fm_init(dip, *fmcap, &ibc);
722 if ((fmhdl->fh_ksp = kstat_create((char *)ddi_driver_name(dip),
723 ddi_get_instance(dip), "fm", "misc",
741 fmhdl->fh_dip = dip;
751 if (ddi_getprop(DDI_DEV_T_NONE, dip, DDI_PROP_DONTPASS,
753 (void) ddi_prop_create(DDI_DEV_T_NONE, dip,
764 if (ddi_getprop(DDI_DEV_T_NONE, dip, DDI_PROP_DONTPASS,
766 (void) ddi_prop_create(DDI_DEV_T_NONE, dip,
780 if (ddi_getprop(DDI_DEV_T_NONE, dip, DDI_PROP_DONTPASS,
782 (void) ddi_prop_create(DDI_DEV_T_NONE, dip,
791 if (ddi_getprop(DDI_DEV_T_NONE, dip, DDI_PROP_DONTPASS,
793 (void) ddi_prop_create(DDI_DEV_T_NONE, dip,
819 ddi_fm_fini(dev_info_t *dip)
821 struct i_ddi_fmhdl *fmhdl = DEVI(dip)->devi_fmhdl;
825 if (!(DEVI_IS_DETACHING(dip) || DEVI_IS_ATTACHING(dip))) {
826 i_ddi_drv_ereport_post(dip, DVR_ECONTEXT, NULL, DDI_NOSLEEP);
833 (void) ddi_prop_remove(DDI_DEV_T_NONE, dip,
837 if (dip != ddi_root_node()) {
839 ddi_fm_handler_unregister(dip);
840 (void) ddi_prop_remove(DDI_DEV_T_NONE, dip,
848 (void) ddi_prop_remove(DDI_DEV_T_NONE, dip,
853 (void) ddi_prop_remove(DDI_DEV_T_NONE, dip,
858 i_ndi_busop_fm_fini(dip);
862 DEVI(dip)->devi_fmhdl = NULL;
871 ddi_fm_capable(dev_info_t *dip)
873 struct i_ddi_fmhdl *fmhdl = DEVI(dip)->devi_fmhdl;