Skip to content

Commit

Permalink
Merge pull request #262 from Mellanox/master_devel
Browse files Browse the repository at this point in the history
Merging master_devel to master for release 4.13.3-1
  • Loading branch information
mataneli94 authored Dec 31, 2019
2 parents 448c5cb + 30267f2 commit 98d0944
Show file tree
Hide file tree
Showing 121 changed files with 3,654 additions and 641 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
# SOFTWARE.
#--

SUBDIRS = common mft_utils ext_libs $(TOOLS_CRYPTO) tools_layouts ${MTCR_CONF_DIR} mtcr_py $(MAD_IFC) reg_access cmdif $(XZ_UTILS_DIR) dev_mgt tools_res_mgmt mvpd mflash fw_comps_mgr libmfa pldmlib mlxconfig mlxfwops cmdparser $(FW_MGR_TOOLS) flint small_utils mstdump ${ADABE_TOOLS} tracers
SUBDIRS = common mft_utils ext_libs $(TOOLS_CRYPTO) tools_layouts ${MTCR_CONF_DIR} mtcr_py $(MAD_IFC) reg_access cmdif $(XZ_UTILS_DIR) dev_mgt tools_res_mgmt mvpd mflash fw_comps_mgr libmfa pldmlib mlxconfig mlxfwops cmdparser $(FW_MGR_TOOLS) flint small_utils mstdump ${ADABE_TOOLS} tracers resourcedump

DIST_SUBDIRS = tracers

man_MANS = man/mstflint.1 man/mstconfig.1 man/mstmcra.1 man/mstmread.1 man/mstmwrite.1 man/mstmtserver.1 man/mstregdump.1 man/mstvpd.1 man/mstprivhost.1 man/mstarchive.1 man/mstreg.1 man/mstfwtrace.1 man/mstlink.1 man/mstcongestion.1 man/mstfwmanager.1 man/mstfwreset.1
man_MANS = man/mstflint.1 man/mstconfig.1 man/mstmcra.1 man/mstmread.1 man/mstmwrite.1 man/mstmtserver.1 man/mstregdump.1 man/mstvpd.1 man/mstprivhost.1 man/mstarchive.1 man/mstreg.1 man/mstfwtrace.1 man/mstlink.1 man/mstcongestion.1 man/mstfwmanager.1 man/mstfwreset.1 man/mstresourcedump.1

EXTRA_DIST = \
mstflint.spec \
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@

dnl Process this file with autoconf to produce a configure script.

AC_INIT(mstflint, 4.13.1, [email protected])
AC_INIT(mstflint, 4.13.3, [email protected])

AC_DEFINE_UNQUOTED([PROJECT], ["mstflint"], [Define the project name.])
AC_SUBST([PROJECT])

AC_DEFINE_UNQUOTED([VERSION], ["4.13.1"], [Define the project version.])
AC_DEFINE_UNQUOTED([VERSION], ["4.13.3"], [Define the project version.])
AC_SUBST([VERSION])

AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -406,5 +406,5 @@ fi
AC_OUTPUT( Makefile common/Makefile mft_utils/Makefile mtcr_py/Makefile ext_libs/Makefile ext_libs/sqlite/Makefile ext_libs/muparser/Makefile ext_libs/json/Makefile ext_libs/minixz/Makefile dev_mgt/Makefile \
tools_layouts/Makefile reg_access/Makefile cmdif/Makefile libmfa/Makefile pldmlib/Makefile tools_res_mgmt/Makefile mlxconfig/Makefile mlxconfig/mlxconfig_dbs/Makefile mflash/Makefile mlxfwops/Makefile mlxfwops/lib/Makefile cmdparser/Makefile \
flint/Makefile small_utils/Makefile small_utils/mlxfwresetlib/Makefile mstdump/Makefile mstdump/crd_lib/Makefile mstdump/crd_main/Makefile mstdump/mstdump_dbs/Makefile mvpd/Makefile \
fw_comps_mgr/Makefile mad_ifc/Makefile tracers/Makefile tracers/fwtrace/Makefile )
fw_comps_mgr/Makefile mad_ifc/Makefile tracers/Makefile tracers/fwtrace/Makefile resourcedump/Makefile )

10 changes: 6 additions & 4 deletions dev_mgt/tools_dev_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ struct device_info {
#define SFP_DIGITAL_DIAGNOSTIC_MONITORING_IMPLEMENTED_ADDR 92
#define SFP_PAGING_IMPLEMENTED_INDICATOR_ADDR 64

#define ARDBEG_DEVID 0x6e
#define ARDBEG_REV0_DEVID 0x6e
#define ARDBEG_REV1_DEVID 0x7e
#define ARDBEG_MIRRORED_DEVID 0x70
#define BARITONE_DEVID 0x6b
#define BARITONE_MIRRORED_DEVID 0x71
Expand Down Expand Up @@ -428,9 +429,10 @@ int dm_get_device_id(mfile *mf,
#endif
#ifdef CABLES_SUPP
if (mf->tp == MST_LINKX_CHIP){

switch (mf->linkx_chip_devid){
case ARDBEG_DEVID:
case ARDBEG_REV0_DEVID:
case ARDBEG_REV1_DEVID:
case ARDBEG_MIRRORED_DEVID:
*ptr_dm_dev_id = DeviceArdbeg;
break;
Expand Down Expand Up @@ -502,7 +504,7 @@ int dm_get_device_id(mfile *mf,
// Special case for MLNX OS getting dev_id using REG MGIR
if (dev_flags & MDEVS_MLNX_OS) {
reg_access_status_t rc;
struct tools_open_mgir mgir;
struct reg_access_hca_mgir mgir;
memset(&mgir, 0, sizeof(mgir));
rc = reg_access_mgir(mf, REG_ACCESS_METHOD_GET, &mgir);
//printf("-D- RC[%s] -- REVID: %d -- DEVID: %d hw_dev_id: %d\n", m_err2str(rc), mgir.HWInfo.REVID, mgir.HWInfo.DEVID, mgir.HWInfo.hw_dev_id);
Expand Down
6 changes: 4 additions & 2 deletions flint/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ else
endif

if ENABLE_OPENSSL
mstflint_LDADD += $(top_srcdir)/mlxsign_lib/libmlxsign.a -lcrypto
mstflint_LDADD += $(top_srcdir)/mlxsign_lib/libmlxsign.a -lcrypto
else
endif

if ENABLE_FWMGR
mstflint_LDADD += $(top_srcdir)/libmfa/libmfa.a $(top_srcdir)/ext_libs/minixz/libminixz.a
mstflint_LDADD += $(top_srcdir)/libmfa/libmfa.a $(top_srcdir)/ext_libs/minixz/libminixz.a $(top_srcdir)/mlxarchive/libmstarchive.a $(top_srcdir)/xz_utils/libxz_utils.a -llzma -lm
else
mstflint_CXXFLAGS += -DNO_MSTARCHIVE
endif

#get mst device examples and tool name from makefile
Expand Down
14 changes: 9 additions & 5 deletions flint/cmd_line_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ FlagMetaData::FlagMetaData()
_flags.push_back(new Flag("", "hmac_key", 1));
_flags.push_back(new Flag("", "key_uuid2", 1));
_flags.push_back(new Flag("", "no_fw_ctrl", 0));
_flags.push_back(new Flag("image_reactivation", "ir", 0));
_flags.push_back(new Flag("", "ir", 0));
_flags.push_back(new Flag("", "latest_fw", 0));
}

FlagMetaData::~FlagMetaData()
Expand Down Expand Up @@ -417,12 +418,12 @@ void Flint::initCmdParser()
"Binary image file.\n"
"Commands affected: burn, verify");

AddOptions("ir",
AddOptions("latest_fw",
' ',
"",
"Commands affected: burn");

AddOptions("image_reactivation",
AddOptions("ir",
' ',
"",
"Commands affected: burn");
Expand Down Expand Up @@ -889,7 +890,7 @@ ParseStatus Flint::HandleOption(string name, string value)
_flintParams.striped_image = true;
} else if (name == "use_dev_img_info") {
_flintParams.use_dev_img_info = true;
} else if (name == "ir" || name == "image_reactivation") {
} else if (name == "ir") {
_flintParams.image_reactivation = true;
}
else if (name == "banks") {
Expand Down Expand Up @@ -923,7 +924,10 @@ ParseStatus Flint::HandleOption(string name, string value)
} else if (name == "key_uuid2") {
_flintParams.uuid2_specified = true;
_flintParams.privkey2_uuid = value;
} else {
} else if (name == "latest_fw") {
_flintParams.use_latest_fw_version = true;
}
else {
cout << "Unknown Flag: " << name;
cout << _cmdParser.GetSynopsis();
return PARSE_ERROR;
Expand Down
1 change: 1 addition & 0 deletions flint/err_msgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ typedef enum {

#define FLINT_CLEAR_SEM_CMD_ERROR "No command is allowed when -clear_semaphore flag is given.\n"
#define FLINT_COMMAND_FLAGS_ERROR "For %s command, Please specify %s.\n"
#define FLINT_COMMAND_INCORRECT_FLAGS_ERROR "For %s command, %s.\n"
#define FLINT_PARSE_MEM_ERROR "Failed to allocate memory for parsing.\n "
#define FLINT_NO_OPTIONS_FOUND_ERROR "No options found. "
#define FLINT_INVALID_COMMAD_ERROR "Invalid command: %s\n"
Expand Down
3 changes: 3 additions & 0 deletions flint/flint_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ FlintParams::FlintParams()
low_cpu = false;
skip_rom_query = false;
image_specified = false;
mfa2_specified = false;
nofs = false;
allow_psid_change = false;
allow_rom_change = false;
Expand Down Expand Up @@ -93,6 +94,8 @@ FlintParams::FlintParams()
no_fw_ctrl = false;
image_reactivation = false;
num_of_args = 0;
use_latest_fw_version = false;

}

FlintParams::~FlintParams()
Expand Down
4 changes: 4 additions & 0 deletions flint/flint_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class FlintParams {
bool next_boot_fw_ver;
bool skip_rom_query;
bool image_specified;
bool mfa2_specified;
string image;
bool nofs;
bool allow_psid_change;
Expand Down Expand Up @@ -146,7 +147,9 @@ class FlintParams {
bool skip_ci_req;
bool use_dev_rom;
bool privkey_specified;
bool pubkey_specified;
string privkey_file;
string pubkey_file;
bool uuid_specified;
string privkey_uuid;
bool privkey2_specified;
Expand All @@ -158,6 +161,7 @@ class FlintParams {
bool no_fw_ctrl;
bool image_reactivation;
int num_of_args;
bool use_latest_fw_version;
};

#endif
Loading

0 comments on commit 98d0944

Please sign in to comment.