Lines Matching defs:dip

65 extern int	is_pseudo_device(dev_info_t *dip);
70 static int dr_is_real_device(dev_info_t *dip);
73 static int dr_check_dip(dev_info_t *dip, void *arg, uint_t ref);
74 static int dr_resolve_devname(dev_info_t *dip, char *buffer,
172 dr_is_real_device(dev_info_t *dip)
178 if (ddi_get_driver(dip) == NULL)
181 if (DEVI(dip)->devi_pm_flags & (PMC_NEEDS_SR|PMC_PARENTAL_SR))
183 if (DEVI(dip)->devi_pm_flags & PMC_NO_SR)
189 rc = ddi_getlongprop(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS, "reg",
238 dr_resolve_devname(dev_info_t *dip, char *buffer, char *alias)
245 if (dip == NULL)
248 if ((name = ddi_get_name(dip)) == NULL)
276 dr_check_dip(dev_info_t *dip, void *arg, uint_t ref)
282 if (dip == NULL)
285 if (!dr_is_real_device(dip))
288 dname = ddi_binding_name(dip);
303 if (dr_is_unsafe_major(major) && i_ddi_devi_attached(dip)) {
315 dr_check_unsafe_major(dev_info_t *dip, void *arg)
317 return (dr_check_dip(dip, arg, 0));
323 dr_check_devices(dev_info_t *dip, int *refcount, dr_handle_t *handle,
328 if (dip == NULL)
337 ASSERT(e_ddi_branch_held(dip));
338 (void) e_ddi_branch_referenced(dip, dr_check_dip, &bref);
342 * The "dip" argument's parent (if it exists) must be held busy.
345 dr_suspend_devices(dev_info_t *dip, dr_sr_handle_t *srh)
353 * If dip is the root node, it has no siblings and it is
354 * always held. If dip is not the root node, dr_suspend_devices()
357 for (; dip != NULL; dip = ddi_get_next_sibling(dip)) {
360 ndi_devi_enter(dip, &circ);
361 if (dr_suspend_devices(ddi_get_child(dip), srh)) {
362 ndi_devi_exit(dip, circ);
365 ndi_devi_exit(dip, circ);
367 if (!dr_is_real_device(dip))
371 if ((dname = ddi_binding_name(dip)) != NULL)
380 if (drmach_verify_sr(dip, 1)) {
386 if ((d_info = ddi_get_name_addr(dip)) == NULL)
390 if (dr_resolve_devname(dip, d_name, d_alias) == 0) {
402 if (devi_detach(dip, DDI_SUSPEND) != DDI_SUCCESS) {
409 ndi_hold_devi(dip);
410 srh->sr_failed_dip = dip;
427 dev_info_t *dip, *next, *last = NULL;
436 dip = start;
437 next = ddi_get_next_sibling(dip);
438 while (next != last && dip != srh->sr_failed_dip) {
439 dip = next;
440 next = ddi_get_next_sibling(dip);
442 if (dip == srh->sr_failed_dip) {
445 ndi_rele_devi(dip);
446 } else if (dr_is_real_device(dip) &&
449 if ((bn = ddi_binding_name(dip)) != NULL) {
455 !drmach_verify_sr(dip, 0)) {
459 d_info = ddi_get_name_addr(dip);
463 if (!dr_resolve_devname(dip, d_name, d_alias)) {
477 if (devi_attach(dip, DDI_RESUME) !=
503 ndi_devi_enter(dip, &circ);
504 dr_resume_devices(ddi_get_child(dip), srh);
505 ndi_devi_exit(dip, circ);
506 last = dip;
779 /* no parent dip to hold busy */