Lines Matching refs:textbuf
108 static void get_chip_type(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
109 static void get_tgt_rscn_delay(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
110 static void get_tgt_rscn_period(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
111 static void get_inject_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
112 static void get_inject_free_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
113 static void get_inject_drop_data(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
114 static void get_inject_drop_resp(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
115 static void get_cmd_err_inject(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
116 static void get_cmd_delay_value(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
117 static void get_nv_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
118 static void get_nv_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
119 static void get_loglevel(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
120 static void get_node_abort_cnt(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf);
234 ocs_mgmt_get_list(ocs_t *ocs, ocs_textbuf_t *textbuf) in ocs_mgmt_get_list() argument
240 ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get_list()
253 ocs_mgmt_emit_property_name(textbuf, access, mgmt_table[i].name); in ocs_mgmt_get_list()
257 ocs->mgmt_functions->get_list_handler(textbuf, ocs); in ocs_mgmt_get_list()
261 ocs->tgt_mgmt_functions->get_list_handler(textbuf, &(ocs->tgt_ocs)); in ocs_mgmt_get_list()
270 domain->mgmt_functions->get_list_handler(textbuf, domain); in ocs_mgmt_get_list()
276 ocs_mgmt_end_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get_list()
308 ocs_mgmt_get(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in ocs_mgmt_get() argument
315 ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get()
327 mgmt_table[i].get_handler(ocs, name, textbuf); in ocs_mgmt_get()
328 ocs_mgmt_end_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get()
335 retval = ocs->mgmt_functions->get_handler(textbuf, qualifier, (char*)name, ocs); in ocs_mgmt_get()
340 retval = ocs->tgt_mgmt_functions->get_handler(textbuf, qualifier, in ocs_mgmt_get()
351 retval = domain->mgmt_functions->get_handler(textbuf, qualifier, (char*)name, domain); in ocs_mgmt_get()
365 ocs_mgmt_end_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get()
538 ocs_mgmt_get_all(ocs_t *ocs, ocs_textbuf_t *textbuf) in ocs_mgmt_get_all() argument
543 ocs_mgmt_start_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get_all()
547 mgmt_table[i].get_handler(ocs, mgmt_table[i].name, textbuf); in ocs_mgmt_get_all()
551 ocs_mgmt_emit_property_name(textbuf, MGMT_MODE_EX, mgmt_table[i].name); in ocs_mgmt_get_all()
556 ocs->mgmt_functions->get_all_handler(textbuf, ocs); in ocs_mgmt_get_all()
560 ocs->tgt_mgmt_functions->get_all_handler(textbuf, &(ocs->tgt_ocs)); in ocs_mgmt_get_all()
566 domain->mgmt_functions->get_all_handler(textbuf, domain); in ocs_mgmt_get_all()
571 ocs_mgmt_end_unnumbered_section(textbuf, "ocs"); in ocs_mgmt_get_all()
961 get_nodes_count(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_nodes_count() argument
965 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "nodes_count", "%d", xport->nodes_count); in get_nodes_count()
969 get_driver_version(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_driver_version() argument
971 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "driver_version", ocs->driver_version); in get_driver_version()
975 get_desc(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_desc() argument
977 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "desc", ocs->desc); in get_desc()
981 get_fw_rev(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_fw_rev() argument
983 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "fw_rev", ocs_hw_get_ptr(&ocs->hw, OCS_HW_FW_REV)); in get_fw_rev()
987 get_fw_rev2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_fw_rev2() argument
989 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "fw_rev2", ocs_hw_get_ptr(&ocs->hw, OCS_HW_FW_REV2)); in get_fw_rev2()
993 get_ipl(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_ipl() argument
995 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "ipl", ocs_hw_get_ptr(&ocs->hw, OCS_HW_IPL)); in get_ipl()
999 get_hw_rev1(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_hw_rev1() argument
1005 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "hw_rev1", "%u", value); in get_hw_rev1()
1009 get_hw_rev2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_hw_rev2() argument
1015 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "hw_rev2", "%u", value); in get_hw_rev2()
1019 get_hw_rev3(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_hw_rev3() argument
1024 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "hw_rev3", "%u", value); in get_hw_rev3()
1028 get_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_wwnn() argument
1034 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "wwnn", "0x%llx", (unsigned long long)ocs_htobe64(*wwnn)); in get_wwnn()
1038 get_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_wwpn() argument
1044 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "wwpn", "0x%llx", (unsigned long long)ocs_htobe64(*wwpn)); in get_wwpn()
1048 get_fcid(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_fcid() argument
1052 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "fc_id", "0x%06x", in get_fcid()
1055 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "fc_id", "UNKNOWN"); in get_fcid()
1061 get_sn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_sn() argument
1072 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sn", sn_buf); in get_sn()
1077 get_pn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pn() argument
1088 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "pn", sn_buf); in get_pn()
1090 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "pn", ocs->model); in get_pn()
1095 get_sli4_intf_reg(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_sli4_intf_reg() argument
1098 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "sli4_intf_reg", "0x%04x", in get_sli4_intf_reg()
1103 get_phy_port_num(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_phy_port_num() argument
1109 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "phy_port_num", phy_port); in get_phy_port_num()
1111 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "phy_port_num", "unknown"); in get_phy_port_num()
1115 get_asic_id(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_asic_id() argument
1118 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "asic_id_reg", "0x%04x", in get_asic_id()
1123 get_chip_type(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_chip_type() argument
1214 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "chip_type", result_buf); in get_chip_type()
1219 get_pci_vendor(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pci_vendor() argument
1222 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "pci_vendor", "0x%04x", ocs->pci_vendor); in get_pci_vendor()
1226 get_pci_device(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pci_device() argument
1229 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "pci_device", "0x%04x", ocs->pci_device); in get_pci_device()
1233 get_pci_subsystem_vendor(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pci_subsystem_vendor() argument
1236 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "pci_subsystem_vendor", "0x%04x", ocs->pci_subsystem_vend… in get_pci_subsystem_vendor()
1240 get_pci_subsystem_device(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_pci_subsystem_device() argument
1243 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "pci_subsystem_device", "0x%04x", ocs->pci_subsystem_devi… in get_pci_subsystem_device()
1247 get_tgt_rscn_delay(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_tgt_rscn_delay() argument
1249 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "tgt_rscn_delay", "%ld", (unsigned long)ocs->tgt_rscn_del… in get_tgt_rscn_delay()
1253 get_tgt_rscn_period(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_tgt_rscn_period() argument
1255 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "tgt_rscn_period", "%ld", (unsigned long)ocs->tgt_rscn_pe… in get_tgt_rscn_period()
1259 get_inject_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_inject_drop_cmd() argument
1261 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "inject_drop_cmd", "%d", in get_inject_drop_cmd()
1266 get_inject_free_drop_cmd(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_inject_free_drop_cmd() argument
1268 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "inject_free_drop_cmd", "%d", in get_inject_free_drop_cmd()
1273 get_inject_drop_data(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_inject_drop_data() argument
1275 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "inject_drop_data", "%d", in get_inject_drop_data()
1280 get_inject_drop_resp(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_inject_drop_resp() argument
1282 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "inject_drop_resp", "%d", in get_inject_drop_resp()
1287 get_cmd_err_inject(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_cmd_err_inject() argument
1289 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "cmd_err_inject", "0x%02x", ocs->cmd_err_inject); in get_cmd_err_inject()
1293 get_cmd_delay_value(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_cmd_delay_value() argument
1295 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "cmd_delay_value", "%ld", (unsigned long)ocs->delay_value… in get_cmd_delay_value()
1299 get_businfo(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_businfo() argument
1301 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "businfo", ocs->businfo); in get_businfo()
1305 get_sfp_a0(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_sfp_a0() argument
1326 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sfp_a0", "(unknown)"); in get_sfp_a0()
1340 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sfp_a0", buf); in get_sfp_a0()
1348 get_sfp_a2(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_sfp_a2() argument
1369 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sfp_a2", "(unknown)"); in get_sfp_a2()
1383 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "sfp_a2", buf); in get_sfp_a2()
1391 get_debug_mq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_debug_mq_dump() argument
1394 ocs_mgmt_emit_boolean(textbuf, MGMT_MODE_RW, "debug_mq_dump", in get_debug_mq_dump()
1399 get_debug_cq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_debug_cq_dump() argument
1402 ocs_mgmt_emit_boolean(textbuf, MGMT_MODE_RW, "debug_cq_dump", in get_debug_cq_dump()
1407 get_debug_wq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_debug_wq_dump() argument
1409 ocs_mgmt_emit_boolean(textbuf, MGMT_MODE_RW, "debug_wq_dump", in get_debug_wq_dump()
1414 get_debug_eq_dump(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_debug_eq_dump() argument
1416 ocs_mgmt_emit_boolean(textbuf, MGMT_MODE_RW, "debug_eq_dump", in get_debug_eq_dump()
1421 get_logmask(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_logmask() argument
1424 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "logmask", "0x%02x", ocs->logmask); in get_logmask()
1429 get_loglevel(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_loglevel() argument
1432 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "loglevel", "%d", loglevel); in get_loglevel()
1437 get_current_speed(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_current_speed() argument
1443 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "current_speed", "%d", value); in get_current_speed()
1447 get_configured_speed(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_configured_speed() argument
1453 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "configured_speed", "auto"); in get_configured_speed()
1455 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "configured_speed", "%d", value); in get_configured_speed()
1461 get_current_topology(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_current_topology() argument
1466 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "current_topology", "%d", value); in get_current_topology()
1471 get_configured_topology(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_configured_topology() argument
1476 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "configured_topology", "%d", value); in get_configured_topology()
1481 get_current_link_state(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_current_link_state() argument
1487 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "current_link_state", "online"); in get_current_link_state()
1489 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "current_link_state", "offline"); in get_current_link_state()
1495 get_configured_link_state(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_configured_link_state() argument
1501 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "configured_link_state", "online"); in get_configured_link_state()
1503 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "configured_link_state", "offline"); in get_configured_link_state()
1588 get_linkcfg(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_linkcfg() argument
1596 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "linkcfg", linkcfg_str); in get_linkcfg()
1609 get_req_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_req_wwnn() argument
1613 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "requested_wwnn", "0x%llx", (unsigned long long)xport->re… in get_req_wwnn()
1626 get_req_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_req_wwpn() argument
1630 …ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "requested_wwpn", "0x%llx", (unsigned long long)xport->re… in get_req_wwpn()
1643 get_nodedb_mask(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_nodedb_mask() argument
1645 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RW, "nodedb_mask", "0x%08x", ocs->nodedb_mask); in get_nodedb_mask()
2033 get_port_protocol(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_port_protocol() argument
2052 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "iSCSI"); in get_port_protocol()
2055 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "FCoE"); in get_port_protocol()
2058 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "FC"); in get_port_protocol()
2061 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "Other"); in get_port_protocol()
2066 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "port_protocol", "Unknown"); in get_port_protocol()
2179 get_profile_list(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_profile_list() argument
2212 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RD, "profile_list", result_buf); in get_profile_list()
2256 get_active_profile(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_active_profile() argument
2271 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "active_profile", result_string); in get_active_profile()
2374 get_nv_wwpn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_nv_wwpn() argument
2393 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "nv_wwpn", result_string); in get_nv_wwpn()
2412 get_nv_wwnn(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_nv_wwnn() argument
2431 ocs_mgmt_emit_string(textbuf, MGMT_MODE_RW, "nv_wwnn", result_string); in get_nv_wwnn()
2449 get_node_abort_cnt(ocs_t *ocs, char *name, ocs_textbuf_t *textbuf) in get_node_abort_cnt() argument
2491 ocs_mgmt_emit_int(textbuf, MGMT_MODE_RD, "node_abort_cnt", "%d" , abort_counts); in get_node_abort_cnt()
2748 extern void ocs_mgmt_start_section(ocs_textbuf_t *textbuf, const char *name, int index) in ocs_mgmt_start_section() argument
2750 ocs_textbuf_printf(textbuf, "<%s instance=\"%d\">\n", name, index); in ocs_mgmt_start_section()
2768 extern void ocs_mgmt_start_unnumbered_section(ocs_textbuf_t *textbuf, const char *name) in ocs_mgmt_start_unnumbered_section() argument
2770 ocs_textbuf_printf(textbuf, "<%s>\n", name); in ocs_mgmt_start_unnumbered_section()
2787 void ocs_mgmt_end_unnumbered_section(ocs_textbuf_t *textbuf, const char *name) in ocs_mgmt_end_unnumbered_section() argument
2789 ocs_textbuf_printf(textbuf, "</%s>\n", name); in ocs_mgmt_end_unnumbered_section()
2807 void ocs_mgmt_end_section(ocs_textbuf_t *textbuf, const char *name, int index) in ocs_mgmt_end_section() argument
2810 ocs_textbuf_printf(textbuf, "</%s>\n", name); in ocs_mgmt_end_section()
2830 void ocs_mgmt_emit_property_name(ocs_textbuf_t *textbuf, int mode, const char *name) in ocs_mgmt_emit_property_name() argument
2832 ocs_textbuf_printf(textbuf, "<%s mode=\"%s\"/>\n", name, mode_string(mode)); in ocs_mgmt_emit_property_name()
2851 void ocs_mgmt_emit_string(ocs_textbuf_t *textbuf, int mode, const char *name, const char *value) in ocs_mgmt_emit_string() argument
2853 ocs_textbuf_printf(textbuf, "<%s mode=\"%s\">%s</%s>\n", name, mode_string(mode), value, name); in ocs_mgmt_emit_string()
2872 void ocs_mgmt_emit_int(ocs_textbuf_t *textbuf, int mode, const char *name, const char *fmt, ...) in ocs_mgmt_emit_int() argument
2881 ocs_textbuf_printf(textbuf, "<%s mode=\"%s\">%s</%s>\n", name, mode_string(mode), valuebuf, name); in ocs_mgmt_emit_int()
2900 void ocs_mgmt_emit_boolean(ocs_textbuf_t *textbuf, int mode, const char *name, int value) in ocs_mgmt_emit_boolean() argument
2904 ocs_textbuf_printf(textbuf, "<%s mode=\"%s\">%s</%s>\n", name, mode_string(mode), valuebuf, name); in ocs_mgmt_emit_boolean()