Lines Matching defs:connection
71 static int iov_hp_add(const char *parent, const char *connection, uint_t flags,
73 static int iov_hp_remove(const char *parent, const char *connection,
75 static void i_iov_path_to_connection(char *subpath, char *connection,
81 static int cmd_install(cmd_t cmd, char *path, char *connection,
83 static int cmd_changestate(cmd_t cmd, char *path, char *connection,
85 static int cmd_set_state_ceiling(char *path, char *connection, int state,
87 static int cmd_clear_state_ceiling(char *path, char *connection,
111 iov_hp_add(const char *parent, const char *connection, uint_t flags,
119 if (parent == NULL || connection == NULL) {
134 rv = hp_create_port(node, connection, resultsp);
137 connection, hp_name(node));
145 node = hp_init(parent, connection, 0);
164 node = hp_init(parent, connection, 0);
176 iov_hp_remove(const char *parent, const char *connection, uint_t flags,
183 if (parent == NULL || connection == NULL) {
190 node = hp_init(parent, connection, 0);
192 i_iov_dprintf("iov_hp_remove: %s doesn't exist\n", connection);
198 i_iov_dprintf("iov_hp_remove: %s is not a port\n", connection);
228 char connection[MAXPATHLEN];
231 (void) snprintf(connection, MAXPATHLEN, "pci.%x", rc_address);
233 rv = iov_hp_add("/", connection, 0, &results);
250 char connection[MAXPATHLEN];
258 (void) snprintf(connection, MAXPATHLEN, "pci.%x", rc_address);
260 rv = iov_hp_remove("/", connection, flags, &results);
332 change_endpoints_state(char *path, char *connection, hp_node_t *results,
347 if ((root = hp_init(path, connection, 0)) == NULL) {
349 "errno %d\n", path, connection, errno);
377 char connection[MAXPATHLEN];
386 (void) memset(connection, 0, MAXPATHLEN);
404 /* Get the connection name according to the last device node name */
405 i_iov_path_to_connection(prev, connection, B_FALSE);
406 i_iov_dprintf("Connection: %s\n", connection);
410 * corresponding to the connection; and then get the parent path (start
429 rv = iov_hp_remove(parentpath, connection, flags, &results);
431 rv = change_endpoints_state(parentpath, connection, &results,
452 char connection[MAXPATHLEN];
462 (void) memset(connection, 0, MAXPATHLEN);
493 i_iov_path_to_connection(slash + 1, connection,
495 node = hp_init("/", connection, 0);
497 i_iov_path_to_connection(slash + 1, connection,
499 node = hp_init(subpath, connection, 0);
501 i_iov_dprintf("path-end %s connection %s\n", slash + 1,
502 connection);
506 "subpath: %s, conn:%s\n", subpath, connection);
515 "subpath: %s, conn:%s\n", subpath, connection);
522 connection, &results, CMD_ONLINE);
524 "rv %d\n", subpath, connection, rv);
563 i_iov_path_to_connection(port + 1, connection, B_FALSE);
564 i_iov_dprintf("iov_hp_add: connection: %s parent: %s\n",
565 connection, subpath);
575 rv = iov_hp_add(subpath, connection, 0, &results);
582 rv = iov_hp_add(subpath, connection, HPPROBEONE,
768 * Derive connection name "pci.x,y" from sub-path name "/pci@x,y".
772 i_iov_path_to_connection(char *subpath, char *connection, boolean_t is_rc)
778 (void) snprintf(connection, MAXPATHLEN, "pci.%s", &tmp[1]);
783 * case, need to append function number 0 to the connection
786 (void) strcat(connection, ",0");
791 iov_hp_online(char *path, char *connection, char **error_str)
796 rv = cmd_install(CMD_INSTALL, path, connection, &results);
804 rv = cmd_changestate(CMD_ONLINE, path, connection, 0, &results);
819 iov_hp_offline(char *path, char *connection, uint_t flags, char **error_str)
825 rv = cmd_changestate(CMD_OFFLINE, path, connection, HPQUERY,
833 rv = cmd_install(CMD_UNINSTALL, path, connection, &results);
841 rv = cmd_changestate(CMD_OFFLINE, path, connection, 0, &results);
850 iov_hp_set_offline_ceiling(char *path, char *connection,
856 rv = cmd_set_state_ceiling(path, connection, DDI_HP_CN_STATE_OFFLINE,
865 iov_hp_clear_offline_ceiling(char *path, char *connection, uint32_t handle,
871 rv = cmd_clear_state_ceiling(path, connection, handle, &results);
881 * Given a path and connection name, select and open the target
885 open_target(char *path, char *connection, int flags, open_cbarg_t *cbarg)
894 /* Try to open the specified path and connection */
895 if ((root = hp_init(path, connection, flags)) != NULL) {
922 cmd_install(cmd_t cmd, char *path, char *connection, hp_node_t *resultsp)
928 /* Path and connection are required */
929 if ((path == NULL) || (connection == NULL)) {
935 if ((rv = open_target(path, connection, 0, &cbarg)) != 0) {
970 cmd_changestate(cmd_t cmd, char *path, char *connection, int flags,
990 if ((rv = open_target(path, connection, 0, &cbarg)) != 0) {
1018 cmd_set_state_ceiling(char *path, char *connection, int state,
1027 if ((rv = open_target(path, connection, 0, &cbarg)) != 0) {
1052 cmd_clear_state_ceiling(char *path, char *connection, uint32_t handle,
1062 if ((rv = open_target(path, connection, 0, &cbarg)) != 0) {
1164 gettext("ERROR: no such path or connection.\n"));
1202 static char connection[MAXPATHLEN];
1209 if (hp_path(node, path, connection) == 0)