Lines Matching refs:ap_id

62 " cfgadm -c [configure|unconfigure|disconnect] ap_id [ap_id...]\n",
63 " cfgadm -x usb_reset ap_id [ap_id...]\n",
64 " cfgadm -x usb_config -o config=<index of desired configuration> ap_id\n",
321 * Some messages may display ap_id or errno, which is why they are passed
325 usb_err_msg(char **errstring, cfga_usb_ret_t rv, const char *ap_id, int l_errno)
366 /* These messages also print ap_id. */
368 "ap_id: ", ap_id, "", NULL);
389 set_msg(errstring, ERR_STR(rv), "ap_id: ", ap_id, "\n",
408 * Ensure the ap_id passed is in the correct (physical ap_id) form:
412 * Note the library always calls the plugin with a physical ap_id.
415 verify_valid_apid(const char *ap_id)
419 if (ap_id == NULL) {
423 l_ap_id = strrchr(ap_id, *MINOR_SEP);
427 /* Bad characters in the ap_id. */
432 /* ap_id has 1..2 or more than 2 dots */
445 const char *ap_id,
460 if (GET_DYN(ap_id) != NULL) {
461 DPRINTF("verify_params: dynamic ap_id passed\n");
465 if (verify_valid_apid(ap_id) != 0) {
466 DPRINTF("verify_params: not a USB ap_id.\n");
475 * Takes a validated ap_id and extracts the port number.
478 get_port_num(const char *ap_id, uint_t *port)
483 port_nbr_str = strrchr(ap_id, *MINOR_SEP) + strlen(MINOR_SEP);
484 if ((temp = strrchr(ap_id, (int)*PORT_SEPERATOR)) != 0) {
515 setup_for_devctl_cmd(const char *ap_id, devctl_hdl_t *devctl_hdl,
524 if ((*devctl_hdl = devctl_ap_acquire((char *)ap_id, oflag)) == NULL) {
541 if ((rv = get_port_num(ap_id, &port)) != CFGA_USB_OK) {
623 do_control_ioctl(const char *ap_id, uint_t subcommand, uint_t arg,
636 if ((rv = get_port_num(ap_id, &port)) != CFGA_USB_OK) {
640 if ((fd = open(ap_id, O_RDONLY)) == -1) {
731 * represented by ap_id will henceforth be initialized to the desired
735 set_configuration(const char *ap_id, uint_t config, char *driver,
744 DPRINTF("set_configuration: ap_id: %s, config:%d\n", ap_id, config);
756 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_STRING,
767 dev_path = usb_get_devicepath(ap_id);
805 if ((rv = do_control_ioctl(ap_id, HUBD_REFRESH_DEVDB, NULL,
828 get_config(const char *ap_id, uint_t *config)
834 if ((rv = do_control_ioctl(ap_id, HUBD_GET_CURRENT_CONFIG, NULL,
887 fill_in_ap_info(const char *ap_id, char *info_buf, size_t info_size)
903 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_DEV, NULL,
912 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_STRING,
927 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_STRING,
941 if ((rv = get_config(ap_id, &config)) != CFGA_USB_OK) {
948 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_STRING,
1003 const char *ap_id,
1022 if ((rv = verify_params(ap_id, options, errstring)) != CFGA_USB_OK) {
1036 if ((rv = setup_for_devctl_cmd(ap_id, &hdl, &nvl, 0)) !=
1059 devpath = usb_get_devicepath(ap_id);
1069 devpath = usb_get_devicepath(ap_id);
1095 strlen("Unconfigure") + strlen(ap_id);
1098 USB_CONFIRM_0, ap_id, USB_CONFIRM_1);
1107 devpath = usb_get_devicepath(ap_id);
1114 if ((rv = usb_rcm_offline(ap_id, errstring, devpath, flags)) !=
1127 (void) usb_rcm_online(ap_id, errstring, devpath, flags);
1129 (void) usb_rcm_remove(ap_id, errstring, devpath, flags);
1146 strlen("Disconnect") + strlen(ap_id);
1149 USB_CONFIRM_0, ap_id, USB_CONFIRM_1);
1158 devpath = usb_get_devicepath(ap_id);
1167 if ((rv = usb_rcm_offline(ap_id, errstring,
1182 (void) usb_rcm_online(ap_id, errstring,
1187 (void) usb_rcm_remove(ap_id, errstring,
1208 return (usb_err_msg(errstring, rv, ap_id, errno));
1216 const char *ap_id,
1234 if ((rv = verify_params(ap_id, NULL, errstring)) != CFGA_USB_OK) {
1236 return (usb_err_msg(errstring, rv, ap_id, errno));
1253 if ((rv = setup_for_devctl_cmd(ap_id, &hdl, &list, 0)) !=
1266 strlen("Reset") + strlen(ap_id);
1269 USB_CONFIRM_0, ap_id, USB_CONFIRM_1);
1364 strlen("Setting") + strlen(ap_id) +
1370 USB_CONFIRM_0, ap_id, config, USB_CONFIRM_1);
1385 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_DEV, NULL,
1400 if ((rv = get_config(ap_id, &actual_config)) != CFGA_USB_OK) {
1414 if ((rv = set_configuration(ap_id, config, driver,
1437 return (usb_err_msg(errstring, rv, ap_id, errno));
1444 const char *ap_id,
1458 const char *ap_id,
1476 if ((rv = verify_params(ap_id, options, errstring)) != CFGA_USB_OK) {
1489 if ((rv = setup_for_devctl_cmd(ap_id, &devctl_hdl, &user_nvlist,
1521 /* Get /dev/cfg path to corresponding to the physical ap_id */
1523 rv = (cfga_usb_ret_t)physpath_to_devlink(CFGA_DEV_DIR, (char *)ap_id,
1543 (void) strlcpy((*ap_id_list)->ap_phys_id, ap_id,
1604 if ((rv = fill_in_ap_info(ap_id, (*ap_id_list)->ap_info,
1611 if ((rv = do_control_ioctl(ap_id, HUBD_GET_CFGADM_NAME, NULL,
1641 return (usb_err_msg(errstring, rv, ap_id, errno));
1650 return (usb_err_msg(errstring, rv, ap_id, errno));
1723 usb_get_devicepath(const char *ap_id)
1729 rv = do_control_ioctl(ap_id, HUBD_GET_DEVICE_PATH, NULL,