From nobody Mon Sep 29 21:08:03 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BFB6C32763 for ; Tue, 16 Aug 2022 00:08:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356656AbiHPAHt (ORCPT ); Mon, 15 Aug 2022 20:07:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352126AbiHPAAN (ORCPT ); Mon, 15 Aug 2022 20:00:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 378D1165715; Mon, 15 Aug 2022 13:21:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E6E3EB80EA8; Mon, 15 Aug 2022 20:21:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43BC8C433C1; Mon, 15 Aug 2022 20:21:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594874; bh=2Wgq8qY/SEwnYEC3euAXi6f1iOUx8n9AbuUp4mRrAVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IOx4uJtKmSo9JoMHphns2wEkrMkPfOx46fZDaud10PmqcJuJgR3DRHzOqlq4LkNUU SNVOEDWGY0zuR55RjW0+pRtYS6mCx7Mc70950FwjxeE4q6n3rnIRCdLMjkhjKKC8Bg sLGXyvwRnshyIX50ph25XuB4rnTi+ttZC3uHKasU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maher Sanalla , Maor Gottlieb , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.19 0553/1157] net/mlx5: Adjust log_max_qp to be 18 at most Date: Mon, 15 Aug 2022 19:58:29 +0200 Message-Id: <20220815180501.759624810@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Maher Sanalla [ Upstream commit a6e9085d791f8306084fd5bc44dd3fdd4e1ac27b ] The cited commit limited log_max_qp to be 17 due to FW capabilities. Recently, it turned out that there are old FW versions that supported more than 17, so the cited commit caused a degradation. Thus, set the maximum log_max_qp back to 18 as it was before the cited commit. Fixes: 7f839965b2d7 ("net/mlx5: Update log_max_qp value to be 17 at most") Signed-off-by: Maher Sanalla Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/e= thernet/mellanox/mlx5/core/main.c index c9b4e50a593e..95f26624b57c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -524,7 +524,7 @@ static int handle_hca_cap(struct mlx5_core_dev *dev, vo= id *set_ctx) =20 /* Check log_max_qp from HCA caps to set in current profile */ if (prof->log_max_qp =3D=3D LOG_MAX_SUPPORTED_QPS) { - prof->log_max_qp =3D min_t(u8, 17, MLX5_CAP_GEN_MAX(dev, log_max_qp)); + prof->log_max_qp =3D min_t(u8, 18, MLX5_CAP_GEN_MAX(dev, log_max_qp)); } else if (MLX5_CAP_GEN_MAX(dev, log_max_qp) < prof->log_max_qp) { mlx5_core_warn(dev, "log_max_qp value in current profile is %d, changing= it to HCA capability limit (%d)\n", prof->log_max_qp, --=20 2.35.1