Lines Matching refs:textbuf

101 static void get_chip_type(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
102 static void get_tgt_rscn_delay(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
103 static void get_tgt_rscn_period(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
104 static void get_inject_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
105 static void get_inject_free_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
106 static void get_inject_drop_data(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
107 static void get_inject_drop_resp(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
108 static void get_cmd_err_inject(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
109 static void get_cmd_delay_value(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
110 static void get_nv_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
111 static void get_nv_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
112 static void get_loglevel(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
113 static void get_node_abort_cnt(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
221 ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbuf) in ocs_mgmt_get_list() argument
227 ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get_list()
240 ocs_mgmt_emit_property_name(textbuf, access, mgmt_table[i].name); in ocs_mgmt_get_list()
244 ocs->mgmt_functions->get_list_handler(textbuf, ocs); in ocs_mgmt_get_list()
248 ocs->tgt_mgmt_functions->get_list_handler(textbuf, &(ocs->tgt_ocs)); in ocs_mgmt_get_list()
256 domain->mgmt_functions->get_list_handler(textbuf, domain); in ocs_mgmt_get_list()
262 ocs_mgmt_end_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get_list()
293 ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in ocs_mgmt_get() argument
300 ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get()
311 mgmt_table[i].get_handler(ocs, name, textbuf); in ocs_mgmt_get()
312 ocs_mgmt_end_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get()
319 retval = ocs->mgmt_functions->get_handler(textbuf, qualifier, (char*)name, ocs); in ocs_mgmt_get()
324 retval = ocs->tgt_mgmt_functions->get_handler(textbuf, qualifier, in ocs_mgmt_get()
335 retval = domain->mgmt_functions->get_handler(textbuf, qualifier, (char*)name, domain); in ocs_mgmt_get()
346 ocs_mgmt_end_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get()
523 ocs_mgmt_get_all(ocs_t *ocs, ocs_textbuf_t *textbuf) in ocs_mgmt_get_all() argument
528 ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get_all()
532 mgmt_table[i].get_handler(ocs, mgmt_table[i].name, textbuf); in ocs_mgmt_get_all()
536 ocs_mgmt_emit_property_name(textbuf, MGMT_MODE_EX, mgmt_table[i].name); in ocs_mgmt_get_all()
541 ocs->mgmt_functions->get_all_handler(textbuf, ocs); in ocs_mgmt_get_all()
545 ocs->tgt_mgmt_functions->get_all_handler(textbuf, &(ocs->tgt_ocs)); in ocs_mgmt_get_all()
551 domain->mgmt_functions->get_all_handler(textbuf, domain); in ocs_mgmt_get_all()
556 ocs_mgmt_end_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get_all()
800 get_nodes_count(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_nodes_count() argument
804 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "nodes_count", "%d", xport->nodes_count); in get_nodes_count()
808 get_driver_version(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_driver_version() argument
810 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "driver_version", ocs->driver_version); in get_driver_version()
814 get_desc(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_desc() argument
816 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "desc", ocs->desc); in get_desc()
820 get_fw_rev(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_fw_rev() argument
822 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "fw_rev", ocs_hw_get_ptr(&ocs->hw, OCS_HW_FW_REV)); in get_fw_rev()
826 get_fw_rev2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_fw_rev2() argument
828 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "fw_rev2", ocs_hw_get_ptr(&ocs->hw, OCS_HW_FW_REV2)); in get_fw_rev2()
832 get_ipl(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_ipl() argument
834 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "ipl", ocs_hw_get_ptr(&ocs->hw, OCS_HW_IPL)); in get_ipl()
838 get_hw_rev1(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_hw_rev1() argument
844 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "hw_rev1", "%u", value); in get_hw_rev1()
848 get_hw_rev2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_hw_rev2() argument
854 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "hw_rev2", "%u", value); in get_hw_rev2()
858 get_hw_rev3(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_hw_rev3() argument
863 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "hw_rev3", "%u", value); in get_hw_rev3()
867 get_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_wwnn() argument
873 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "wwnn", "0x%llx", (unsigned long long)ocs_htobe64(*wwnn)); in get_wwnn()
877 get_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_wwpn() argument
883 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "wwpn", "0x%llx", (unsigned long long)ocs_htobe64(*wwpn)); in get_wwpn()
887 get_fcid(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_fcid() argument
891 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "fc_id", "0x%06x", in get_fcid()
894 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "fc_id", "UNKNOWN"); in get_fcid()
900 get_sn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_sn() argument
911 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sn", sn_buf); in get_sn()
916 get_pn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pn() argument
927 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "pn", sn_buf); in get_pn()
929 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "pn", ocs->model); in get_pn()
934 get_sli4_intf_reg(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_sli4_intf_reg() argument
937 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "sli4_intf_reg", "0x%04x", in get_sli4_intf_reg()
942 get_phy_port_num(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_phy_port_num() argument
948 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "phy_port_num", phy_port); in get_phy_port_num()
950 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "phy_port_num", "unknown"); in get_phy_port_num()
954 get_asic_id(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_asic_id() argument
957 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "asic_id_reg", "0x%04x", in get_asic_id()
962 get_chip_type(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_chip_type() argument
1053 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "chip_type", result_buf); in get_chip_type()
1058 get_pci_vendor(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pci_vendor() argument
1061 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "pci_vendor", "0x%04x", ocs->pci_vendor); in get_pci_vendor()
1065 get_pci_device(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pci_device() argument
1068 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "pci_device", "0x%04x", ocs->pci_device); in get_pci_device()
1072 get_pci_subsystem_vendor(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pci_subsystem_vendor() argument
1075 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "pci_subsystem_vendor", "0x%04x", ocs->pci_subsystem_vend… in get_pci_subsystem_vendor()
1079 get_pci_subsystem_device(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pci_subsystem_device() argument
1082 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "pci_subsystem_device", "0x%04x", ocs->pci_subsystem_devi… in get_pci_subsystem_device()
1086 get_tgt_rscn_delay(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_tgt_rscn_delay() argument
1088 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "tgt_rscn_delay", "%ld", (unsigned long)ocs->tgt_rscn_del… in get_tgt_rscn_delay()
1092 get_tgt_rscn_period(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_tgt_rscn_period() argument
1094 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "tgt_rscn_period", "%ld", (unsigned long)ocs->tgt_rscn_pe… in get_tgt_rscn_period()
1098 get_inject_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_inject_drop_cmd() argument
1100 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "inject_drop_cmd", "%d", in get_inject_drop_cmd()
1105 get_inject_free_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_inject_free_drop_cmd() argument
1107 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "inject_free_drop_cmd", "%d", in get_inject_free_drop_cmd()
1112 get_inject_drop_data(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_inject_drop_data() argument
1114 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "inject_drop_data", "%d", in get_inject_drop_data()
1119 get_inject_drop_resp(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_inject_drop_resp() argument
1121 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "inject_drop_resp", "%d", in get_inject_drop_resp()
1126 get_cmd_err_inject(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_cmd_err_inject() argument
1128 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "cmd_err_inject", "0x%02x", ocs->cmd_err_inject); in get_cmd_err_inject()
1132 get_cmd_delay_value(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_cmd_delay_value() argument
1134 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "cmd_delay_value", "%ld", (unsigned long)ocs->delay_value… in get_cmd_delay_value()
1138 get_businfo(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_businfo() argument
1140 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "businfo", ocs->businfo); in get_businfo()
1144 get_sfp_a0(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_sfp_a0() argument
1165 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sfp_a0", "(unknown)"); in get_sfp_a0()
1179 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sfp_a0", buf); in get_sfp_a0()
1187 get_sfp_a2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_sfp_a2() argument
1208 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sfp_a2", "(unknown)"); in get_sfp_a2()
1222 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sfp_a2", buf); in get_sfp_a2()
1230 get_debug_mq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_debug_mq_dump() argument
1233 ocs_mgmt_emit_boolean(textbuf, MGMT_MODE_RW, "debug_mq_dump", in get_debug_mq_dump()
1238 get_debug_cq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_debug_cq_dump() argument
1241 ocs_mgmt_emit_boolean(textbuf, MGMT_MODE_RW, "debug_cq_dump", in get_debug_cq_dump()
1246 get_debug_wq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_debug_wq_dump() argument
1248 ocs_mgmt_emit_boolean(textbuf, MGMT_MODE_RW, "debug_wq_dump", in get_debug_wq_dump()
1253 get_debug_eq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_debug_eq_dump() argument
1255 ocs_mgmt_emit_boolean(textbuf, MGMT_MODE_RW, "debug_eq_dump", in get_debug_eq_dump()
1260 get_logmask(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_logmask() argument
1263 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "logmask", "0x%02x", ocs->logmask); in get_logmask()
1268 get_loglevel(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_loglevel() argument
1271 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "loglevel", "%d", loglevel); in get_loglevel()
1276 get_current_speed(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_current_speed() argument
1282 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "current_speed", "%d", value); in get_current_speed()
1286 get_configured_speed(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_configured_speed() argument
1292 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "configured_speed", "auto"); in get_configured_speed()
1294 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "configured_speed", "%d", value); in get_configured_speed()
1300 get_current_topology(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_current_topology() argument
1305 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "current_topology", "%d", value); in get_current_topology()
1310 get_configured_topology(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_configured_topology() argument
1315 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "configured_topology", "%d", value); in get_configured_topology()
1320 get_current_link_state(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_current_link_state() argument
1326 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "current_link_state", "online"); in get_current_link_state()
1328 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "current_link_state", "offline"); in get_current_link_state()
1334 get_configured_link_state(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_configured_link_state() argument
1340 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "configured_link_state", "online"); in get_configured_link_state()
1342 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "configured_link_state", "offline"); in get_configured_link_state()
1427 get_linkcfg(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_linkcfg() argument
1435 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "linkcfg", linkcfg_str); in get_linkcfg()
1448 get_req_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_req_wwnn() argument
1452 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "requested_wwnn", "0x%llx", (unsigned long long)xport->re… in get_req_wwnn()
1465 get_req_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_req_wwpn() argument
1469 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "requested_wwpn", "0x%llx", (unsigned long long)xport->re… in get_req_wwpn()
1482 get_nodedb_mask(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_nodedb_mask() argument
1484 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "nodedb_mask", "0x%08x", ocs->nodedb_mask); in get_nodedb_mask()
1876 get_port_protocol(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_port_protocol() argument
1895 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "iSCSI"); in get_port_protocol()
1898 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "FCoE"); in get_port_protocol()
1901 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "FC"); in get_port_protocol()
1904 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "Other"); in get_port_protocol()
1909 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "Unknown"); in get_port_protocol()
2020 get_profile_list(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_profile_list() argument
2052 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "profile_list", result_buf); in get_profile_list()
2096 get_active_profile(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_active_profile() argument
2111 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "active_profile", result_string); in get_active_profile()
2213 get_nv_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_nv_wwpn() argument
2232 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "nv_wwpn", result_string); in get_nv_wwpn()
2251 get_nv_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_nv_wwnn() argument
2270 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "nv_wwnn", result_string); in get_nv_wwnn()
2288 get_node_abort_cnt(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_node_abort_cnt() argument
2330 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "node_abort_cnt", "%d" , abort_counts); in get_node_abort_cnt()
2588 extern void ocs_mgmt_start_section(ocs_textbuf_t *textbuf, const char *name, int index) in ocs_mgmt_start_section() argument
2590 ocs_textbuf_printf(textbuf, "<%s instance=\"%d\">\n", name, index); in ocs_mgmt_start_section()
2608 extern void ocs_mgmt_start_unnumbered_section(ocs_textbuf_t *textbuf, const char *name) in ocs_mgmt_start_unnumbered_section() argument
2610 ocs_textbuf_printf(textbuf, "<%s>\n", name); in ocs_mgmt_start_unnumbered_section()
2627 void ocs_mgmt_end_unnumbered_section(ocs_textbuf_t *textbuf, const char *name) in ocs_mgmt_end_unnumbered_section() argument
2629 ocs_textbuf_printf(textbuf, "</%s>\n", name); in ocs_mgmt_end_unnumbered_section()
2647 void ocs_mgmt_end_section(ocs_textbuf_t *textbuf, const char *name, int index) in ocs_mgmt_end_section() argument
2650 ocs_textbuf_printf(textbuf, "</%s>\n", name); in ocs_mgmt_end_section()
2670 void ocs_mgmt_emit_property_name(ocs_textbuf_t *textbuf, int mode, const char *name) in ocs_mgmt_emit_property_name() argument
2672 ocs_textbuf_printf(textbuf, "<%s mode=\"%s\"/>\n", name, mode_string(mode)); in ocs_mgmt_emit_property_name()
2691 void ocs_mgmt_emit_string(ocs_textbuf_t *textbuf, int mode, const char *name, const char *value) in ocs_mgmt_emit_string() argument
2693 ocs_textbuf_printf(textbuf, "<%s mode=\"%s\">%s</%s>\n", name, mode_string(mode), value, name); in ocs_mgmt_emit_string()
2712 void ocs_mgmt_emit_int(ocs_textbuf_t *textbuf, int mode, const char *name, const char *fmt, ...) in ocs_mgmt_emit_int() argument
2721 ocs_textbuf_printf(textbuf, "<%s mode=\"%s\">%s</%s>\n", name, mode_string(mode), valuebuf, name); in ocs_mgmt_emit_int()
2740 void ocs_mgmt_emit_boolean(ocs_textbuf_t *textbuf, int mode, const char *name, int value) in ocs_mgmt_emit_boolean() argument
2744 ocs_textbuf_printf(textbuf, "<%s mode=\"%s\">%s</%s>\n", name, mode_string(mode), valuebuf, name); in ocs_mgmt_emit_boolean()