Skip to content

Commit 2171795

Browse files
Merge branch 'master_devel'
Conflicts: kernel/mstflint_kernel.spec mstflint.spec.in small_utils/congestion.cpp small_utils/congestion.h tools_layouts/reg_access_hca_layouts.c tools_layouts/reg_access_hca_layouts.h
2 parents 941bf38 + e44ec6b commit 2171795

File tree

140 files changed

+51967
-1068
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+51967
-1068
lines changed

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
# SOFTWARE.
3131
#--
3232

33-
SUBDIRS = common mft_utils ext_libs $(TOOLS_CRYPTO) tools_layouts ${MTCR_CONF_DIR} mtcr_py $(MAD_IFC) reg_access cmdif dev_mgt tools_res_mgmt mvpd mflash fw_comps_mgr mlxconfig mlxfwops cmdparser $(MLXFWUPDATE) flint small_utils mstdump
33+
SUBDIRS = common mft_utils ext_libs $(TOOLS_CRYPTO) tools_layouts ${MTCR_CONF_DIR} mtcr_py $(MAD_IFC) reg_access cmdif dev_mgt tools_res_mgmt mvpd mflash fw_comps_mgr libmfa mlxconfig mlxfwops cmdparser $(FW_MGR_TOOLS) flint small_utils mstdump
3434

35-
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
35+
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
3636

3737
EXTRA_DIST = \
3838
mstflint.spec \

cmdif/cmdif.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ def sendCmd(self, opcode, data, skipWrite):
9292
self.mstDev.icmdSendCmd(opcode, data, skipWrite)
9393

9494
##########################
95-
def setItrace(self, mask, level):
95+
def setItrace(self, mask, level, log_delay=0):
9696
class ITRACE_ST(Structure):
97-
_fields_ = [("unit_mask", c_uint32), ("log_level", c_uint8)]
97+
_fields_ = [("unit_mask", c_uint32), ("log_level", c_uint8), ("log_delay", c_uint16)]
9898

99-
setItraceStruct = pointer(ITRACE_ST(mask, level))
99+
setItraceStruct = pointer(ITRACE_ST(mask, level, log_delay))
100100
rc = self.setItraceFunc(self.mstDev.mf, setItraceStruct)
101101
if rc:
102102
raise CmdIfException("Failed to set itrace mask: %s (%d)" % (self.errStrFunc(rc), rc))

cmdif/icmd_cif_open.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ extern "C" {
4343
#include <tools_layouts/icmd_layouts.h>
4444
#else
4545
#include <tools_layouts/connectib_layouts.h>
46+
#include <tools_layouts/connectx4_layouts.h>
47+
#include "cib_cif.h"
4648
#endif
4749
#include "icmd_cif_common.h"
4850

@@ -54,10 +56,16 @@ extern "C" {
5456

5557
enum {
5658
GET_FW_INFO = 0x8007,
57-
GET_ICMD_QUERY_CAP = 0x8400,
5859
FLASH_REG_ACCESS = 0x9001,
60+
};
61+
62+
#ifdef MST_UL
63+
// instead of cib_cif.h in mstflint
64+
enum {
65+
GET_ICMD_QUERY_CAP = 0x8400,
5966
SET_ITRACE = 0xf003,
6067
};
68+
#endif
6169

6270
int gcif_get_fw_info(mfile *mf,
6371
OUT struct connectib_icmd_get_fw_info *fw_info);

common/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ update_prefix = sed -e 's,[@]MST_LIB_DIR[@]${CONF_DISABLE_PATH_UPDATE},$(libdir)
3838
-e 's,[@]MST_BIN_DIR[@]${CONF_DISABLE_PATH_UPDATE},$(bindir),g'\
3939
-e 's,[@]MFTCONF_PREFIX[@],$(prefix),g'
4040

41-
update_tools_version = sed -e 's,[@]MFT_VERSION_STR[@],${MFT_VERSION_STR},g' \
41+
update_tools_version = sed -e 's,[@]MSTFLINT_VERSION_STR[@],${MSTFLINT_VERSION_STR},g' \
4242
-e 's,[@]TOOLS_BUILD_TIME[@],${TOOLS_BUILD_TIME},g' \
4343
-e 's,[@]TOOLS_GIT_SHA[@],${TOOLS_GIT_SHA},g'
4444

common/tools_version.h

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,25 @@
4141
#include <string.h>
4242
#include <stdlib.h>
4343

44+
#ifdef HAVE_CONFIG_H
45+
#include <config.h>
46+
#ifndef MSTFLINT_VERSION_STR
47+
#define MSTFLINT_VERSION_STR PACKAGE_STRING
48+
#endif
49+
50+
#ifndef TOOLS_GIT_SHA
51+
#define TOOLS_GIT_SHA "6469M"
52+
#endif
53+
#else
4454
// To be replaced by an external script:
4555
#include "gitversion.h"
4656
#ifndef TOOLS_GIT_SHA
4757
#define TOOLS_GIT_SHA "6469M"
4858
#endif
49-
50-
#ifdef HAVE_CONFIG_H
51-
#include <config.h>
52-
#ifndef MFT_VERSION_STR
53-
#define MFT_VERSION_STR PACKAGE_STRING
54-
#endif
5559
#endif
5660

57-
#ifndef MFT_VERSION_STR
58-
#define MFT_VERSION_STR "mft V.V.V-R"
61+
#ifndef MSTFLINT_VERSION_STR
62+
#define MSTFLINT_VERSION_STR "mstflint V.V.V-R"
5963
#endif
6064

6165
static inline
@@ -72,7 +76,7 @@ int get_version_string(char *buf, int buf_size, const char *exe_name, const char
7276
}
7377
// cut out first and last "$" from the SVN version string:
7478
len += snprintf(buf + len, buf_size - len, "%s, built on %s, %s. Git SHA Hash: %s",
75-
MFT_VERSION_STR,
79+
MSTFLINT_VERSION_STR,
7680
__DATE__,
7781
__TIME__,
7882
TOOLS_GIT_SHA);

common/tools_version.py.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
# To be replaced by an external script:
3333
TOOLS_GIT_SHA="@TOOLS_GIT_SHA@"
34-
MFT_VERSION_STR="@MFT_VERSION_STR@"
34+
MSTFLINT_VERSION_STR="@MSTFLINT_VERSION_STR@"
3535
TOOLS_BUILD_TIME="@TOOLS_BUILD_TIME@"
3636

3737
####################################################################
@@ -43,7 +43,7 @@ def GetVersionString(execName, toolVersion = None):
4343
else:
4444
res = "%s %s, " % (execName,toolVersion)
4545

46-
res += "%s, built on %s. Git SHA Hash: %s" % (MFT_VERSION_STR, TOOLS_BUILD_TIME, TOOLS_GIT_SHA)
46+
res += "%s, built on %s. Git SHA Hash: %s" % (MSTFLINT_VERSION_STR, TOOLS_BUILD_TIME, TOOLS_GIT_SHA)
4747
return res;
4848
####################################################################
4949
def PrintVersionString(execName, toolVersion = None):

configure.ac

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
dnl Process this file with autoconf to produce a configure script.
22

3-
AC_INIT(mstflint, 4.10.0, [email protected])
3+
AC_INIT(mstflint, 4.11.0, [email protected])
44

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

8-
AC_DEFINE_UNQUOTED([VERSION], ["4.10.0"], [Define the project version.])
8+
AC_DEFINE_UNQUOTED([VERSION], ["4.11.0"], [Define the project version.])
99
AC_SUBST([VERSION])
1010

1111
AC_CONFIG_AUX_DIR(config)
@@ -28,6 +28,8 @@ if test "x$OS" = "xFreeBSD"; then
2828
AC_MSG_NOTICE(FreeBSD Build)
2929
MTCR_CONF_DIR="mtcr_freebsd"
3030
default_en_inband="no"
31+
CXXFLAGS="${CXXFLAGS} -isystem /usr/local/include"
32+
LDFLAGS="${LDFLAGS} -L/usr/local/lib"
3133
else
3234
MTCR_CONF_DIR="mtcr_ul"
3335
LDL="-ldl"
@@ -41,7 +43,7 @@ dnl Checks for headers
4143
AC_CHECK_HEADER(termios.h,[CXXFLAGS="${CXXFLAGS} -DHAVE_TERMIOS_H"])
4244
TOOLS_CRYPTO=""
4345
MAD_IFC=""
44-
MLXFWUPDATE=""
46+
FW_MGR_TOOLS=""
4547

4648
COMPILER_FPIC="-fPIC"
4749
AC_SUBST(COMPILER_FPIC)
@@ -67,8 +69,8 @@ AC_MSG_RESULT($enable_fw_mgr)
6769
if test "x$enable_fw_mgr" = "xyes"; then
6870
AC_CHECK_HEADER(curl/curl.h,,AC_MSG_ERROR([cannot find curl/curl.h . this header is needed for compiling fw manager tool]))
6971
AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR([cannot find zlib.h . this header is needed for compiling fw manager tool]))
70-
AC_CHECK_HEADER(lzma.h,,AC_MSG_ERROR([cannot find lzma.h . this header is needed for compiling fw manager tool]))
7172
AC_CHECK_LIB(z, uncompress,, AC_MSG_ERROR([cannot find zlib uncompress() function.]))
73+
AC_CHECK_HEADER(lzma.h,,AC_MSG_ERROR([Cannot find lzma.h.]))
7274
AC_CHECK_LIB(boost_regex, regcompA,, AC_MSG_ERROR([cannot find boost_regex regcompA() function. Try re-installing the library...]))
7375
CURL_INC_DIR=/usr/include/curl/
7476
fi
@@ -130,11 +132,11 @@ if test "x$enable_cs" = "xyes"; then
130132
TOOLS_CRYPTO="tools_crypto"
131133
fi
132134

133-
AC_MSG_CHECKING(--enable-openssl argument)
135+
AC_MSG_CHECKING(--disable-openssl argument)
134136
AC_ARG_ENABLE(openssl,
135-
[ --enable-openssl Enable all openssl features, dependant of openssl library],
136-
[enable_openssl="yes"],
137-
[enable_openssl="no"])
137+
[ --disable-openssl Disable all openssl features, dependant of openssl library],
138+
[enable_openssl=$enableval],
139+
[enable_openssl="yes"])
138140
AC_MSG_RESULT($enable_openssl)
139141
if test "x$enable_openssl" = "xyes"; then
140142
AC_CHECK_HEADER(openssl/sha.h,,AC_MSG_ERROR([cannot find openssl/sha.h . remove --enable-openssl to remove this dependaency or install openssl]))
@@ -163,38 +165,56 @@ AS_IF([test "x$enable_dynamic_ld" = "xyes"], [
163165
LDFLAGS="$LDFLAGS -Wl,--dynamic-linker=/lib64/ld64.so.2"
164166
])
165167

166-
CFLAGS="$CFLAGS -Werror -DMST_UL"
167-
CXXFLAGS="$CXXFLAGS -Werror -DMST_UL"
168+
CFLAGS="$CFLAGS -DMST_UL"
169+
CXXFLAGS="$CXXFLAGS -DMST_UL"
170+
171+
AM_CFLAGS="-Wall -Werror"
172+
AM_CXXFLAGS="-Wall -Werror"
168173

169174
AC_CONFIG_FILES( mstflint.spec )
170175

176+
# We save and restore CFLAGS, after adding Wall and Werror
177+
# because AX_CHECK_COMPILE_FLAG doesn't work properly without it
178+
171179
# C related ignores
180+
OLD_CFLAGS="$CFLAGS"
181+
CFLAGS="$CFLAGS -Wall -Werror"
172182
AX_CHECK_COMPILE_FLAG([-Wno-format-overflow], [CFLAGS="$CFLAGS -Wno-format-overflow"], [], [])
173183
AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CFLAGS="$CFLAGS -Wno-implicit-fallthrough"], [], [])
174184
AX_CHECK_COMPILE_FLAG([-Wno-cast-function-type], [CFLAGS="$CFLAGS -Wno-cast-function-type"], [], [])
185+
CFLAGS="$OLD_CFLAGS"
175186

176187
# C++ related ignores
188+
OLD_CXXFLAGS="$CXXFLAGS"
189+
CXXFLAGS="$CXXFLAGS -Wall -Werror"
177190
AC_LANG_PUSH([C++])
178191
AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CXXFLAGS="$CXXFLAGS -Wno-implicit-fallthrough"], [], [])
179192
AX_CHECK_COMPILE_FLAG([-Wno-format-overflow], [CXXFLAGS="$CXXFLAGS -Wno-format-overflow"], [], [])
180193
AX_CHECK_COMPILE_FLAG([-Wno-cast-function-type], [CXXFLAGS="$CXXFLAGS -Wno-cast-function-type"], [], [])
181194
AX_CHECK_COMPILE_FLAG([-Wno-class-memaccess], [CXXFLAGS="$CXXFLAGS -Wno-class-memaccess"], [], [])
182195
AC_LANG_POP([C++])
196+
CXXFLAGS="$OLD_CXXFLAGS"
183197

184198
TOOLS_BUILD_TIME=`date +"%b %d %Y\, %H:%M:%S"`
185199
AC_SUBST(TOOLS_BUILD_TIME)
186200

187-
AC_ARG_VAR(MFT_VERSION_STR, The MSTFLINT version)
188-
if test x"$MFT_VERSION_STR" == x; then
189-
MFT_VERSION_STR="$PACKAGE_STRING"
201+
AC_ARG_VAR(MSTFLINT_VERSION_STR, The MSTFLINT version)
202+
if test x"$MSTFLINT_VERSION_STR" == x; then
203+
MSTFLINT_VERSION_STR="$PACKAGE_STRING"
190204
fi
191-
AC_SUBST(MFT_VERSION_STR)
205+
206+
AC_SUBST(MSTFLINT_VERSION_STR)
207+
AC_DEFINE([MSTFLINT_VERSION_STR], [], [The MSTFLINT version])
208+
AC_DEFINE_UNQUOTED(MSTFLINT_VERSION_STR, "$MSTFLINT_VERSION_STR")
209+
192210

193211
AC_ARG_VAR(TOOLS_GIT_SHA, The MSTFLINT tree git sha hash version)
194212
if test x"$TOOLS_GIT_SHA" == x; then
195213
TOOLS_GIT_SHA="N/A"
196214
fi
197215
AC_SUBST(TOOLS_GIT_SHA)
216+
AC_DEFINE([TOOLS_GIT_SHA], [], [The MSTFLINT tree git sha hash version])
217+
AC_DEFINE_UNQUOTED(TOOLS_GIT_SHA, "$TOOLS_GIT_SHA")
198218

199219
AS_IF([test "x$enable_cs" = "xyes" || test "x$enable_openssl" = "xyes"], [
200220
AC_CONFIG_FILES(tools_crypto/Makefile)
@@ -205,18 +225,14 @@ AS_IF([test "x$enable_openssl" = "xyes"], [
205225
])
206226

207227
AS_IF([test "x$enable_fw_mgr" = "xyes"], [
208-
AC_CONFIG_FILES(mlxfwupdate/Makefile)
209-
AC_CONFIG_FILES(libmfa/Makefile)
210228
AC_CONFIG_FILES(xz_utils/Makefile)
229+
AC_CONFIG_FILES(mlxfwupdate/Makefile)
211230
AC_CONFIG_FILES(ext_libs/iniParser/Makefile)
212-
AC_CONFIG_FILES(ext_libs/json/Makefile)
213-
AC_CONFIG_FILES(ext_libs/minixz/Makefile)
214-
MLXFWUPDATE="libmfa xz_utils mlxfwupdate"
231+
AC_CONFIG_FILES(mlxarchive/Makefile)
232+
FW_MGR_TOOLS="xz_utils mlxfwupdate mlxarchive"
215233
])
216234

217-
AC_SUBST(MLXFWUPDATE)
218-
219-
235+
AC_SUBST(FW_MGR_TOOLS)
220236

221237
if test "x$OS" = "xFreeBSD"; then
222238
AC_MSG_NOTICE(FreeBSD MTCR)
@@ -226,8 +242,8 @@ else
226242
AC_CONFIG_FILES(mtcr_ul/Makefile)
227243
fi
228244

229-
AC_OUTPUT( Makefile common/Makefile mft_utils/Makefile mtcr_py/Makefile ext_libs/Makefile ext_libs/sqlite/Makefile ext_libs/muparser/Makefile dev_mgt/Makefile tools_layouts/Makefile reg_access/Makefile \
230-
cmdif/Makefile tools_res_mgmt/Makefile mlxconfig/Makefile mlxconfig/mlxconfig_dbs/Makefile mflash/Makefile mlxfwops/Makefile mlxfwops/lib/Makefile cmdparser/Makefile flint/Makefile \
231-
small_utils/Makefile small_utils/mlxfwresetlib/Makefile mstdump/Makefile mstdump/crd_lib/Makefile mstdump/crd_main/Makefile mstdump/mstdump_dbs/Makefile mvpd/Makefile \
232-
fw_comps_mgr/Makefile mad_ifc/Makefile )
245+
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 \
246+
tools_layouts/Makefile reg_access/Makefile cmdif/Makefile libmfa/Makefile tools_res_mgmt/Makefile mlxconfig/Makefile mlxconfig/mlxconfig_dbs/Makefile mflash/Makefile mlxfwops/Makefile mlxfwops/lib/Makefile cmdparser/Makefile flint/Makefile \
247+
small_utils/Makefile small_utils/mlxfwresetlib/Makefile mstdump/Makefile mstdump/crd_lib/Makefile mstdump/crd_main/Makefile mstdump/mstdump_dbs/Makefile mvpd/Makefile \
248+
fw_comps_mgr/Makefile mad_ifc/Makefile )
233249

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
mstflint (4.11.0-1) unstable; urgency=low
2+
3+
* Updated from MFT-4.11.0. Added new tools: mlxarchive and mstprivhost.
4+
5+
-- Dan Goldberg <dang@unknown> Wed, 21 Nov 2018 16:00:00 +0200
6+
17
mstflint (4.10.0-1) unstable; urgency=low
28

39
* Updated from MFT-4.10.0

dev_mgt/tools_dev_types.c

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include <errno.h>
4646
#include <reg_access/reg_access.h>
4747
#include "tools_dev_types.h"
48+
#include "mflash/mflash_types.h"
4849

4950
enum dm_dev_type {
5051
DM_UNKNOWN = -1,
@@ -65,10 +66,10 @@ struct device_info {
6566
enum dm_dev_type dev_type;
6667
};
6768

68-
#define DEVID_ADDR 0xf0014
69-
#define CABLEID_ADDR 0x0
70-
#define SFP_51_ADDR 92
71-
#define SFP_51_PAGING_ADDR 64
69+
#define DEVID_ADDR 0xf0014
70+
#define CABLEID_ADDR 0x0
71+
#define SFP_DIGITAL_DIAGNOSTIC_MONITORING_IMPLEMENTED_ADDR 92
72+
#define SFP_PAGING_IMPLEMENTED_INDICATOR_ADDR 64
7273

7374
#ifdef CABLES_SUPP
7475
enum dm_dev_type getCableType(u_int8_t id)
@@ -276,7 +277,7 @@ static struct device_info g_devs_info[] = {
276277
-1, //hw_rev_i
277278
-1, //sw_dev_i
278279
"Spectrum2", //name
279-
64, //port_num
280+
128, //port_num
280281
DM_SWITCH //dev_type
281282
},
282283
{
@@ -297,6 +298,15 @@ static struct device_info g_devs_info[] = {
297298
80, //port_num
298299
DM_SWITCH //dev_type
299300
},
301+
{
302+
DeviceSecureHost, //dm_id
303+
0xcafe, //hw_dev_i
304+
0xd0, //hw_rev_i
305+
0, //sw_dev_i
306+
"Unknown Device", //name
307+
-1, //port_num
308+
DM_UNKNOWN //dev_type
309+
},
300310
{
301311
DeviceUnknown, //dm_id
302312
0, //hw_dev_i
@@ -366,7 +376,7 @@ int dm_get_device_id(mfile *mf,
366376
u_int8_t id = EXTRACT(dword, 0, 8);
367377
enum dm_dev_type cbl_type = getCableType(id);
368378
if (cbl_type == DM_QSFP_CABLE) {
369-
// Get Byte 2 bit 2 ~ bit 18
379+
// Get Byte 2 bit 2 ~ bit 18 (flat_mem : upper memory flat or paged. 0=paging, 1=page 0 only)
370380
u_int8_t paging = EXTRACT(dword, 18, 1);
371381
//printf("DWORD: %#x, paging: %d\n", dword, paging);
372382
if (paging == 0) {
@@ -376,18 +386,18 @@ int dm_get_device_id(mfile *mf,
376386
}
377387
} else if (cbl_type == DM_SFP_CABLE) {
378388
*ptr_dm_dev_id = DeviceCableSFP;
379-
if (mread4(mf, SFP_51_ADDR, &dword) != 4) {
389+
if (mread4(mf, SFP_DIGITAL_DIAGNOSTIC_MONITORING_IMPLEMENTED_ADDR, &dword) != 4) {
380390
//printf("FATAL - crspace read (0x%x) failed: %s\n", DEVID_ADDR, strerror(errno));
381391
return 1;
382392
}
383-
u_int8_t byte = EXTRACT(dword, 6, 1); //Byte 92 bit 6
393+
u_int8_t byte = EXTRACT(dword, 6, 1); //Byte 92 bit 6 (digital diagnostic monitoring implemented)
384394
if (byte) {
385395
*ptr_dm_dev_id = DeviceCableSFP51;
386-
if (mread4(mf, SFP_51_PAGING_ADDR, &dword) != 4) {
396+
if (mread4(mf, SFP_PAGING_IMPLEMENTED_INDICATOR_ADDR, &dword) != 4) {
387397
//printf("FATAL - crspace read (0x%x) failed: %s\n", DEVID_ADDR, strerror(errno));
388398
return 1;
389399
}
390-
byte = EXTRACT(dword, 4, 1); //Byte 64 bit 4
400+
byte = EXTRACT(dword, 4, 1); //Byte 64 bit 4 (paging implemented indicator)
391401
if (byte) {
392402
*ptr_dm_dev_id = DeviceCableSFP51Paging;
393403
}
@@ -429,7 +439,7 @@ int dm_get_device_id(mfile *mf,
429439
}
430440
} else {
431441
if (mread4(mf, DEVID_ADDR, &dword) != 4) {
432-
//printf("FATAL - crspace read (0x%x) failed: %s\n", DEVID_ADDR, strerror(errno));
442+
printf("FATAL - crspace read (0x%x) failed: %s\n", DEVID_ADDR, strerror(errno));
433443
return 1;
434444
}
435445

@@ -442,8 +452,8 @@ int dm_get_device_id(mfile *mf,
442452
if (*ptr_dm_dev_id == DeviceUnknown) {
443453

444454
/* Dev id not matched in array */
445-
//printf("FATAL - Can't find devid id\n");
446-
return 1; // TODO - fix return vals.
455+
printf("FATAL - Can't find device id.\n");
456+
return MFE_UNSUPPORTED_DEVICE;
447457
}
448458
return 0;
449459
}
@@ -453,7 +463,7 @@ int dm_get_device_id_offline(u_int32_t devid,
453463
dm_dev_id_t *ptr_dev_type)
454464
{
455465
*ptr_dev_type = get_entry_by_dev_rev_id(devid, chip_rev)->dm_id;
456-
return *ptr_dev_type == DeviceUnknown;
466+
return *ptr_dev_type == DeviceUnknown ? MFE_UNSUPPORTED_DEVICE: MFE_OK;
457467
}
458468

459469
const char* dm_dev_type2str(dm_dev_id_t type)

0 commit comments

Comments
 (0)