From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04BBA1DED77; Wed, 19 Feb 2025 09:09:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739956190; cv=none; b=SG68SfEgAOTL8UxAqvR8ZY/Z0yVrYMaiFk5+yzrMFYl26fWePoFyZHnbFxXCr5Ga4j1ljP95D3kZxljYRSNODZa2/VehWy3E8uIKBa/oGmPfjKDq8FlAujbQ+vywk22xnC3dn1+jKoRD4FfMlXYBe23SYcNAVgnImybZRI8774Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739956190; c=relaxed/simple; bh=2p7OGo/D/X8PBqPrWHAHH06UV5d/xh7VeENj4WjlNuQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=raBy7Hvm2NVnSRHdnigyJUATCNWPZOtu9U9ozIS7yLIbbvOrKItOxzNZEabysq3xAUWr4X29Eq97A4NDmV0mQt9erReGwAoC9UClAuObRgLYVJbE8z3BKCwbb+ac0HGw7IM3r8KcrwhwKH5DTqmIceNlOddFeTbQcA9EKx+5G1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EuCeFR9r; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EuCeFR9r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CF45C4CED1; Wed, 19 Feb 2025 09:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739956189; bh=2p7OGo/D/X8PBqPrWHAHH06UV5d/xh7VeENj4WjlNuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EuCeFR9r8L5CypOlCd9jz5suoGL7+j9aJFG6P+ghoTVaeLbfi8+49ubl700vgC0Qv xi/L4WXn7tkY5rBHh9rJ109dU4BgBnsjW6dUG7TyrfRSPZ9aPARAK/QeIom/5HM1V+ oHDgcffBKz5lOemDpXWDBIcSlN9ik3T0zNZzfYZM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Maher Sanalla , Moshe Shemesh , Ido Schimmel , Michal Swiatkowski , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 095/578] net/mlxfw: Drop hard coded max FW flash image size Date: Wed, 19 Feb 2025 09:21:39 +0100 Message-ID: <20250219082656.694863432@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082652.891560343@linuxfoundation.org> References: <20250219082652.891560343@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maher Sanalla [ Upstream commit 70d81f25cc92cc4e914516c9935ae752f27d78ad ] 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: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process") Signed-off-by: Maher Sanalla Signed-off-by: Moshe Shemesh Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Reviewed-by: Michal Swiatkowski Link: https://patch.msgid.link/1737030796-1441634-1-git-send-email-moshe@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c b/drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c index 46245e0b24623..43c84900369a3 100644 --- a/drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c +++ b/drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c @@ -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); -- 2.39.5