-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit updates the mstflint package to the latest 4.31.0 release. It also includes patches to fix some build errors that have been merged into their development branch [1] but are not inside the current release version. [1] Mellanox/mstflint#1131 Signed-off-by: Til Kaiser <mail@tk154.de>
- Loading branch information
Showing
4 changed files
with
140 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
utils/mstflint/patches/0001-fwctrl-include-missing-function-declarations.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
From 215d3c274125321ea6254b59dc28996370705d5e Mon Sep 17 00:00:00 2001 | ||
From: Til Kaiser <mail@tk154.de> | ||
Date: Fri, 7 Feb 2025 14:26:52 +0100 | ||
Subject: [PATCH 1/3] fwctrl: include missing function declarations | ||
|
||
The fwctrl fails to build with the following error: | ||
|
||
fwctrl.c: In function 'fwctl_control_access_register': | ||
fwctrl.c:190:27: error: implicit declaration of function 'return_by_reg_status' [-Wimplicit-function-declaration] | ||
190 | *reg_status = return_by_reg_status(cmd_status); | ||
| ^~~~~~~~~~~~~~~~~~~~ | ||
In file included from fwctrl.c:45: | ||
fwctrl.c:195:56: error: implicit declaration of function 'm_err2str' [-Wimplicit-function-declaration] | ||
195 | reg_id, cmd_status, *reg_status, m_err2str(status)); | ||
| | ||
|
||
This commit adds the return_by_reg_status prototype to the | ||
mtcr_ul_com.h file and includes mtcr_ul_com.h and mtcr.h | ||
(where the m_err2str prototype is defined) inside fwctrl.c. | ||
|
||
Signed-off-by: Til Kaiser <mail@tk154.de> | ||
--- | ||
mtcr_ul/fwctrl.c | 2 ++ | ||
mtcr_ul/mtcr_ul_com.h | 2 ++ | ||
2 files changed, 4 insertions(+) | ||
|
||
diff --git a/mtcr_ul/fwctrl.c b/mtcr_ul/fwctrl.c | ||
index f000e9e1..90da0b54 100644 | ||
--- a/mtcr_ul/fwctrl.c | ||
+++ b/mtcr_ul/fwctrl.c | ||
@@ -40,7 +40,9 @@ | ||
#include <errno.h> | ||
#include <string.h> | ||
#include <stddef.h> | ||
+#include "mtcr.h" | ||
#include "mtcr_mf.h" | ||
+#include "mtcr_ul_com.h" | ||
#include "fwctrl.h" | ||
#include "fwctrl_ioctl.h" | ||
|
||
diff --git a/mtcr_ul/mtcr_ul_com.h b/mtcr_ul/mtcr_ul_com.h | ||
index 6d502d0d..8e298bd8 100644 | ||
--- a/mtcr_ul/mtcr_ul_com.h | ||
+++ b/mtcr_ul/mtcr_ul_com.h | ||
@@ -165,6 +165,8 @@ int mclear_pci_semaphore_ul(const char* name); | ||
|
||
int mvpd_read4_ul(mfile* mf, unsigned int offset, u_int8_t value[4]); | ||
|
||
+int return_by_reg_status(int reg_status); | ||
+ | ||
int space_to_cap_offset(int space); | ||
|
||
int get_dma_pages(mfile* mf, struct mtcr_page_info* page_info, int page_amount); | ||
-- | ||
2.48.1 | ||
|
45 changes: 45 additions & 0 deletions
45
utils/mstflint/patches/0002-fwctrl-fix-reg-status-typo.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From 873c1822521b0524571ba54f4ce5d565fbf59c1f Mon Sep 17 00:00:00 2001 | ||
From: Til Kaiser <mail@tk154.de> | ||
Date: Fri, 7 Feb 2025 14:42:25 +0100 | ||
Subject: [PATCH 2/3] fwctrl: fix reg status typo | ||
|
||
There is the following build error: | ||
|
||
fwctrl.c: In function 'fwctl_control_access_register': | ||
fwctrl.c:197:66: error: incompatible type for argument 1 of 'm_err2str' | ||
197 | reg_id, cmd_status, *reg_status, m_err2str(status)); | ||
| ^~~~~~ | ||
| | | ||
| void * | ||
../include/mtcr_ul/fwctrl_ioctl.h:47:81: note: in definition of macro 'FWCTL_DEBUG_PRINT' | ||
47 | printf("%s: %s %d: " format, FWCTL_ENV_VAR_DEBUG, __func__, __LINE__, ##arg); \ | ||
| ^~~ | ||
In file included from fwctrl.c:43: | ||
../include/mtcr_ul/mtcr.h:173:30: note: expected 'MError' but argument is of type 'void *' | ||
173 | const char* m_err2str(MError status); | ||
| ~~~~~~~^~~~~~ | ||
|
||
Looking at the format string, this seems to be just a typo, | ||
so fix that to the correct variable name. | ||
|
||
Signed-off-by: Til Kaiser <mail@tk154.de> | ||
--- | ||
mtcr_ul/fwctrl.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/mtcr_ul/fwctrl.c b/mtcr_ul/fwctrl.c | ||
index 90da0b54..a49e6c80 100644 | ||
--- a/mtcr_ul/fwctrl.c | ||
+++ b/mtcr_ul/fwctrl.c | ||
@@ -194,7 +194,7 @@ int fwctl_control_access_register(int fd, | ||
} | ||
|
||
FWCTL_DEBUG_PRINT(mf, "register id = 0x%x, command status = 0x%x, reg status code: 0x%x, reg status: %s\n", | ||
- reg_id, cmd_status, *reg_status, m_err2str(status)); | ||
+ reg_id, cmd_status, *reg_status, m_err2str(*reg_status)); | ||
out: | ||
free(out); | ||
free(in); | ||
-- | ||
2.48.1 | ||
|
36 changes: 36 additions & 0 deletions
36
utils/mstflint/patches/0003-dev_mgt-include-missing-function-declaration.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From dea0155b131b55cdc1bb3bc867ad53c1782fa724 Mon Sep 17 00:00:00 2001 | ||
From: Til Kaiser <mail@tk154.de> | ||
Date: Fri, 7 Feb 2025 14:52:35 +0100 | ||
Subject: [PATCH 3/3] dev_mgt: include missing function declaration | ||
|
||
The dev_mgt fails to build with the following error: | ||
|
||
tools_dev_types.c: In function 'dm_get_device_id_inner': | ||
tools_dev_types.c:695:13: error: implicit declaration of function 'read_device_id'; did you mean 'dm_get_device_id'? [-Wimplicit-function-declaration] | ||
695 | if (read_device_id(mf, &dword) != 4) { | ||
| ^~~~~~~~~~~~~~ | ||
| dm_get_device_id | ||
|
||
This commit includes mtcr_ul_com.h (where read_device_id | ||
is defined) into tools_dev_types.c to fix the error. | ||
|
||
Signed-off-by: Til Kaiser <mail@tk154.de> | ||
--- | ||
dev_mgt/tools_dev_types.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/dev_mgt/tools_dev_types.c b/dev_mgt/tools_dev_types.c | ||
index 9bef50b3..ed18c910 100644 | ||
--- a/dev_mgt/tools_dev_types.c | ||
+++ b/dev_mgt/tools_dev_types.c | ||
@@ -48,6 +48,7 @@ | ||
#include <tools_layouts/reg_access_hca_layouts.h> | ||
#include "tools_dev_types.h" | ||
#include "mflash/mflash_types.h" | ||
+#include "mtcr_ul/mtcr_ul_com.h" | ||
|
||
enum dm_dev_type { | ||
DM_UNKNOWN = -1, | ||
-- | ||
2.48.1 | ||
|