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 40FE830DEB4; Tue, 2 Sep 2025 13:43:57 +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=1756820637; cv=none; b=u4RptMDmugruIfhtKUPcmp2DcDW8QoHLiPSwZGJtBN/zP0110rKHA1UwAu1m4pCseRxxenw1VDzl7/ee7zXtoX+cCVLJgI9pSZ4VMxqEGQ0hepFBcyLPqMRvekT8V/1fVxHJ1DswH2wdKQoDdZn+U9ZN0YFZcSP57Uq7PoaihBI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756820637; c=relaxed/simple; bh=4wqxBUtblcLB+Y3zCax+IRjQdu0nqLDVBLUHrnLqk+8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XI42lwbZ/ewRID4QDx9AtmX8OA9GXgIP+u9HcaEFD3CduD4Aow7fmBsp+u7zYL7qpr+G2uBDmzPPpxyGKpBLTuUWeyhDC2pawp23K7bQUlHM9CCSgqq/YmHLFQDM4uXZxMhSUIvEWx1V10FzmXd3e9ZOVmxIqUEun0tp33QqKlQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=r64ONtti; 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="r64ONtti" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 955F1C4CEED; Tue, 2 Sep 2025 13:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756820637; bh=4wqxBUtblcLB+Y3zCax+IRjQdu0nqLDVBLUHrnLqk+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r64ONttidR2j6duJAHITMHiQn2wxsCtISgVcev/z7jzlaOHpwZ56f2x/HmShU3D4L OQACPF6PQGgmVrllWk6xEiF19Q+S+gAK4omynHaNTX1Kdto6ULhK8OQzoOhNkXLFuR l8HBMHyMX2Hwj/5+AttoQfahAW1LJ0cFKN33cxJI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexei Lazar , Tariq Toukan , Mark Bloch , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 16/33] net/mlx5e: Update and set Xon/Xoff upon port speed set Date: Tue, 2 Sep 2025 15:21:34 +0200 Message-ID: <20250902131927.690637009@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250902131927.045875971@linuxfoundation.org> References: <20250902131927.045875971@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 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexei Lazar [ Upstream commit d24341740fe48add8a227a753e68b6eedf4b385a ] Xon/Xoff sizes are derived from calculations that include the port speed. These settings need to be updated and applied whenever the port speed is changed. The port speed is typically set after the physical link goes down and is negotiated as part of the link-up process between the two connected interfaces. Xon/Xoff parameters being updated at the point where the new negotiated speed is established. Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration") Signed-off-by: Alexei Lazar Reviewed-by: Tariq Toukan Signed-off-by: Mark Bloch Link: https://patch.msgid.link/20250825143435.598584-11-mbloch@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index bb7e3c80ad74e..cfbc569edfb5f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -104,6 +104,8 @@ void mlx5e_update_carrier(struct mlx5e_priv *priv) if (up) { netdev_info(priv->netdev, "Link up\n"); netif_carrier_on(priv->netdev); + mlx5e_port_manual_buffer_config(priv, 0, priv->netdev->mtu, + NULL, NULL, NULL); } else { netdev_info(priv->netdev, "Link down\n"); netif_carrier_off(priv->netdev); -- 2.50.1