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 D2B8614B080; Wed, 5 Feb 2025 14:24:36 +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=1738765476; cv=none; b=lRrEpwGcmSbfccu00oTCDri+rXhNQ4EYLKu+dW9HpJHd0KKVPjD/uj2kcQI9o4zlM1IQAwiE8KNYaSYgsKvFpQmC3MJRaYqSjxKB48JqImwNMqgYSRDTuwK3gTzzUzW7nrgowex8zuBpypS/9rFqCyJXb2cxvOrkrBx8W3rA3so= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738765476; c=relaxed/simple; bh=39JSK4Iz6h3u7Ax5GVS8VZW3CgqvC3dXSLy9TfImukc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dMigO3enEyFf70Usl7Xt9ALSuCCuJTNMPrB3lYAIGj33aOJ8KxSSU7hTC4Ndr4+vJS9blHdDP7++x+wLj5qAuI7jV+QnpbNqMEDVrAlm/mne11mGroSC4L0n7FB9RnJeq2uVWubfKQYRDhgI6CNFYggXVtrJTzqT+DQel/wO08M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Gs6CzLnO; 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="Gs6CzLnO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E7ECC4CED1; Wed, 5 Feb 2025 14:24:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1738765476; bh=39JSK4Iz6h3u7Ax5GVS8VZW3CgqvC3dXSLy9TfImukc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gs6CzLnOGnXl+vBvjlMwvHasizJeS527U5GOBwyCruMkFUHNsQKB2a7j+xWQH3+b9 xo/64Y/ivHq6LMDjqLYHXaqu/BltCgCCOb/vo7SGzAJt3zEwHOCihoeY7Shh+oToHt 21zPV1GeI1ZbY7b4rOMiV98qYxJsu42i1kDOxdp8= 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.12 223/590] net/mlxfw: Drop hard coded max FW flash image size Date: Wed, 5 Feb 2025 14:39:38 +0100 Message-ID: <20250205134503.815526758@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250205134455.220373560@linuxfoundation.org> References: <20250205134455.220373560@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-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