Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_mgmt.c File Reference
#include "ocs.h"
#include "ocs_mgmt.h"
#include "ocs_vpd.h"
#include "ocs_recovery.h"

Go to the source code of this file.

Detailed Description

The ocs_mgmt top level functions for Fibre Channel.

Definition in file ocs_mgmt.c.

Data Structures

struct  ocs_mgmt_lancer_temp_result_t
 
struct  ocs_mgmt_fw_write_result_t
 
struct  ocs_mgmt_parity_stats_result_t
 
struct  ocs_mgmt_sfp_result_t
 
struct  ocs_mgmt_linkcfg_map_t
 HAL link config enum to mgmt string value mapping. More...
 
struct  ocs_mgmt_linkcfg_arg_t
 Link configuration callback argument. More...
 
struct  ocs_mgmt_get_port_protocol_result_t
 
struct  ocs_mgmt_set_port_protocol_result_t
 
struct  ocs_mgmt_get_profile_list_result_t
 
struct  ocs_mgmt_get_active_profile_result_t
 
struct  ocs_mgmt_set_active_profile_result_t
 
struct  ocs_mgmt_get_nvparms_result_t
 
struct  ocs_mgmt_set_nvparms_result_t
 

Macros

#define FW_WRITE_BUFSIZE   64*1024
 
#define UNSUPPORTED_SFP_ERR_STATUS   0x42
 
#define MAX_LINE_SIZE   520
 
#define BUFFER_SIZE   MAX_LINE_SIZE*40
 
#define MAX_PROFILE_LENGTH   5
 

Functions

static int ocs_mgmt_firmware_write (ocs_t *ocs, char *, void *buf, uint32_t buf_len, void *, uint32_t)
 
static int ocs_mgmt_firmware_reset (ocs_t *ocs, char *, void *buf, uint32_t buf_len, void *, uint32_t)
 
static int ocs_mgmt_function_reset (ocs_t *ocs, char *, void *buf, uint32_t buf_len, void *, uint32_t)
 
static int ocs_mgmt_port_migration (ocs_t *ocs, char *, void *buf, uint32_t buf_len, void *, uint32_t)
 
static int ocs_mgmt_read_parity_stats (ocs_t *ocs, char *name, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length)
 
static void ocs_mgmt_fw_write_cb (int32_t status, int32_t ext_status, uint32_t actual_write_length, uint32_t change_status, void *arg)
 
static int ocs_mgmt_force_assert (ocs_t *ocs, char *, void *buf, uint32_t buf_len, void *, uint32_t)
 
static void get_nodes_count (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_desc (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_fw_rev (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_fw_rev2 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_ipl (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_wwnn (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_wwpn (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_sn (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pn (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_sli4_intf_reg (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_phy_port_num (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_asic_id (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pci_vendor (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pci_device (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pci_subsystem_vendor (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_pci_subsystem_device (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_businfo (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_sfp_a0 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_sfp_a2 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_active_xri_count (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_active_rpi_count (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_lip_count (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_hw_rev1 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_hw_rev2 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_hw_rev3 (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_fw_dump_present (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_fw_dump_max_size (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_mq_dump (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_cq_dump (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_wq_dump (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_debug_eq_dump (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_logmask (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_current_speed (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_current_topology (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_current_link_state (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_logical_link_speed (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_configured_speed (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_configured_topology (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_configured_link_state (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_linkcfg (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get linkcfg config value. More...
 
static void get_req_wwnn (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get requested WWNN config value. More...
 
static void get_req_wwpn (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get requested WWPN config value. More...
 
static void get_nodedb_mask (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get requested nodedb_mask config value. More...
 
static void get_profile_list (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get list of profiles. More...
 
static void get_active_profile (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get active profile. More...
 
static void get_port_protocol (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_driver_version (ocs_t *, char *, ocs_textbuf_t *)
 
static void get_chip_type (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_tgt_rscn_delay (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_tgt_rscn_period (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_inject_drop_cmd (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_inject_free_drop_cmd (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_inject_drop_data (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_inject_drop_resp (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_cmd_err_inject (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_cmd_delay_value (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_nv_wwpn (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get wwpn. More...
 
static void get_nv_wwnn (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get wwnn. More...
 
static void get_loglevel (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 
static void get_node_abort_cnt (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Get accumulated node abort counts. More...
 
static int set_debug_mq_dump (ocs_t *, char *, char *)
 
static int set_debug_cq_dump (ocs_t *, char *, char *)
 
static int set_debug_wq_dump (ocs_t *, char *, char *)
 
static int set_debug_eq_dump (ocs_t *, char *, char *)
 
static int set_logmask (ocs_t *, char *, char *)
 
static int set_configured_speed (ocs_t *, char *, char *)
 
static int set_configured_topology (ocs_t *, char *, char *)
 
static int set_configured_link_state (ocs_t *, char *, char *)
 
static int set_linkcfg (ocs_t *ocs, char *name, char *value)
 Set linkcfg config value. More...
 
static int set_req_wwnn (ocs_t *ocs, char *name, char *value)
 Set requested WWNN value. More...
 
static int set_req_wwpn (ocs_t *ocs, char *name, char *value)
 Set requested WWNP value. More...
 
static int set_nodedb_mask (ocs_t *ocs, char *name, char *value)
 Set node debug mask value. More...
 
static int set_port_protocol (ocs_t *ocs, char *name, char *value)
 Set port protocol. More...
 
static int set_active_profile (ocs_t *ocs, char *name, char *value)
 Set active profile. More...
 
static int set_tgt_rscn_delay (ocs_t *, char *, char *)
 
static int set_tgt_rscn_period (ocs_t *, char *, char *)
 
static int set_inject_drop_cmd (ocs_t *, char *, char *)
 
static int set_inject_free_drop_cmd (ocs_t *, char *, char *)
 
static int set_inject_drop_data (ocs_t *, char *, char *)
 
static int set_inject_drop_resp (ocs_t *, char *, char *)
 
static int set_cmd_err_inject (ocs_t *, char *, char *)
 
static int set_cmd_delay_value (ocs_t *, char *, char *)
 
static int set_nv_wwn (ocs_t *ocs, char *name, char *wwn_p)
 Set wwn. More...
 
static int set_loglevel (ocs_t *, char *, char *)
 
static void ocs_mgmt_linkcfg_cb (int32_t status, uintptr_t value, void *arg)
 Linkcfg callback. More...
 
int32_t ocs_read_temperature_lancer (ocs_t *ocs, void *buf, uint32_t buf_len)
 
void ocs_mgmt_get_list (ocs_t *ocs, ocs_textbuf_t *textbuf)
 Get a list of options supported by the driver. More...
 
int ocs_mgmt_get (ocs_t *ocs, char *name, ocs_textbuf_t *textbuf)
 Return the value of a management item. More...
 
int ocs_mgmt_set (ocs_t *ocs, char *name, char *value)
 Set the value of a mgmt item. More...
 
int ocs_mgmt_exec (ocs_t *ocs, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length)
 Perform a management action. More...
 
void ocs_mgmt_get_all (ocs_t *ocs, ocs_textbuf_t *textbuf)
 
static void ocs_mgmt_read_parity_stats_cb (int32_t status, uint8_t num_ulp, ocs_parity_err_count_t *counter, void *arg)
 
void ocs_read_temperature_lancer_cb (int32_t status, uint32_t curr_temp, uint32_t crit_temp_thr, uint32_t warn_temp_thr, uint32_t norm_temp_thr, uint32_t fan_off_thr, uint32_t fan_on_thr, void *arg)
 
static void ocs_mgmt_sfp_cb (void *os, int32_t status, uint32_t bytes_read, uint32_t *data, void *arg)
 
int32_t ocs_mgmt_get_sfp (ocs_t *ocs, uint16_t page, void *buf, uint32_t buf_len)
 
static ocs_hal_linkcfg_e ocs_hal_linkcfg_from_mgmt (const char *mgmt_str)
 Get the HAL linkcfg enum from the mgmt config string. More...
 
static const char * ocs_mgmt_from_hal_linkcfg (ocs_hal_linkcfg_e linkcfg)
 Get the mgmt string value from the HAL linkcfg enum. More...
 
static void ocs_mgmt_get_port_protocol_cb (int32_t status, ocs_hal_port_protocol_e port_protocol, void *arg)
 
static void ocs_mgmt_set_port_protocol_cb (int32_t status, void *arg)
 
static void ocs_mgmt_get_profile_list_cb (int32_t status, ocs_hal_profile_list_t *list, void *ul_arg)
 
static void ocs_mgmt_get_active_profile_cb (int32_t status, uint32_t active_profile, void *ul_arg)
 
static void ocs_mgmt_set_active_profile_cb (int32_t status, void *ul_arg)
 
static void ocs_mgmt_get_nvparms_cb (int32_t status, uint8_t *wwpn, uint8_t *wwnn, uint8_t hard_alpa, uint32_t preferred_d_id, void *ul_arg)
 
static void ocs_mgmt_set_nvparms_cb (int32_t status, void *ul_arg)
 
int parse_wwn (char *wwn_in, uint64_t *wwn_out)
 parse a WWN from a string into a 64-bit value More...
 

Variables

ocs_mgmt_table_entry_t mgmt_table []
 
static ocs_mgmt_linkcfg_map_t mgmt_linkcfg_map []
 

Macro Details

#define BUFFER_SIZE   MAX_LINE_SIZE*40
#define FW_WRITE_BUFSIZE   64*1024

Definition at line 851 of file ocs_mgmt.c.

#define MAX_LINE_SIZE   520
#define MAX_PROFILE_LENGTH   5

Definition at line 2546 of file ocs_mgmt.c.

#define UNSUPPORTED_SFP_ERR_STATUS   0x42

Function Details

static void get_active_profile ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get active profile.

Description
This is a management action handler to get the currently active profile for an SLI port. Although the spec says that all SLI platforms support this, only Skyhawk actually has a useful implementation.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
textbufPointer to an ocs_textbuf, which is used to return the results.
Returns
none

Definition at line 2563 of file ocs_mgmt.c.

static void get_active_rpi_count ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1575 of file ocs_mgmt.c.

static void get_active_xri_count ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1569 of file ocs_mgmt.c.

static void get_asic_id ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1366 of file ocs_mgmt.c.

static void get_businfo ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1556 of file ocs_mgmt.c.

static void get_chip_type ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1374 of file ocs_mgmt.c.

static void get_cmd_delay_value ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1550 of file ocs_mgmt.c.

static void get_cmd_err_inject ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1544 of file ocs_mgmt.c.

static void get_configured_link_state ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1806 of file ocs_mgmt.c.

static void get_configured_speed ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1748 of file ocs_mgmt.c.

static void get_configured_topology ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1772 of file ocs_mgmt.c.

static void get_current_link_state ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1782 of file ocs_mgmt.c.

static void get_current_speed ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1738 of file ocs_mgmt.c.

static void get_current_topology ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1762 of file ocs_mgmt.c.

static void get_debug_cq_dump ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1700 of file ocs_mgmt.c.

static void get_debug_eq_dump ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1715 of file ocs_mgmt.c.

static void get_debug_mq_dump ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1692 of file ocs_mgmt.c.

static void get_debug_wq_dump ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1708 of file ocs_mgmt.c.

static void get_desc ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1243 of file ocs_mgmt.c.

static void get_driver_version ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1237 of file ocs_mgmt.c.

static void get_fw_dump_max_size ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1683 of file ocs_mgmt.c.

static void get_fw_dump_present ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1674 of file ocs_mgmt.c.

static void get_fw_rev ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1249 of file ocs_mgmt.c.

static void get_fw_rev2 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1255 of file ocs_mgmt.c.

static void get_hw_rev1 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1267 of file ocs_mgmt.c.

static void get_hw_rev2 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1277 of file ocs_mgmt.c.

static void get_hw_rev3 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1287 of file ocs_mgmt.c.

static void get_inject_drop_cmd ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1516 of file ocs_mgmt.c.

static void get_inject_drop_data ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1530 of file ocs_mgmt.c.

static void get_inject_drop_resp ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1537 of file ocs_mgmt.c.

static void get_inject_free_drop_cmd ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1523 of file ocs_mgmt.c.

static void get_ipl ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1261 of file ocs_mgmt.c.

static void get_linkcfg ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get linkcfg config value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
textbufThe textbuf to which the result is written.
Returns
None.

Definition at line 1908 of file ocs_mgmt.c.

static void get_lip_count ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1562 of file ocs_mgmt.c.

static void get_logical_link_speed ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1796 of file ocs_mgmt.c.

static void get_loglevel ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1730 of file ocs_mgmt.c.

static void get_logmask ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1722 of file ocs_mgmt.c.

static void get_node_abort_cnt ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get accumulated node abort counts.

Description Get the sum of all nodes abort count.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
textbufPointer to an ocs_textbuf, which is used to return the results.
Returns
None.

Definition at line 2757 of file ocs_mgmt.c.

static void get_nodedb_mask ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get requested nodedb_mask config value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
textbufThe textbuf to which the result is written.
Returns
None.

Definition at line 1963 of file ocs_mgmt.c.

static void get_nodes_count ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1229 of file ocs_mgmt.c.

static void get_nv_wwnn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get wwnn.

Description
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
textbufPointer to an ocs_textbuf, which is used to return the results.
Returns
none

Definition at line 2720 of file ocs_mgmt.c.

static void get_nv_wwpn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get wwpn.

Description
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
textbufPointer to an ocs_textbuf, which is used to return the results.
Returns
none

Definition at line 2682 of file ocs_mgmt.c.

static void get_pci_device ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1483 of file ocs_mgmt.c.

static void get_pci_subsystem_device ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1497 of file ocs_mgmt.c.

static void get_pci_subsystem_vendor ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1490 of file ocs_mgmt.c.

static void get_pci_vendor ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1476 of file ocs_mgmt.c.

static void get_phy_port_num ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1358 of file ocs_mgmt.c.

static void get_pn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1332 of file ocs_mgmt.c.

static void get_port_protocol ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 2338 of file ocs_mgmt.c.

static void get_profile_list ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get list of profiles.

Description
This is a management action handler to get the list of profiles supported by the SLI port. Although the spec says that all SLI platforms support this, only Skyhawk actually has a useful implementation.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
textbufPointer to an ocs_textbuf, which is used to return the results.
Returns
none

Definition at line 2485 of file ocs_mgmt.c.

static void get_req_wwnn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get requested WWNN config value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
textbufThe textbuf to which the result is written.
Returns
None.

Definition at line 1929 of file ocs_mgmt.c.

static void get_req_wwpn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Get requested WWPN config value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
textbufThe textbuf to which the result is written.
Returns
None.

Definition at line 1946 of file ocs_mgmt.c.

static void get_sfp_a0 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1583 of file ocs_mgmt.c.

static void get_sfp_a2 ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1631 of file ocs_mgmt.c.

static void get_sli4_intf_reg ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1350 of file ocs_mgmt.c.

static void get_sn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1316 of file ocs_mgmt.c.

static void get_tgt_rscn_delay ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1504 of file ocs_mgmt.c.

static void get_tgt_rscn_period ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1510 of file ocs_mgmt.c.

static void get_wwnn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1296 of file ocs_mgmt.c.

static void get_wwpn ( ocs_t *  ocs,
char *  name,
ocs_textbuf_t *  textbuf 
)
static

Definition at line 1306 of file ocs_mgmt.c.

static ocs_hal_linkcfg_e ocs_hal_linkcfg_from_mgmt ( const char *  mgmt_str)
static

Get the HAL linkcfg enum from the mgmt config string.

Parameters
mgmt_strmgmt string value.
Returns
Returns the HAL linkcfg enum corresponding to clp_str.

Definition at line 1858 of file ocs_mgmt.c.

static int32_t ocs_mgmt_firmware_reset ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 815 of file ocs_mgmt.c.

static int32_t ocs_mgmt_firmware_write ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 863 of file ocs_mgmt.c.

static int32_t ocs_mgmt_force_assert ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 1223 of file ocs_mgmt.c.

static const char* ocs_mgmt_from_hal_linkcfg ( ocs_hal_linkcfg_e  linkcfg)
static

Get the mgmt string value from the HAL linkcfg enum.

Parameters
linkcfgHAL linkcfg enum.
Returns
Returns the mgmt string value corresponding to the given HAL linkcfg.

Definition at line 1878 of file ocs_mgmt.c.

static int32_t ocs_mgmt_function_reset ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 822 of file ocs_mgmt.c.

static void ocs_mgmt_fw_write_cb ( int32_t  status,
int32_t  ext_status,
uint32_t  actual_write_length,
uint32_t  change_status,
void *  arg 
)
static

Definition at line 966 of file ocs_mgmt.c.

static void ocs_mgmt_get_active_profile_cb ( int32_t  status,
uint32_t  active_profile,
void *  ul_arg 
)
static

Definition at line 2536 of file ocs_mgmt.c.

void ocs_mgmt_get_all ( ocs_t *  ocs,
ocs_textbuf_t *  textbuf 
)

Definition at line 632 of file ocs_mgmt.c.

static void ocs_mgmt_get_nvparms_cb ( int32_t  status,
uint8_t *  wwpn,
uint8_t *  wwnn,
uint8_t  hard_alpa,
uint32_t  preferred_d_id,
void *  ul_arg 
)
static

Definition at line 2656 of file ocs_mgmt.c.

static void ocs_mgmt_get_port_protocol_cb ( int32_t  status,
ocs_hal_port_protocol_e  port_protocol,
void *  arg 
)
static

Definition at line 2325 of file ocs_mgmt.c.

static void ocs_mgmt_get_profile_list_cb ( int32_t  status,
ocs_hal_profile_list_t *  list,
void *  ul_arg 
)
static

Definition at line 2460 of file ocs_mgmt.c.

int32_t ocs_mgmt_get_sfp ( ocs_t *  ocs,
uint16_t  page,
void *  buf,
uint32_t  buf_len 
)

Definition at line 1165 of file ocs_mgmt.c.

static void ocs_mgmt_linkcfg_cb ( int32_t  status,
uintptr_t  value,
void *  arg 
)
static

Linkcfg callback.

Parameters
statusResult of the linkcfg get/set operation.
valueResulting linkcfg value.
argCallback argument.
Returns
None.

Definition at line 2103 of file ocs_mgmt.c.

static int32_t ocs_mgmt_port_migration ( ocs_t *  ocs,
char *  name,
void *  buf,
uint32_t  buf_len,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 842 of file ocs_mgmt.c.

static int32_t ocs_mgmt_read_parity_stats ( ocs_t *  ocs,
char *  name,
void *  arg_in,
uint32_t  arg_in_length,
void *  arg_out,
uint32_t  arg_out_length 
)
static

Definition at line 1004 of file ocs_mgmt.c.

static void ocs_mgmt_read_parity_stats_cb ( int32_t  status,
uint8_t  num_ulp,
ocs_parity_err_count_t *  counter,
void *  arg 
)
static

Definition at line 986 of file ocs_mgmt.c.

static void ocs_mgmt_set_active_profile_cb ( int32_t  status,
void *  ul_arg 
)
static

Definition at line 2593 of file ocs_mgmt.c.

static void ocs_mgmt_set_nvparms_cb ( int32_t  status,
void *  ul_arg 
)
static

Definition at line 2809 of file ocs_mgmt.c.

static void ocs_mgmt_set_port_protocol_cb ( int32_t  status,
void *  arg 
)
static

Definition at line 2385 of file ocs_mgmt.c.

static void ocs_mgmt_sfp_cb ( void *  os,
int32_t  status,
uint32_t  bytes_read,
uint32_t *  data,
void *  arg 
)
static

Definition at line 1143 of file ocs_mgmt.c.

int32_t ocs_read_temperature_lancer ( ocs_t *  ocs,
void *  buf,
uint32_t  buf_len 
)

Definition at line 1083 of file ocs_mgmt.c.

void ocs_read_temperature_lancer_cb ( int32_t  status,
uint32_t  curr_temp,
uint32_t  crit_temp_thr,
uint32_t  warn_temp_thr,
uint32_t  norm_temp_thr,
uint32_t  fan_off_thr,
uint32_t  fan_on_thr,
void *  arg 
)

Definition at line 1059 of file ocs_mgmt.c.

int parse_wwn ( char *  wwn_in,
uint64_t *  wwn_out 
)

parse a WWN from a string into a 64-bit value

Given a pointer to a string, parse the string into a 64-bit WWN value. The format of the string must be xx:xx:xx:xx:xx:xx:xx:xx

Parameters
wwn_inpointer to the string to be parsed
wwn_outpointer to uint64_t in which to put the parsed result
Returns
0 if successful, non-zero if the WWN is malformed and couldn't be parsed

Definition at line 3047 of file ocs_mgmt.c.

static int32_t set_active_profile ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set active profile.

Description
This is a management action handler to set the currently active profile for an SLI port. Although the spec says that all SLI platforms support this, only Skyhawk actually has a useful implementation.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
valueRequested new value of the property.
Returns
Returns 0 on success, non-zero on failure.

Definition at line 2617 of file ocs_mgmt.c.

static int set_cmd_delay_value ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2987 of file ocs_mgmt.c.

static int set_cmd_err_inject ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2979 of file ocs_mgmt.c.

static int set_configured_link_state ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2277 of file ocs_mgmt.c.

static int set_configured_speed ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2202 of file ocs_mgmt.c.

static int set_configured_topology ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2238 of file ocs_mgmt.c.

static int set_debug_cq_dump ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2130 of file ocs_mgmt.c.

static int set_debug_eq_dump ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2166 of file ocs_mgmt.c.

static int set_debug_mq_dump ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2112 of file ocs_mgmt.c.

static int set_debug_wq_dump ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2148 of file ocs_mgmt.c.

static int set_inject_drop_cmd ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2947 of file ocs_mgmt.c.

static int set_inject_drop_data ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2963 of file ocs_mgmt.c.

static int set_inject_drop_resp ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2971 of file ocs_mgmt.c.

static int set_inject_free_drop_cmd ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2955 of file ocs_mgmt.c.

static int set_linkcfg ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set linkcfg config value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
valueValue to which the linkcfg is set.
Returns
Returns 0 on success.

Definition at line 2060 of file ocs_mgmt.c.

static int set_loglevel ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2193 of file ocs_mgmt.c.

static int set_logmask ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2184 of file ocs_mgmt.c.

static int set_nodedb_mask ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set node debug mask value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
valueValue to which the nodedb_mask is set.
Returns
Returns 0 on success.

Definition at line 2044 of file ocs_mgmt.c.

static int32_t set_nv_wwn ( ocs_t *  ocs,
char *  name,
char *  wwn_p 
)
static

Set wwn.

Description Sets the Non-volatile worldwide names,
if provided.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
wwn_pRequested new WWN values.
Returns
Returns 0 on success, non-zero on failure.

Definition at line 2830 of file ocs_mgmt.c.

static int32_t set_port_protocol ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set port protocol.

Description
This is a management action handler to set the current port protocol. Input value should be one of iSCSI, FC, or FCoE.
Parameters
ocsPointer to the ocs structure.
nameName of the action being performed.
valueThe value to be assigned
Returns
Returns 0 on success, non-zero on failure.

Definition at line 2409 of file ocs_mgmt.c.

static int set_req_wwnn ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set requested WWNN value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
valueValue to which the linkcfg is set.
Returns
Returns 0 on success.

Definition at line 1979 of file ocs_mgmt.c.

static int set_req_wwpn ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Set requested WWNP value.

Parameters
ocsPointer to the ocs structure.
nameNot used.
valueValue to which the linkcfg is set.
Returns
Returns 0 on success.

Definition at line 2012 of file ocs_mgmt.c.

static int set_tgt_rscn_delay ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2931 of file ocs_mgmt.c.

static int set_tgt_rscn_period ( ocs_t *  ocs,
char *  name,
char *  value 
)
static

Definition at line 2939 of file ocs_mgmt.c.

Variable Details

ocs_mgmt_table_entry_t mgmt_table[]

Definition at line 181 of file ocs_mgmt.c.