Lines Matching refs:mod

134 	topo_mod_t *hmod, *mod = node->tn_enum;
139 topo_dprintf(mod->tm_hdl, TOPO_DBG_MODSVC, "destroying node %s=%d\n",
173 if (mod->tm_info->tmi_ops->tmo_release != NULL)
174 mod->tm_info->tmi_ops->tmo_release(mod, node);
176 topo_method_unregister_all(mod, node);
199 topo_mod_free(mod, node, sizeof (tnode_t));
200 topo_mod_rele(mod);
275 node_create_seterror(topo_mod_t *mod, tnode_t *pnode, topo_nodehash_t *nhp,
280 topo_dprintf(mod->tm_hdl, TOPO_DBG_ERR, "unable to insert child:"
285 topo_mod_strfree(mod, nhp->th_name);
287 topo_mod_free(mod, nhp->th_nodearr,
290 topo_mod_free(mod, nhp, sizeof (topo_nodehash_t));
293 return (topo_mod_seterrno(mod, err));
297 topo_node_range_create(topo_mod_t *mod, tnode_t *pnode, const char *name,
310 return (node_create_seterror(mod, pnode, NULL,
315 return (node_create_seterror(mod, pnode, NULL,
318 if ((nhp = topo_mod_zalloc(mod, sizeof (topo_nodehash_t))) == NULL)
319 return (node_create_seterror(mod, pnode, nhp, EMOD_NOMEM));
321 if ((nhp->th_name = topo_mod_strdup(mod, name)) == NULL)
322 return (node_create_seterror(mod, pnode, nhp, EMOD_NOMEM));
326 if ((nhp->th_nodearr = topo_mod_zalloc(mod,
328 return (node_create_seterror(mod, pnode, nhp, EMOD_NOMEM));
332 nhp->th_enum = mod;
333 topo_mod_hold(mod);
341 topo_dprintf(mod->tm_hdl, TOPO_DBG_MODSVC,
352 topo_mod_t *mod;
373 mod = nhp->th_enum;
375 topo_mod_strfree(mod, nhp->th_name);
377 topo_mod_free(mod, nhp->th_nodearr,
380 topo_mod_free(mod, nhp, sizeof (topo_nodehash_t));
381 topo_mod_rele(mod);
424 node_bind_seterror(topo_mod_t *mod, tnode_t *pnode, tnode_t *node,
430 (void) topo_mod_seterrno(mod, err);
435 topo_dprintf(mod->tm_hdl, TOPO_DBG_ERR, "unable to bind %s=%d: "
446 topo_node_bind(topo_mod_t *mod, tnode_t *pnode, const char *name,
460 return (node_bind_seterror(mod, pnode, NULL,
465 return (node_bind_seterror(mod, pnode, NULL,
474 return (node_bind_seterror(mod, pnode, NULL, B_TRUE,
477 if ((node = topo_mod_zalloc(mod, sizeof (tnode_t))) == NULL)
478 return (node_bind_seterror(mod, pnode, NULL, B_TRUE,
483 node->tn_enum = mod;
484 node->tn_hdl = mod->tm_hdl;
492 topo_mod_hold(mod);
495 return (node_bind_seterror(mod, pnode, node, B_TRUE,
499 return (node_bind_seterror(mod, pnode, node, B_TRUE, err));
503 return (node_bind_seterror(mod, pnode, node, B_TRUE, err));
505 topo_dprintf(mod->tm_hdl, TOPO_DBG_MODSVC,
532 topo_node_facbind(topo_mod_t *mod, tnode_t *pnode, const char *name,
544 if (topo_node_range_create(mod, pnode, name, 0, 0) < 0)
545 return (NULL); /* mod errno set */
556 return (node_bind_seterror(mod, pnode, NULL,
562 return (node_bind_seterror(mod, pnode, NULL,
573 return (node_bind_seterror(mod, pnode, NULL, B_FALSE,
576 if ((node = topo_mod_zalloc(mod, sizeof (tnode_t))) == NULL) {
578 return (node_bind_seterror(mod, pnode, NULL, B_FALSE,
584 node->tn_enum = mod;
585 node->tn_hdl = mod->tm_hdl;
594 topo_mod_hold(mod);
598 return (node_bind_seterror(mod, pnode, node, B_FALSE, err));
600 if (topo_mod_nvalloc(mod, &fnvl, NV_UNIQUE_NAME) < 0) {
602 return (node_bind_seterror(mod, pnode, node, B_FALSE,
609 return (node_bind_seterror(mod, pnode, node, B_FALSE,
616 return (node_bind_seterror(mod, pnode, node, B_FALSE, err));
623 return (node_bind_seterror(mod, pnode, node, B_FALSE,
633 return (node_bind_seterror(mod, pnode, node, B_FALSE, err));
638 topo_dprintf(mod->tm_hdl, TOPO_DBG_MODSVC,
795 topo_node_walk_init(topo_hdl_t *thp, topo_mod_t *mod, tnode_t *node,
836 wp->tw_mod = mod;