Lines Matching defs:dp

66 static void in_hashdrv(in_drv_t *dp);
69 static void in_endrv(in_node_t *np, in_drv_t *dp);
147 struct in_drv *dp;
174 dp = in_alloc_drv("rootnex");
175 in_endrv(e_ddi_inst_state.ins_root, dp);
341 in_set_instance(dev_info_t *dip, in_drv_t *dp, major_t major)
345 dp->ind_instance = DEVI(dip)->devi_instance;
347 dp->ind_instance = in_next_instance(major);
545 in_drv_t *dp;
601 dp = in_drvwalk(np, bname);
602 if (dp == NULL) {
608 if ((dp = in_drvwalk(np, bname)) == NULL) {
609 dp = in_alloc_drv(bname);
610 ASSERT(dp != NULL);
613 in_endrv(np, dp);
614 in_set_instance(dip, dp, major);
615 dp->ind_state = IN_PROVISIONAL;
616 in_hashdrv(dp);
618 dp->ind_state = IN_BORROWED;
622 ret = dp->ind_instance;
669 in_drv_t *dp;
676 for (dp = dnp->dn_inlist; dp != NULL; dp = dp->ind_next)
677 if (dp->ind_instance == inst)
681 if (dp) {
683 ret = mkpathname(path, dp->ind_node, MAXPATHLEN);
706 in_drv_t *dp;
725 for (dp = dnp->dn_inlist; dp; dp = dp->ind_next)
726 if (dp->ind_instance >= dnp->dn_pinstance)
730 if (dp == NULL) {
738 prev = dp->ind_instance;
743 for (dp = dp->ind_next, hole = 0; dp; dp = dp->ind_next) {
744 if (dp->ind_instance != (prev + 1))
746 if (dp->ind_instance >= (prev + block_size + 1))
748 prev = dp->ind_instance;
781 in_drv_t *dp; /* in_drv entry */
819 dp = in_drvwalk(np, name);
820 ASSERT(dp);
821 if (dp->ind_state == IN_PROVISIONAL) {
822 in_removedrv(dnp, dp);
823 } else if (dp->ind_state == IN_BORROWED) {
824 dp->ind_state = IN_PERMANENT;
840 in_drv_t *dp;
865 dp = in_drvwalk(np, (char *)ddi_driver_name(dip));
866 ASSERT(dp);
869 if (dp->ind_state == IN_PROVISIONAL || dp->ind_state == IN_BORROWED) {
870 dp->ind_state = IN_PERMANENT;
885 in_drv_t *dp, *ndp;
906 dp = e_ddi_inst_state.ins_no_major;
908 while (dp) {
909 ndp = dp->ind_next;
910 ASSERT(dp->ind_state != IN_UNKNOWN);
911 dp->ind_next = NULL;
912 in_hashdrv(dp);
913 dp = ndp;
1002 in_drv_t *dp;
1025 dp = in_drvwalk(np, bname);
1026 if (dp != NULL) {
1030 cp, bname, dp->ind_instance);
1040 dp = in_alloc_drv(bname);
1041 in_endrv(np, dp);
1042 dp->ind_instance = instance;
1043 dp->ind_state = IN_PERMANENT;
1044 in_hashdrv(dp);
1135 * Insert drv entry dp onto a node's driver list
1138 in_endrv(in_node_t *np, in_drv_t *dp)
1142 ASSERT(np && dp);
1144 np->in_drivers = dp;
1145 dp->ind_next_drv = mp;
1146 dp->ind_node = np;
1226 in_drv_t *dp;
1240 dp = (in_drv_t *)cp;
1242 dp->ind_driver_name = cp + sizeof (in_drv_t);
1243 (void) strcpy(dp->ind_driver_name, bindingname);
1245 dp->ind_state = IN_UNKNOWN;
1246 dp->ind_instance = -1;
1247 return (dp);
1263 in_dealloc_drv(in_drv_t *dp)
1265 ASSERT(dp->ind_driver_name);
1267 kmem_free(dp, sizeof (in_drv_t) + strlen(dp->ind_driver_name)
1295 in_drv_t *dp;
1309 dp = dnp->dn_inlist;
1310 while (dp) {
1311 if (dp->ind_instance == instance)
1313 dp = dp->ind_next;
1319 in_hashdrv(in_drv_t *dp)
1326 major = ddi_name_to_major(dp->ind_driver_name);
1328 dp->ind_next = e_ddi_inst_state.ins_no_major;
1329 e_ddi_inst_state.ins_no_major = dp;
1341 if (mp == NULL || dp->ind_instance < mp->ind_instance) {
1344 dp->ind_next = mp;
1345 dnp->dn_inlist = dp;
1349 ASSERT(mp->ind_instance != dp->ind_instance);
1350 while (mp->ind_instance < dp->ind_instance && mp->ind_next) {
1353 ASSERT(mp->ind_instance != dp->ind_instance);
1356 if (mp->ind_instance < dp->ind_instance) { /* end of list */
1357 dp->ind_next = NULL;
1358 mp->ind_next = dp;
1360 dp->ind_next = pp->ind_next;
1361 pp->ind_next = dp;
1371 in_drv_t *dp;
1382 for (dp = prevp->ind_next; dp; dp = dp->ind_next) {
1383 if (dp == mp) { /* found it */
1386 prevp = dp;
1389 ASSERT(dp == mp);
1423 in_drv_t *dp = np->in_drivers;
1424 while (dp) {
1425 if ((name = i_binding_to_drv_name(dp->ind_driver_name))
1427 name = dp->ind_driver_name;
1432 dp = dp->ind_next_drv;
1434 return (dp);
1520 in_drv_t *dp;
1533 for (dp = np->in_drivers; dp; dp = dp->ind_next_drv) {
1534 if (dp->ind_state == IN_PERMANENT) {
1535 rval = (*f)(path, np, dp, arg);