Lines Matching defs:dip
77 extern int is_pseudo_device(dev_info_t *dip);
81 static int sbdp_is_real_device(dev_info_t *dip);
85 static int sbdp_check_dip(dev_info_t *dip, void *arg, uint_t ref);
87 static int sbdp_resolve_devname(dev_info_t *dip, char *buffer,
161 sbdp_is_real_device(dev_info_t *dip)
167 if (ddi_get_driver(dip) == NULL)
170 if (DEVI(dip)->devi_pm_flags & (PMC_NEEDS_SR|PMC_PARENTAL_SR))
172 if (DEVI(dip)->devi_pm_flags & PMC_NO_SR)
178 rc = ddi_getlongprop(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS, "reg",
207 sbdp_resolve_devname(dev_info_t *dip, char *buffer, char *alias)
214 if (dip == NULL)
217 if ((name = ddi_get_name(dip)) == NULL)
242 sbdp_check_dip(dev_info_t *dip, void *arg, uint_t ref)
247 if (dip == NULL)
253 if (!sbdp_is_real_device(dip))
256 dname = ddi_binding_name(dip);
260 (void) ddi_pathname(dip, sbdp_get_err_buf(sbrp->sep));
277 (void) ddi_pathname(dip, sbdp_get_err_buf(sbrp->sep));
278 major = ddi_driver_major(dip);
291 sbdp_check_devices(dev_info_t *dip, int *refcount, sbd_error_t *sep,
300 ASSERT(e_ddi_branch_held(dip));
302 (void) e_ddi_branch_referenced(dip, sbdp_check_dip, &sbr);
310 sbdp_suspend_devices_(dev_info_t *dip, sbdp_sr_handle_t *srh)
315 for (; dip != NULL; dip = ddi_get_next_sibling(dip)) {
318 if (sbdp_suspend_devices_(ddi_get_child(dip), srh)) {
322 if (!sbdp_is_real_device(dip))
326 if ((dname = DEVI(dip)->devi_binding_name) != NULL)
337 if ((d_info = ddi_get_name_addr(dip)) == NULL)
341 if (sbdp_resolve_devname(dip, d_name, d_alias) == 0) {
353 if (devi_detach(dip, DDI_SUSPEND) != DDI_SUCCESS) {
358 ndi_hold_devi(dip);
359 SR_FAILED_DIP(srh) = dip;
369 sbdp_suspend_devices_enter(dev_info_t *dip, void *arg)
371 struct dev_info *devi = DEVI(dip);
372 ndi_devi_enter(dip, &devi->devi_circular);
378 sbdp_suspend_devices_exit(dev_info_t *dip, void *arg)
380 struct dev_info *devi = DEVI(dip);
381 ndi_devi_exit(dip, devi->devi_circular);
391 sbdp_suspend_devices(dev_info_t *dip, sbdp_sr_handle_t *srh)
395 /* assumes dip is ddi_root_node so no ndi_devi_enter required */
396 ASSERT(dip == ddi_root_node());
397 ddi_walk_devs(dip, sbdp_suspend_devices_enter, NULL);
398 rv = sbdp_suspend_devices_(dip, srh);
399 ddi_walk_devs(dip, sbdp_suspend_devices_exit, NULL);
407 dev_info_t *dip, *next, *last = NULL;
415 dip = start;
416 next = ddi_get_next_sibling(dip);
417 while (next != last && dip != SR_FAILED_DIP(srh)) {
418 dip = next;
419 next = ddi_get_next_sibling(dip);
421 if (dip == SR_FAILED_DIP(srh)) {
423 ndi_rele_devi(dip);
425 } else if (sbdp_is_real_device(dip) &&
428 if (DEVI(dip)->devi_binding_name != NULL) {
429 bn = ddi_binding_name(dip);
439 d_info = ddi_get_name_addr(dip);
443 if (!sbdp_resolve_devname(dip, d_name,
460 if (devi_attach(dip, DDI_RESUME) !=
479 ndi_devi_enter(dip, &circ);
480 sbdp_resume_devices(ddi_get_child(dip), srh);
481 ndi_devi_exit(dip, circ);
482 last = dip;