Lines Matching defs:ap_id

60 " cfgadm -c [configure|unconfigure|disconnect] ap_id [ap_id...]\n",
61 " cfgadm -x usb_reset ap_id [ap_id...]\n",
62 " cfgadm -x usb_config -o config=<index of desired configuration> ap_id\n",
319 * Some messages may display ap_id or errno, which is why they are passed
323 usb_err_msg(char **errstring, cfga_usb_ret_t rv, const char *ap_id, int l_errno)
364 /* These messages also print ap_id. */
366 "ap_id: ", ap_id, "", NULL);
387 set_msg(errstring, ERR_STR(rv), "ap_id: ", ap_id, "\n",
406 * Ensure the ap_id passed is in the correct (physical ap_id) form:
410 * Note the library always calls the plugin with a physical ap_id.
413 verify_valid_apid(const char *ap_id)
417 if (ap_id == NULL) {
421 l_ap_id = strrchr(ap_id, *MINOR_SEP);
425 /* Bad characters in the ap_id. */
430 /* ap_id has 1..2 or more than 2 dots */
443 const char *ap_id,
458 if (GET_DYN(ap_id) != NULL) {
459 DPRINTF("verify_params: dynamic ap_id passed\n");
463 if (verify_valid_apid(ap_id) != 0) {
464 DPRINTF("verify_params: not a USB ap_id.\n");
473 * Takes a validated ap_id and extracts the port number.
476 get_port_num(const char *ap_id, uint_t *port)
481 port_nbr_str = strrchr(ap_id, *MINOR_SEP) + strlen(MINOR_SEP);
482 if ((temp = strrchr(ap_id, (int)*PORT_SEPERATOR)) != 0) {
513 setup_for_devctl_cmd(const char *ap_id, devctl_hdl_t *devctl_hdl,
522 if ((*devctl_hdl = devctl_ap_acquire((char *)ap_id, oflag)) == NULL) {
539 if ((rv = get_port_num(ap_id, &port)) != CFGA_USB_OK) {
621 do_control_ioctl(const char *ap_id, uint_t subcommand, uint_t arg,
634 if ((rv = get_port_num(ap_id, &port)) != CFGA_USB_OK) {
638 if ((fd = open(ap_id, O_RDONLY)) == -1) {
729 * represented by ap_id will henceforth be initialized to the desired
733 set_configuration(const char *ap_id, uint_t config, char *driver,
742 DPRINTF("set_configuration: ap_id: %s, config:%d\n", ap_id, config);
754 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_STRING,
765 dev_path = usb_get_devicepath(ap_id);
803 if ((rv = do_control_ioctl(ap_id, HUBD_REFRESH_DEVDB, NULL,
826 get_config(const char *ap_id, uint_t *config)
832 if ((rv = do_control_ioctl(ap_id, HUBD_GET_CURRENT_CONFIG, NULL,
885 fill_in_ap_info(const char *ap_id, char *info_buf, size_t info_size)
901 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_DEV, NULL,
910 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_STRING,
925 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_STRING,
939 if ((rv = get_config(ap_id, &config)) != CFGA_USB_OK) {
946 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_STRING,
1001 const char *ap_id,
1020 if ((rv = verify_params(ap_id, options, errstring)) != CFGA_USB_OK) {
1034 if ((rv = setup_for_devctl_cmd(ap_id, &hdl, &nvl, 0)) !=
1057 devpath = usb_get_devicepath(ap_id);
1067 devpath = usb_get_devicepath(ap_id);
1093 strlen("Unconfigure") + strlen(ap_id);
1096 USB_CONFIRM_0, ap_id, USB_CONFIRM_1);
1105 devpath = usb_get_devicepath(ap_id);
1112 if ((rv = usb_rcm_offline(ap_id, errstring, devpath, flags)) !=
1125 (void) usb_rcm_online(ap_id, errstring, devpath, flags);
1127 (void) usb_rcm_remove(ap_id, errstring, devpath, flags);
1144 strlen("Disconnect") + strlen(ap_id);
1147 USB_CONFIRM_0, ap_id, USB_CONFIRM_1);
1156 devpath = usb_get_devicepath(ap_id);
1165 if ((rv = usb_rcm_offline(ap_id, errstring,
1180 (void) usb_rcm_online(ap_id, errstring,
1185 (void) usb_rcm_remove(ap_id, errstring,
1206 return (usb_err_msg(errstring, rv, ap_id, errno));
1214 const char *ap_id,
1232 if ((rv = verify_params(ap_id, NULL, errstring)) != CFGA_USB_OK) {
1234 return (usb_err_msg(errstring, rv, ap_id, errno));
1251 if ((rv = setup_for_devctl_cmd(ap_id, &hdl, &list, 0)) !=
1264 strlen("Reset") + strlen(ap_id);
1267 USB_CONFIRM_0, ap_id, USB_CONFIRM_1);
1362 strlen("Setting") + strlen(ap_id) +
1368 USB_CONFIRM_0, ap_id, config, USB_CONFIRM_1);
1383 if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_DEV, NULL,
1398 if ((rv = get_config(ap_id, &actual_config)) != CFGA_USB_OK) {
1412 if ((rv = set_configuration(ap_id, config, driver,
1435 return (usb_err_msg(errstring, rv, ap_id, errno));
1442 const char *ap_id,
1456 const char *ap_id,
1474 if ((rv = verify_params(ap_id, options, errstring)) != CFGA_USB_OK) {
1487 if ((rv = setup_for_devctl_cmd(ap_id, &devctl_hdl, &user_nvlist,
1519 /* Get /dev/cfg path to corresponding to the physical ap_id */
1521 rv = (cfga_usb_ret_t)physpath_to_devlink(CFGA_DEV_DIR, (char *)ap_id,
1541 (void) strlcpy((*ap_id_list)->ap_phys_id, ap_id,
1602 if ((rv = fill_in_ap_info(ap_id, (*ap_id_list)->ap_info,
1609 if ((rv = do_control_ioctl(ap_id, HUBD_GET_CFGADM_NAME, NULL,
1639 return (usb_err_msg(errstring, rv, ap_id, errno));
1648 return (usb_err_msg(errstring, rv, ap_id, errno));
1721 usb_get_devicepath(const char *ap_id)
1727 rv = do_control_ioctl(ap_id, HUBD_GET_DEVICE_PATH, NULL,