Lines Matching defs:node

43  * for use in print routine arg list as a shorthand way to locate node via
47 #define DRVINST(node) di_driver_name(node), di_instance(node)
53 static int scsi_cfg_creat_cb(di_minor_t minor, di_node_t node);
54 static int sbd_cfg_creat_cb(di_minor_t minor, di_node_t node);
55 static int usb_cfg_creat_cb(di_minor_t minor, di_node_t node);
57 static int pci_cfg_creat_cb(di_minor_t minor, di_node_t node);
58 static int ib_cfg_creat_cb(di_minor_t minor, di_node_t node);
59 static int sata_cfg_creat_cb(di_minor_t minor, di_node_t node);
60 static int sdcard_cfg_creat_cb(di_minor_t minor, di_node_t node);
160 scsi_cfg_creat_cb(di_minor_t minor, di_node_t node)
172 if ((devfs_path = di_devfs_path(node)) == NULL) {
197 (void) devfsadm_mklink(path, node, minor, 0);
203 sbd_cfg_creat_cb(di_minor_t minor, di_node_t node)
210 (void) devfsadm_mklink(path, node, minor, 0);
216 usb_cfg_creat_cb(di_minor_t minor, di_node_t node)
222 if ((cp = di_devfs_path(node)) == NULL) {
238 (void) devfsadm_mklink(path, node, minor, 0);
245 sata_cfg_creat_cb(di_minor_t minor, di_node_t node)
256 devfspath = di_devfs_path(node);
275 (void) devfsadm_mklink(l_path, node, minor, 0);
281 sdcard_cfg_creat_cb(di_minor_t minor, di_node_t node)
292 devfspath = di_devfs_path(node);
309 (void) devfsadm_mklink(l_path, node, minor, 0);
360 * Check if there is any usb_mid node in the middle
361 * and remove the node as if there is an extra '.'
369 /* Remove the usb_mid node immediately before the trailing path */
381 * returns an allocted string containing the device path for <node> and
385 pci_cfg_devpath(di_node_t node, di_minor_t minor)
392 path = di_devfs_path(node);
407 dev_t dev, di_node_t node, const char *prop_name, int **prop_data)
412 rv = di_prom_prop_lookup_ints(ph, node, prop_name, prop_data);
414 rv = di_prop_lookup_ints(dev, node, prop_name,
417 rv = di_prop_lookup_ints(dev, node, prop_name, prop_data);
419 rv = di_prom_prop_lookup_ints(ph, node, prop_name,
428 dev_t dev, di_node_t node, const char *prop_name, char **prop_data)
433 rv = di_prom_prop_lookup_strings(ph, node, prop_name,
436 rv = di_prop_lookup_strings(dev, node, prop_name,
439 rv = di_prop_lookup_strings(dev, node, prop_name, prop_data);
441 rv = di_prom_prop_lookup_strings(ph, node, prop_name,
449 pci_cfg_chassis_node(di_node_t node, di_prom_handle_t ph)
451 di_node_t curnode = node;
466 dev_t dev, di_node_t node, di_slot_name_t **prop_data)
471 rv = di_prom_prop_lookup_slot_names(ph, node, prop_data);
473 rv = di_prop_lookup_slot_names(dev, node, prop_data);
475 rv = di_prop_lookup_slot_names(dev, node, prop_data);
477 rv = di_prom_prop_lookup_slot_names(ph, node,
485 * device number <pci_dev> on bus <node>
488 pci_cfg_slotname(di_node_t node, di_prom_handle_t ph, minor_t pci_dev)
497 count = di_propall_lookup_slot_names(ph, 0, DDI_DEV_T_ANY, node,
511 fnm, (int)pci_dev, DI_PROP_SLOT_NAMES, DRVINST(node)));
520 * returns non-zero if we can return a valid attachment point name for <node>,
535 pci_cfg_ap_node(minor_t pci_dev, di_node_t node, di_prom_handle_t ph,
542 rv = di_propall_lookup_strings(ph, 0, DDI_DEV_T_ANY, node,
553 str = pci_cfg_slotname(node, ph, pci_dev);
560 if (di_propall_lookup_ints(ph, 0, DDI_DEV_T_ANY, node,
569 di_driver_name(node), di_instance(node), devtype, pci_dev);
576 * returns non-zero if we can return a valid expansion chassis name for <node>
596 pci_cfg_iob_name(di_minor_t minor, di_node_t node, di_prom_handle_t ph,
603 if (di_prop_lookup_int64(DDI_DEV_T_ANY, node, DI_PROP_SERID,
634 * returns the pci device number for <node> if found, else returns PCIDEV_NIL
637 pci_cfg_pcidev(di_node_t node, di_prom_handle_t ph)
642 rv = di_propall_lookup_ints(ph, 0, DDI_DEV_T_ANY, node, DI_PROP_REG,
647 "for %s%d\n", DI_PROP_REG, DRVINST(node)));
663 * up to <node>. We traverse up the device tree starting from <node>, naming
666 * nodes in between our current node and the topmost node of the chassis,
672 * by pci_cfg_ap_node() for <node> will be used
675 pci_cfg_ap_path(di_minor_t minor, di_node_t node, di_prom_handle_t ph,
694 di_node_t curnode = node;
718 "for %s%d\n", fnm, DRVINST(node)));
728 /* set chasflag when the leaf node is within an iob */
729 if ((curnode == node) != NULL)
734 dprint(("%s: cannot create ap node name "
735 "for %s%d\n", fnm, DRVINST(node)));
745 if (curnode != node) {
764 if (curnode == node)
775 * the pci device number of the current node is used to
777 * the current node is on
782 "for %s%d\n", fnm, DRVINST(node)));
798 * <node>'s name ONLY IF it has a serialid# which will make the apid
812 * if our name still won't fit <ap_pathsz>, then use the leaf <node>'s
816 rv = pci_cfg_ap_node(pci_dev, node, ph, buf, bufsz, APNODE_DEFNAME);
818 dprint(("%s: cannot create default ap node name for %s%d\n",
819 fnm, DRVINST(node)));
844 fnm, DRVINST(node), ap_pathsz));
862 * we use the name of the attachment point minor node if its pci device
868 pci_cfg_ap_legacy(di_minor_t minor, di_node_t node, di_prom_handle_t ph,
874 if (di_propall_lookup_ints(ph, 0, DDI_DEV_T_ANY, node, DI_PROP_AP_NAMES,
888 * determine if <node> qualifies for a path style apid
891 pci_cfg_is_ap_path(di_node_t node, di_prom_handle_t ph)
894 di_node_t curnode = node;
965 * <physpath> must include the minor node
1002 * takes a complete devinfo snapshot and returns the root node;
1003 * callers must do a di_fini() on the returned node;
1006 * if <pci_node> is not DI_NODE_NIL, it will search for the same devinfo node
1019 di_node_t node;
1038 node = di_drv_first_node(di_driver_name(pci_node), root_node);
1040 if (pci_inst == di_instance(node)) {
1041 *ret_node = node;
1044 } while ((node = di_drv_next_node(node)) != DI_NODE_NIL);
1046 if (node == DI_NODE_NIL)
1050 * found node, now search minors
1057 while ((minor = di_minor_next(node, minor)) != DI_MINOR_NIL) {
1083 di_node_t node;
1097 * snapshot and search for the target node
1099 root_node = pci_cfg_snapshot(pci_node, pci_minor, &node, &minor);
1100 if (root_node == DI_NODE_NIL || node == DI_NODE_NIL ||
1107 if (pci_cfg_is_ap_path(node, ph)) {
1108 rv = pci_cfg_ap_path(minor, node, ph, ap_path, ap_pathsz,
1130 devpath = pci_cfg_devpath(node, minor);
1136 (void) devfsadm_mklink(linkbuf, node, minor, 0);
1161 "file for %s%d\n", fnm, DRVINST(node)));
1166 rv = pci_cfg_ap_legacy(minor, node, ph, ap_path,
1173 (void) devfsadm_mklink(linkbuf, node, minor, 0);
1206 ib_cfg_creat_cb(di_minor_t minor, di_node_t node)
1211 if ((cp = di_devfs_path(node)) == NULL) {
1226 (void) devfsadm_mklink(path, node, minor, 0);