Lines Matching defs:dnp
1356 struct devnames *dnp;
1445 dnp = &(devnamesp[DEVI(dip)->devi_major]);
1446 LOCK_DEV_OPS(&dnp->dn_lock);
1447 dnp->dn_flags &= ~DN_DRIVER_HELD;
1448 UNLOCK_DEV_OPS(&dnp->dn_lock);
1512 struct devnames *dnp;
1522 dnp = &devnamesp[DEVI(dip)->devi_major];
1523 LOCK_DEV_OPS(&dnp->dn_lock);
1524 if (dnp->dn_flags & DN_NO_AUTODETACH) {
1525 UNLOCK_DEV_OPS(&dnp->dn_lock);
1528 UNLOCK_DEV_OPS(&dnp->dn_lock);
2461 i_ddi_prop_list_hold(ddi_prop_list_t *prop_list, struct devnames *dnp)
2464 ASSERT(mutex_owned(&dnp->dn_lock));
2469 i_ddi_prop_list_rele(ddi_prop_list_t *prop_list, struct devnames *dnp)
2472 ASSERT(mutex_owned(&dnp->dn_lock));
2574 struct devnames *dnp = &devnamesp[m];
2575 LOCK_DEV_OPS(&dnp->dn_lock);
2576 dnp->dn_flags &= ~(DN_DRIVER_HELD|DN_DRIVER_INACTIVE);
2578 UNLOCK_DEV_OPS(&dnp->dn_lock);
2599 struct devnames *dnp;
2607 dnp = &devnamesp[major];
2608 LOCK_DEV_OPS(&dnp->dn_lock);
2610 UNLOCK_DEV_OPS(&dnp->dn_lock);
2945 struct devnames *dnp;
2953 dnp = &orphanlist;
2954 remove_from_dn_list(dnp, dip);
2960 dnp = &devnamesp[major];
2961 add_to_dn_list(dnp, dip);
2968 struct devnames *dnp;
2975 dnp = &devnamesp[major];
2976 remove_from_dn_list(dnp, dip);
2982 dnp = &orphanlist;
2983 add_to_dn_list(dnp, dip);
2991 in_dn_list(struct devnames *dnp, dev_info_t *dip)
2995 if ((idevi = DEVI(dnp->dn_head)) == NULL)
3008 * headed by 'dnp'
3014 add_to_ordered_dn_list(struct devnames *dnp, dev_info_t *dip)
3018 ASSERT(mutex_owned(&(dnp->dn_lock)));
3020 dipp = &dnp->dn_head;
3053 add_to_dn_list(struct devnames *dnp, dev_info_t *dip)
3058 LOCK_DEV_OPS(&(dnp->dn_lock));
3059 if (in_dn_list(dnp, dip)) {
3063 add_to_ordered_dn_list(dnp, dip);
3065 UNLOCK_DEV_OPS(&(dnp->dn_lock));
3069 remove_from_dn_list(struct devnames *dnp, dev_info_t *dip)
3073 LOCK_DEV_OPS(&(dnp->dn_lock));
3075 plist = (dev_info_t **)&dnp->dn_head;
3090 UNLOCK_DEV_OPS(&(dnp->dn_lock));
3099 struct devnames *dnp;
3105 dnp = &devnamesp[DEVI(dip)->devi_major];
3106 LOCK_DEV_OPS(&dnp->dn_lock);
3107 plist = dnp->dn_global_prop_ptr;
3109 UNLOCK_DEV_OPS(&dnp->dn_lock);
3112 i_ddi_prop_list_hold(plist, dnp);
3113 UNLOCK_DEV_OPS(&dnp->dn_lock);
3132 struct devnames *dnp;
3136 dnp = &devnamesp[major];
3137 LOCK_DEV_OPS(&dnp->dn_lock);
3138 i_ddi_prop_list_rele(proplist, dnp);
3139 UNLOCK_DEV_OPS(&dnp->dn_lock);
3335 struct devnames *dnp = &devnamesp[i];
3336 if ((dnp->dn_flags & DN_FORCE_ATTACH) &&
3585 struct devnames *dnp;
3592 dnp = &devnamesp[major];
3593 LOCK_DEV_OPS(&dnp->dn_lock);
3594 dip = dnp->dn_head;
3597 UNLOCK_DEV_OPS(&dnp->dn_lock);
3602 LOCK_DEV_OPS(&dnp->dn_lock);
3606 UNLOCK_DEV_OPS(&dnp->dn_lock);
6819 struct devnames *dnp;
6828 dnp = &(devnamesp[major]);
6829 LOCK_DEV_OPS(&(dnp->dn_lock));
6830 for (dip = dnp->dn_head; dip;
6853 UNLOCK_DEV_OPS(&(dnp->dn_lock));
6864 UNLOCK_DEV_OPS(&(dnp->dn_lock));
7117 struct devnames *dnp;
7121 dnp = &devnamesp[major];
7122 LOCK_DEV_OPS(&dnp->dn_lock);
7123 dip = dnp->dn_head;
7126 UNLOCK_DEV_OPS(&dnp->dn_lock);
7140 LOCK_DEV_OPS(&dnp->dn_lock);
7145 dnp->dn_flags |= DN_NO_AUTODETACH;
7146 UNLOCK_DEV_OPS(&dnp->dn_lock);
7252 struct devnames *dnp;
7256 dnp = &devnamesp[major];
7257 LOCK_DEV_OPS(&dnp->dn_lock);
7258 for (dip = dnp->dn_head; dip != NULL; dip = ddi_get_next(dip)) {
7264 UNLOCK_DEV_OPS(&dnp->dn_lock);
7296 enter_driver(struct devnames *dnp)
7298 mutex_enter(&dnp->dn_lock);
7299 ASSERT(dnp->dn_busy_thread != curthread);
7300 while (dnp->dn_flags & DN_DRIVER_BUSY)
7301 cv_wait(&dnp->dn_wait, &dnp->dn_lock);
7302 dnp->dn_flags |= DN_DRIVER_BUSY;
7303 dnp->dn_busy_thread = curthread;
7304 mutex_exit(&dnp->dn_lock);
7308 exit_driver(struct devnames *dnp)
7310 mutex_enter(&dnp->dn_lock);
7311 ASSERT(dnp->dn_busy_thread == curthread);
7312 dnp->dn_flags &= ~DN_DRIVER_BUSY;
7313 dnp->dn_busy_thread = NULL;
7314 cv_broadcast(&dnp->dn_wait);
7315 mutex_exit(&dnp->dn_lock);
7322 struct devnames *dnp;
7334 dnp = &devnamesp[major];
7335 enter_driver(dnp);
7338 if (dnp->dn_flags & DN_DRIVER_HELD) {
7339 exit_driver(dnp);
7346 LOCK_DEV_OPS(&dnp->dn_lock);
7347 dnp->dn_flags |= (DN_DRIVER_HELD | DN_NO_AUTODETACH);
7348 UNLOCK_DEV_OPS(&dnp->dn_lock);
7351 "ddi_hold_installed_driver: %s\n", dnp->dn_name));
7358 if (dnp->dn_pl == NULL) {
7360 exit_driver(dnp);
7363 exit_driver(dnp);
7377 LOCK_DEV_OPS(&dnp->dn_lock);
7379 (void) impl_parlist_to_major(dnp->dn_pl, parents);
7381 diplist_to_parent_major(dnp->dn_head, parents);
7382 UNLOCK_DEV_OPS(&dnp->dn_lock);
7387 exit_driver(dnp);
7391 exit_driver(dnp);
7781 struct devnames *dnp = &devnamesp[par_major];
7796 LOCK_DEV_OPS(&dnp->dn_lock);
7837 UNLOCK_DEV_OPS(&dnp->dn_lock);
8045 struct devnames *dnp;
8053 dnp = &devnamesp[major];
8054 LOCK_DEV_OPS(&dnp->dn_lock);
8055 if (dnp->dn_head) {
8056 dip = dnp->dn_head;
8057 UNLOCK_DEV_OPS(&dnp->dn_lock);
8060 UNLOCK_DEV_OPS(&dnp->dn_lock);
8097 LOCK_DEV_OPS(&dnp->dn_lock);
8098 dnp->dn_flags |= DN_DRIVER_HELD;
8099 dnp->dn_head = dip;
8100 UNLOCK_DEV_OPS(&dnp->dn_lock);