It's not the most elegant of the fixes but properly fixing this requires
rewriting the function.
vpd.c: In function 'pci_read_vpd_dword_gw':
vpd.c:223:31: error: 'sizeof' on array function parameter 'data' will return size of 'unsigned char *' [-Werror=sizeof-array-argument]
ret = pread(fd, data, sizeof data, vpd_cap_offset + VPD_DATA_OFFSET);
^
vpd.c:189:86: note: declared here
int pci_read_vpd_dword_gw(int fd, int vpd_cap_offset, unsigned offset, unsigned char data[4])
^
vpd.c:224:20: error: 'sizeof' on array function parameter 'data' will return size of 'unsigned char *' [-Werror=sizeof-array-argument]
if (ret != sizeof data) {
^
vpd.c:189:86: note: declared here
int pci_read_vpd_dword_gw(int fd, int vpd_cap_offset, unsigned offset, unsigned char data[4])
Signed-off-by: Ana Guerrero López <ana@ekaia.org> Signed-off-by: Adrian Chiris <adrianc@mellanox.com>
fs3_ops.cpp: In member function 'bool Fs3Operations::Fs3GetNewSectionAddr(Fs3Operations::toc_info*, u_int32_t&, bool)':
fs3_ops.cpp:1727:40: error: 'toc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
devInfoAddr1 = (toc->toc_entry.flash_addr << 2) - 0x1000;
^
fs3_ops.cpp: In member function 'bool Fs3Operations::Fs3UpdateSection(void*, fs3_section_t, bool, CommandType, PrintCallBack)':
fs3_ops.cpp:1863:27: error: 'curr_toc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (!Fs3UpdateItocInfo(curr_toc, newSectionAddr, curr_toc->toc_entry.size, newUidSection)) {
^
fs3_ops.cpp: In member function 'bool Fs3Operations::Fs3Burn(Fs3Operations&, FwOperations::ExtBurnParams&)':
fs3_ops.cpp:1068:65: error: 'imageInfoToc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
std::vector<u_int8_t> imageInfoSect = imageInfoToc->section_data;
Signed-off-by: Ana Guerrero López <ana@ekaia.org> Signed-off-by: Adrian Chiris <adrianc@mellanox.com>
Adrian Chiris [Mon, 8 Dec 2014 08:55:24 +0000 (10:55 +0200)]
- addedd support for next gen devices that support new pci capability (0x9)
this capability allows access to : CR-Space , iCMD command ifc to be utilized in the
near future for 5th generation devices and above.
- for compatible device with un-supporting fw current flow is kept
Adrian Chiris [Mon, 17 Nov 2014 16:11:43 +0000 (18:11 +0200)]
- added support for accessing flash through ICMD in mstflint
- initial porting of mft-3.8.0 changes (mflash, mlxfwops, flint, mlxconfig, reg_access)
- added cmdif library : library for sending command to devices that support Tools HCR (ConnectX3 and Connect3Pro devices)
Fix some bugs in mstvpd:
1. mlx5_0 is supported now.
2. Fixed negative timeout.
3. Fixed segmentaion fault when no device was provided
4. Fix return code when the command contain extra flags
Adrian Chiris [Wed, 14 May 2014 07:49:15 +0000 (10:49 +0300)]
applied some patches
main changes:
- compiling mstflint with no termios.h will work
- removed un-needed includes
- mtcr_ul when calling mtcr_mmap() it advances the enable counter when accessing deivce through /sys/bus/pci
- removed some includes from headers and moved them to source files
Adham Masarwah [Mon, 12 May 2014 12:57:18 +0000 (15:57 +0300)]
+ Added support to read VPD in new way from FileSystem path that support concurrency, and parallel access to read VPD.
+ Fix some coding styles.
+ Change some variables' names.
Adrian Chiris [Thu, 10 Apr 2014 13:36:02 +0000 (16:36 +0300)]
-mtcr_ul.c : ported changes from mft-3.6.0 branch
- mxfwops/flint : modifed GetMaxImageSize due to firmware limitations
- mlxconfig: removed bar size configuration as its not supported yet
Oren Kladnitsky [Tue, 24 Dec 2013 12:29:24 +0000 (14:29 +0200)]
Fixed build issues with 3.5.0 porting
- Fixed all makefiles
- The build mistakenly took mtcr.h from MFT installation instead of local version
- Fixed bad MTCR_UL indication macro
- Fixed mstregdump db files path selection
- Updated tools_version
- Added libmtcr_ul.a installation to spec
- Compilation Warning fixes
Oren Kladnitsky [Mon, 23 Dec 2013 15:44:21 +0000 (17:44 +0200)]
Support burning ConnectIB without -override_cache_replacement
When driver is up, mtcr replaces the direct pci access with in-band access to the local device.
Thus fw update is done via FW interface, eliminating colisions between th running FW and the fw update tool
Oren Kladnitsky [Thu, 28 Nov 2013 13:34:36 +0000 (15:34 +0200)]
Added in-band access method over InfiniBand MAD packets
The mtcr_ul lib tools cann now access Mellanox devices via the InfiniBand fabric.
This allows remote access to switches.
Accepted device names:
lid-<target device lid>[,<sending adapter name>,<sending port number>] E.G.: lid-5
ibdr-<dot seperated dr path>,<sending adapter name>,<sending port number> E.G.: ibdr-0.1,mlx5_1,1