22 #include "../../mlx_lib/mlx_nvconfig/mlx_nvconfig.h" 23 #include "../../include/public/mlx_memory.h" 24 #include "../../include/public/mlx_bail.h" 26 #define TlvMappingEntry( _tlv_type, _real_tlv_type, _class_code, _fw_reset_needed) { \ 27 .tlv_type = _tlv_type, \ 28 .real_tlv_type = _real_tlv_type, \ 29 .class_code = _class_code, \ 30 .fw_reset_needed = _fw_reset_needed, \ 80 #define WARM_REBOOT_RESET ((mlx_uint64)0x1 << 38) 93 if (reset_needed ==
FALSE) {
94 goto no_fw_reset_needed;
100 if (reg_status != 0) {
101 MLX_DEBUG_ERROR(utils,
"nvconfig_set_fw_reset_level failed with status = %d\n", reg_status);
169 if (utils ==
NULL || read_supported ==
NULL || write_supported ==
NULL) {
183 if (reg_status != 0) {
184 MLX_DEBUG_ERROR(utils,
"mlx_reg_access failed with status = %d\n", reg_status);
223 if (reg_status != 0) {
224 MLX_DEBUG_ERROR(utils,
"mlx_reg_access failed with status = %d\n", reg_status);
278 data_size_align_to_dword +
sizeof(nvda.
nv_header), ®_status);
280 if (reg_status != 0) {
281 MLX_DEBUG_ERROR(utils,
"mlx_reg_access failed with status = %d\n", reg_status);
struct nvconfig_tlv_type_per_port per_port
struct nvconfig_tlv_type_global global
mlx_status mlx_memory_cpu_to_be32(IN mlx_utils *utils, IN mlx_uint32 source, IN mlx_uint32 *destination)
static mlx_status nvconfig_get_tlv_type_and_class(IN mlx_uint16 tlv_type, OUT mlx_uint16 *real_tlv_type, OUT NVRAM_CLASS_CODE *class_code)
#define MLX_INVALID_PARAMETER
mlx_boolean fw_reset_needed
mlx_uint8 data[NVCONFIG_MAX_TLV_SIZE]
struct nvconfig_tlv_type_per_host per_host
FILE_LICENCE(GPL2_OR_LATER)
static void nvconfig_fill_tlv_type(IN mlx_uint8 port, IN NVRAM_CLASS_CODE class_code, IN mlx_uint16 tlv_type, OUT union nvconfig_tlv_type *nvconfig_tlv_type)
mlx_status nvconfig_nvdata_invalidate(IN mlx_utils *utils, IN mlx_uint8 port, IN mlx_uint16 tlv_type)
#define WARM_REBOOT_RESET
mlx_status mlx_memory_set(IN mlx_utils *utils, IN mlx_void *block, IN mlx_int32 value, IN mlx_size size)
u32 version
Driver version.
NVRAM_CLASS_CODE class_code
static mlx_status nvconfig_set_fw_reset_level(IN mlx_utils *utils, IN mlx_uint16 tlv_type)
#define NVCONFIG_MAX_TLV_SIZE
mlx_status mlx_memory_cpy(IN mlx_utils *utils, OUT mlx_void *destination_buffer, IN mlx_void *source_buffer, IN mlx_size length)
union nvconfig_tlv_type tlv_type
#define TlvMappingEntry(_tlv_type, _real_tlv_type, _class_code, _fw_reset_needed)
#define MLX_DEBUG_ERROR(...)
uint8_t data[48]
Additional event data.
struct nvconfig_header nv_header
mlx_status mlx_memory_be32_to_cpu(IN mlx_utils *utils, IN mlx_uint32 source, IN mlx_uint32 *destination)
mlx_status mlx_reg_access(IN mlx_utils *utils, IN mlx_uint16 reg_id, IN REG_ACCESS_OPT reg_opt, IN OUT mlx_void *reg_data, IN mlx_size reg_size, OUT mlx_uint32 *reg_status)
#define MLX_CHECK_STATUS(id, status, label, message)
mlx_status nvconfig_query_capability(IN mlx_utils *utils, IN mlx_uint8 port, IN mlx_uint16 tlv_type, OUT mlx_boolean *read_supported, OUT mlx_boolean *write_supported)
#define NULL
NULL pointer (VOID *)
mlx_status nvconfig_nvdata_access(IN mlx_utils *utils, IN mlx_uint8 port, IN mlx_uint16 tlv_type, IN REG_ACCESS_OPT opt, IN mlx_size data_size, IN NV_DEFAULT_OPT def_en, IN NVDA_WRITER_ID writer_id, IN OUT mlx_uint8 *version, IN OUT mlx_void *data)