net/mlxfw: Drop hard coded max FW flash image size
Subsystems (3)
PATCH 1/1 net/mlxfw: Drop hard coded max FW flash image size
From: Maher Sanalla <[email protected]>
Currently, mlxfw kernel module limits FW flash image size to be 10MB at most, preventing the ability to burn recent BlueField-3 FW that exceeds the said size limit.
Thus, drop the hard coded limit. Instead, rely on FW's max_component_size threshold that is reported in MCQI register as the size limit for FW image.
--- drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c +0 -2
@@ -14,7 +14,6 @@#define MLXFW_FSM_STATE_WAIT_TIMEOUT_MS 30000#define MLXFW_FSM_STATE_WAIT_ROUNDS \ (MLXFW_FSM_STATE_WAIT_TIMEOUT_MS / MLXFW_FSM_STATE_WAIT_CYCLE_MS) -#define MLXFW_FSM_MAX_COMPONENT_SIZE (10 * (1 << 20))static const int mlxfw_fsm_state_errno[] = { [MLXFW_FSM_STATE_ERR_ERROR ] = -EIO ,
@@ -229,7 +228,6 @@ static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,return err; } - comp_max_size =min_t (u32, comp_max_size,MLXFW_FSM_MAX_COMPONENT_SIZE );if (comp->data_size > comp_max_size) {MLXFW_ERR_MSG (mlxfw_dev, extack,"Component size is bigger than limit" , -EINVAL );
Signature · 1 line
2.18.2
Quoted 6 lines · Moshe Shemesh
From: Maher Sanalla <[email protected]>
Currently, mlxfw kernel module limits FW flash image size to be 10MB at most, preventing the ability to burn recent BlueField-3 FW that exceeds the said size limit.
Quoted 8 lines
Thus, drop the hard coded limit. Instead, rely on FW's
max_component_sizethreshold that is reported in MCQI register as the size limit for FW image.Fixes 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process")Cc Ido Schimmel <[email protected]>Signed-off-by Maher Sanalla <[email protected]>Signed-off-by Moshe Shemesh <[email protected]>
Tested on Spectrum-{1,2,3,4}.
Quoted 31 lines · Moshe Shemesh
From: Maher Sanalla <[email protected]>
Currently, mlxfw kernel module limits FW flash image size to be 10MB at most, preventing the ability to burn recent BlueField-3 FW that exceeds the said size limit.
Thus, drop the hard coded limit. Instead, rely on FW's
max_component_sizethreshold that is reported in MCQI register as the size limit for FW image.Fixes 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process")Cc Ido Schimmel <[email protected]>Signed-off-by Maher Sanalla <[email protected]>Signed-off-by Moshe Shemesh <[email protected]>--- drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 2 -- 1 file changed, 2 deletions(-)drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c +0
-1@@ -14,7 +14,6 @@#define MLXFW_FSM_STATE_WAIT_TIMEOUT_MS 30000#define MLXFW_FSM_STATE_WAIT_ROUNDS \ (MLXFW_FSM_STATE_WAIT_TIMEOUT_MS / MLXFW_FSM_STATE_WAIT_CYCLE_MS) -#define MLXFW_FSM_MAX_COMPONENT_SIZE (10 * (1 << 20))static const int mlxfw_fsm_state_errno[] = { [MLXFW_FSM_STATE_ERR_ERROR ] = -EIO ,
drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev, · line 233
Quoted 7 lines
drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c +0
-1@@ -229,7 +228,6 @@ static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,return err; } - comp_max_size =min_t (u32, comp_max_size,MLXFW_FSM_MAX_COMPONENT_SIZE );if (comp->data_size > comp_max_size) {MLXFW_ERR_MSG (mlxfw_dev, extack,"Component size is bigger than limit" , -EINVAL );
Quoted 2 lines
Signature · 1 line
2.18.2
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Thu, 16 Jan 2025 14:33:16 +0200 you wrote:
From: Maher Sanalla <[email protected]>
Currently, mlxfw kernel module limits FW flash image size to be 10MB at most, preventing the ability to burn recent BlueField-3 FW that exceeds the said size limit.
Thus, drop the hard coded limit. Instead, rely on FW's
max_component_sizethreshold that is reported in MCQI register as the size limit for FW image.[...]
Here is the summary with links:
- [net] net/mlxfw: Drop hard coded max FW flash image size
https://git.kernel.org/netdev/net/c/70d81f25cc92
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html