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 94E2E313E23; Tue, 2 Sep 2025 13:40:35 +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=1756820435; cv=none; b=c8CBDBvxIYViIB+XW1hUPgaLC3X4WSc2dyHsi0vEsMXz4ZawakRW7Os3nNyijtxWROY+p9K9mhWulKEqiuGmxKl1oIMLvC5qHIBZXfSGmkiBFYXYMs3Sd+fugK5fTkzwMl+18ODhRMgaAqTb6SImEatS7w0GCxjwENqnuJzvJDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756820435; c=relaxed/simple; bh=qwVmq/dSOh1irhGzp8B6OPWFqxgzMQPNi46kGSlR2dw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F6RQQVywTptuHmIANElBrUSUY1P6QolNcMin28UW3VZ4TvcetzNRF0tLMjPgpTC503qEshUT8fPsX45+QpYA8ZjGScVkJ6saEV4ro40copKvWvMsT/CoaiRrHlAtxt1xeJV9c2eq72ehYz7QnL9p1HONfUOKsBJA7Mi4W1vqwMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GRNSerN4; 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="GRNSerN4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C483C4CEED; Tue, 2 Sep 2025 13:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756820435; bh=qwVmq/dSOh1irhGzp8B6OPWFqxgzMQPNi46kGSlR2dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GRNSerN4osB/3K41qhSZ3OsQ4hAo8O3067LTUF6oIHVGvTEGEq5u/b03TixJ1aFqk 2o+KOv7MlPirUR7GQJAQ23P1WXoSQilmhLrjo379tHbClWxGamIacKwHxr/e7iF/zd iLfug+03iu2zTeXqp16Bmr2bywdXHD0mkO7CpQrA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Lazar , Tariq Toukan , Dragos Tatulea , Mark Bloch , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 28/50] net/mlx5e: Set local Xoff after FW update Date: Tue, 2 Sep 2025 15:21:19 +0200 Message-ID: <20250902131931.638981475@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250902131930.509077918@linuxfoundation.org> References: <20250902131930.509077918@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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexei Lazar [ Upstream commit aca0c31af61e0d5cf1675a0cbd29460b95ae693c ] The local Xoff value is being set before the firmware (FW) update. In case of a failure where the FW is not updated with the new value, there is no fallback to the previous value. Update the local Xoff value after the FW has been successfully set. Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration") Signed-off-by: Alexei Lazar Reviewed-by: Tariq Toukan Reviewed-by: Dragos Tatulea Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250825143435.598584-12-mbloch@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c index c9d5d8d93994d..7899a7230299d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c @@ -346,7 +346,6 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv, if (err) return err; } - priv->dcbx.xoff = xoff; /* Apply the settings */ if (update_buffer) { @@ -355,6 +354,8 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv, return err; } + priv->dcbx.xoff = xoff; + if (update_prio2buffer) err = mlx5e_port_set_priority2buffer(priv->mdev, prio2buffer); -- 2.50.1