Lines Matching defs:ap_id

60 	" cfgadm -c [configure|unconfigure|disconnect|connect] ap_id "
61 "[ap_id...]\n",
62 " cfgadm -x sata_reset_port ap_id [ap_id...]\n",
63 " cfgadm -x sata_reset_device ap_id [ap_id...]\n",
64 " cfgadm -x sata_reset_all ap_id\n",
65 " cfgadm -x sata_port_deactivate ap_id [ap_id...]\n",
66 " cfgadm -x sata_port_activate ap_id [ap_id...]\n",
67 " cfgadm -x sata_port_self_test ap_id [ap_id...]\n",
68 " cfgadm -t ap_id\n",
223 verify_params(const char *ap_id, const char *options, char **errstring);
227 setup_for_devctl_cmd(const char *ap_id, devctl_hdl_t *devctl_hdl,
235 do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
242 sata_get_devicepath(const char *ap_id);
248 get_port_num(const char *ap_id, uint32_t *port);
451 * Some messages may display ap_id or errno, which is why they are passed
459 const char *ap_id,
517 /* These messages also print ap_id. */
518 set_msg(errstring, ERR_STR(rv), "ap_id: ", ap_id, "", NULL);
538 set_msg(errstring, ERR_STR(rv), "ap_id: ", ap_id, "\n",
564 const char *ap_id,
594 if ((rv = verify_params(ap_id, options, errstring)) != CFGA_SATA_OK) {
599 if ((rv = setup_for_devctl_cmd(ap_id, &hdl, &nvl,
605 lap_id = strdup(ap_id);
643 if (GET_DYN(ap_id) != NULL) {
659 devpath = sata_get_devicepath(ap_id);
669 devpath = sata_get_devicepath(ap_id);
701 if ((pdyn = GET_DYN(ap_id)) != NULL) {
709 strlen("Unconfigure") + strlen(ap_id);
713 SATA_CONFIRM_DEVICE, ap_id,
724 devpath = sata_get_devicepath(ap_id);
732 if ((rv = sata_rcm_offline(ap_id, errstring, devpath, flags))
744 (void) sata_rcm_online(ap_id, errstring, devpath,
747 (void) sata_rcm_remove(ap_id, errstring, devpath,
766 if ((pdyn = GET_DYN(ap_id)) != NULL) {
781 devpath = sata_get_devicepath(ap_id);
791 strlen("Disconnect") + strlen(ap_id);
796 SATA_CONFIRM_DEVICE, ap_id,
806 if ((rv = sata_rcm_offline(ap_id, errstring,
818 (void) sata_rcm_online(ap_id, errstring,
834 (void) sata_rcm_remove(ap_id, errstring,
842 strlen("Deactivate Port") + strlen(ap_id);
847 SATA_CONFIRM_PORT, ap_id,
877 strlen("Activate Port") + strlen(ap_id);
881 SATA_CONFIRM_PORT, ap_id,
890 if (GET_DYN(ap_id) != NULL) {
922 return (sata_err_msg(errstring, rv, ap_id, errno));
929 const char *ap_id,
946 if ((rv = verify_params(ap_id, NULL, errstring)) != CFGA_SATA_OK) {
948 return (sata_err_msg(errstring, rv, ap_id, errno));
966 if ((rv = setup_for_devctl_cmd(ap_id, &hdl, &list, 0)) !=
972 if ((str_p = GET_DYN(ap_id)) != NULL) {
981 strlen("Reset Port") + strlen(ap_id);
986 SATA_CONFIRM_PORT, ap_id,
998 rv = do_control_ioctl(ap_id, SATA_CFGA_RESET_PORT, NULL,
1015 strlen("Reset Device") + strlen(ap_id);
1020 SATA_CONFIRM_DEVICE, ap_id,
1032 rv = do_control_ioctl(ap_id, SATA_CFGA_RESET_DEVICE, NULL,
1038 strlen("Reset All") + strlen(ap_id);
1043 SATA_CONFIRM_CONTROLLER, ap_id,
1054 rv = do_control_ioctl(ap_id, SATA_CFGA_RESET_ALL, NULL,
1060 strlen("Deactivate Port") + strlen(ap_id);
1065 SATA_CONFIRM_PORT, ap_id,
1076 rv = do_control_ioctl(ap_id, SATA_CFGA_PORT_DEACTIVATE, NULL,
1082 strlen("Activate Port") + strlen(ap_id);
1087 SATA_CONFIRM_PORT, ap_id,
1098 rv = do_control_ioctl(ap_id, SATA_CFGA_PORT_ACTIVATE,
1105 strlen("Self Test Port") + strlen(ap_id);
1110 SATA_CONFIRM_PORT, ap_id,
1121 rv = do_control_ioctl(ap_id, SATA_CFGA_PORT_SELF_TEST,
1131 return (sata_err_msg(errstring, rv, ap_id, errno));
1139 const char *ap_id,
1247 sata_make_dyncomp(const char *ap_id, char **dyncomp, const char *type)
1269 devpath = sata_get_devicepath(ap_id);
1424 const char *ap_id,
1444 if ((rv = verify_params(ap_id, options, errstring)) != CFGA_SATA_OK) {
1449 if ((pdyn = GET_DYN(ap_id)) != NULL) {
1460 if ((rv = setup_for_devctl_cmd(ap_id, &devctl_hdl, &user_nvlist,
1489 /* Get /dev/cfg path to corresponding to the physical ap_id */
1491 rv = physpath_to_devlink(CFGA_DEV_DIR, (char *)ap_id,
1499 /* Get logical ap_id corresponding to the physical */
1512 (void) strlcpy((*ap_id_list)->ap_phys_id, ap_id,
1586 if ((rv = do_control_ioctl(ap_id, SATA_CFGA_GET_MODEL_INFO,
1612 if ((rv = do_control_ioctl(ap_id,
1639 if ((rv = do_control_ioctl(ap_id,
1665 if ((rv = do_control_ioctl(ap_id, SATA_CFGA_GET_AP_TYPE, NULL,
1692 * a dynamic component of the ap_id, i.e. device.
1694 rv = sata_make_dyncomp(ap_id, &dyncomp,
1710 if (get_port_num(ap_id, &port) != SATA_CFGA_OK) {
1723 return (sata_err_msg(errstring, rv, ap_id, errno));
1733 return (sata_err_msg(errstring, rv, ap_id, errno));
1790 * Ensure the ap_id passed is in the correct (physical ap_id) form:
1794 * Note the library always calls the plugin with a physical ap_id.
1797 verify_valid_apid(const char *ap_id)
1801 if (ap_id == NULL)
1804 l_ap_id = strrchr(ap_id, (int)*MINOR_SEP);
1808 /* Bad characters in the ap_id */
1813 /* ap_id has 1..2 or more than 2 dots */
1827 const char *ap_id,
1843 lap_id = strdup(ap_id);
1862 * Takes a validated ap_id and extracts the port number.
1866 get_port_num(const char *ap_id, uint32_t *port)
1872 cport_str = strrchr(ap_id, (int)*MINOR_SEP) + strlen(MINOR_SEP);
1882 if ((pmport_str = strrchr(ap_id, (int)*PORT_SEPARATOR)) != 0) {
1911 const char *ap_id,
1921 lap_id = strdup(ap_id);
1947 * complicated because of "port.port" format in ap_id, thus for
2002 do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
2015 if ((rv = get_port_num(ap_id, &port)) != CFGA_SATA_OK) {
2019 if ((fd = open(ap_id, O_RDONLY)) == -1) {
2114 sata_get_devicepath(const char *ap_id)
2120 rv = do_control_ioctl(ap_id, SATA_CFGA_GET_DEVICE_PATH, NULL,