Lines Matching defs:node

58 static dev_info_t *s1394_create_devinfo(s1394_hal_t *hal, s1394_node_t *node,
124 * It adds "hp-node", "reg", "compatible" properties to the devinfo
133 s1394_create_devinfo(s1394_hal_t *hal, s1394_node_t *node, uint32_t *unit_dir,
162 node->node_guid_hi, tnf_uint, guid_lo, node->node_guid_lo);
166 /* Allocate and init a new device node instance. */
172 " (node's GUID %08x%08x)", node->node_guid_hi,
173 node->node_guid_lo);
176 node->node_guid_hi, tnf_uint, guid_lo, node->node_guid_lo);
182 /* Add "hp-node" property */
183 result = ndi_prop_update_int(DDI_DEV_T_NONE, target_dip, "hp-node", 0);
185 cmn_err(CE_NOTE, "!Unable to add \"hp-node\" property"
186 " (node's GUID %08x%08x)", node->node_guid_hi,
187 node->node_guid_lo);
193 node->node_guid_hi, tnf_uint, guid_lo, node->node_guid_lo,
208 root_dir = CFGROM_ROOT_DIR(node->cfgrom);
340 " (node's GUID %08x%08x)", node->node_guid_hi,
341 node->node_guid_lo);
352 node->node_guid_hi, tnf_uint, guid_lo, node->node_guid_lo,
367 reg[0] = node->node_guid_hi;
368 reg[1] = node->node_guid_lo;
388 node->node_guid_hi, tnf_uint, guid_lo, node->node_guid_lo,
405 * name and address of each child node by looking up the reg property on
406 * the node and compares the built name@addr with the name@addr passed in.
411 * set and that won't happen unless the node goes through INITCHILD
475 * Parses the config rom for the passed in node and creates/updates devinfo's
482 * thread). The node is marked as parsed before returning.
485 s1394_update_devinfo_tree(s1394_hal_t *hal, s1394_node_t *node)
502 ASSERT(CFGROM_PARSED(node) == B_FALSE);
503 ASSERT(node->cfgrom != NULL);
507 node->node_num, tnf_opaque, cfgrom, node->cfgrom);
510 root_dir = CFGROM_ROOT_DIR(node->cfgrom);
512 if (node->cfgrom_valid_size < CFGROM_DIR_LEN(root_dir))
513 dir_len = node->cfgrom_valid_size;
518 if (s1394_valid_dir(hal, node, key, root_dir) == B_FALSE) {
520 "!Bad root directory in config rom (node's GUID %08x%08x)",
521 node->node_guid_hi, node->node_guid_lo);
527 SET_CFGROM_PARSED(node);
528 CLEAR_CFGROM_GEN_CHANGED(node); /* if set */
529 CLEAR_CFGROM_NEW_ALLOC(node);
539 if (s1394_valid_dir(hal, node, key, ptr) == B_TRUE) {
543 " rom (node's GUID %08x%08x)",
544 node->node_guid_hi, node->node_guid_lo);
547 guid_hi, node->node_guid_hi, tnf_uint,
548 guid_lo, node->node_guid_lo);
562 node->node_guid_hi, node->node_guid_lo, hi, lo);
565 node->node_guid_hi, node->node_guid_lo);
575 target->on_node = node;
579 if ((t = node->target_list) != NULL) {
587 node->target_list = target;
590 target->target_list = node->target_list;
599 tdip = s1394_create_devinfo(hal, node,
631 tnf_int, node_num, node->node_num,
632 tnf_opaque, cfgrom, node->cfgrom,
647 SET_CFGROM_PARSED(node);
648 CLEAR_CFGROM_GEN_CHANGED(node); /* if set */
649 CLEAR_CFGROM_NEW_ALLOC(node);
659 * Offlines a node. This involves marking all targets attached to the
660 * node as gone, invoking any remove event callbacks and calling
662 * directory on the node). The tree is unlocked and relocked around
667 s1394_offline_node(s1394_hal_t *hal, s1394_node_t *node)
680 node_num = node->node_num;
689 t = node->target_list;
701 root_dir = CFGROM_ROOT_DIR(node->cfgrom);
703 if (node->cfgrom_valid_size < CFGROM_DIR_LEN(root_dir))
704 dir_len = node->cfgrom_valid_size;
715 if (s1394_valid_dir(hal, node, key, ptr) == B_TRUE) {
730 node->node_guid_hi, node->node_guid_lo, hi, lo);
733 node->node_guid_hi, node->node_guid_lo);
741 node->old_node = NULL;
774 * Walks the topology tree, processing each node. If node that has
776 * for the node. Also, if the node exists in both old & new trees, ASSERTS
777 * that both point to the same config rom. If the node has valid config
779 * to parse and create devinfos for the node. Kicks off further config
780 * rom reading if only the bus info block for the node is read.
792 s1394_node_t *node, *onode;
820 node = &hal->topology_tree[i];
825 tnf_int, parsed, CFGROM_PARSED(node),
826 tnf_int, matched, NODE_MATCHED(node),
827 tnf_int, visited, NODE_VISITED(node));
829 if (LINK_ACTIVE(node) == B_FALSE) {
833 if (node->cfgrom == NULL) {
838 onode = node->old_node;
840 if (onode != NULL && onode->cfgrom != NULL && node->cfgrom !=
843 * onode->cfgrom != node->cfgrom should have been
846 if (onode->cfgrom != node->cfgrom)
850 CFGROM_GEN_CHANGED(node), tnf_int, parsed,
851 CFGROM_PARSED(node), tnf_opaque, old_cfgrom,
853 node->cfgrom);
854 ASSERT(onode->cfgrom == node->cfgrom);
857 if (CFGROM_PARSED(node) == B_FALSE && CFGROM_ALL_READ(node) ==
859 ASSERT((node->cfgrom_size <
861 NODE_MATCHED(node) == B_TRUE);
863 ASSERT(node->target_list == NULL);
865 if (s1394_update_devinfo_tree(hal, node) ==
877 } else if (CFGROM_PARSED(node) == B_FALSE && CFGROM_BIB_READ(
878 node) == B_TRUE) {
879 if (s1394_read_rest_of_cfgrom(hal, node, &status) !=
946 * NODE_MATCHED(onode) == 0 indicates this node doesn't exist
969 "lock failed while processing node", tnf_uint,
1021 msg, "failure from offline node", tnf_uint,
1065 * adds target to the list of targets hanging off the node. Figures out
1066 * the node by searching the topology tree for the GUID corresponding
1067 * to the target. Points on_node field of target structure at the node.
1107 /* Search the HAL's node list for this GUID */
1130 * node
1149 * Removes target from the corresponding node's target_list.