Skip to content

Commit 70d81f2

Browse files
msanallakuba-moo
authored andcommitted
net/mlxfw: Drop hard coded max FW flash image size
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. Fixes: 410ed13 ("Add the mlxfw module for Mellanox firmware flash process") Signed-off-by: Maher Sanalla <msanalla@nvidia.com> Signed-off-by: Moshe Shemesh <moshe@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/1737030796-1441634-1-git-send-email-moshe@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent d1f9f79 commit 70d81f2

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#define MLXFW_FSM_STATE_WAIT_TIMEOUT_MS 30000
1515
#define MLXFW_FSM_STATE_WAIT_ROUNDS \
1616
(MLXFW_FSM_STATE_WAIT_TIMEOUT_MS / MLXFW_FSM_STATE_WAIT_CYCLE_MS)
17-
#define MLXFW_FSM_MAX_COMPONENT_SIZE (10 * (1 << 20))
1817

1918
static const int mlxfw_fsm_state_errno[] = {
2019
[MLXFW_FSM_STATE_ERR_ERROR] = -EIO,
@@ -229,7 +228,6 @@ static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,
229228
return err;
230229
}
231230

232-
comp_max_size = min_t(u32, comp_max_size, MLXFW_FSM_MAX_COMPONENT_SIZE);
233231
if (comp->data_size > comp_max_size) {
234232
MLXFW_ERR_MSG(mlxfw_dev, extack,
235233
"Component size is bigger than limit", -EINVAL);

0 commit comments

Comments
 (0)