Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2469515pxb; Mon, 19 Apr 2021 06:31:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4lkK5HkbicCWJJwphTyB08tZ4adbDeX0VivC5RHxPgooIJuokixs5c6m1zkn9Fu1cLauk X-Received: by 2002:a05:6402:278c:: with SMTP id b12mr25879117ede.145.1618839112106; Mon, 19 Apr 2021 06:31:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618839112; cv=none; d=google.com; s=arc-20160816; b=xfPEelLtH7fgVfNkLccXmdolUYkBC/Z+/16WGiLIjKEWBoPcn5S8RY4NrdqDP5/9kB FbJ+J3CntvUeHJ4T0CaogG0qVCzgsRkiK6Bx7C23rIPaP77b15XNd5bXkEjNr051F1hq 7Knm0ivFyFsFb+9Nuw9p+b6UimyEA4EPd7i7Ihaf0ohR2pI4S0LoTMynjiWuCPB+vjOE gf6daHTfgikbWX6jciJJfAlO7mzTth1d/HpgCem5rr1VskTYMnLlXm0p64DiBZI2+XN7 jqmpHb7B+P6Y7ns+Mjv2bsv0yoQyyOKtcF5KG6+DO/dih570g8tF+yf0PLjc4iWSkx45 1e6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RiP1+UpiSU10ZyipqxPRNP3umPfOPgirTwUaBtm+u9c=; b=0+4/pv5iNmQI9p0BAiyJsTZ51xLgovkoNPCjUeFfzK1tz9QftRlhkZCdiCaaQKJYKI jxpfIPwJkl3p0lzgTXtkC+hVhkr2F2gf9MYmrTpQXo8uKyEamFILGLaWuYwb+DiRNr7c KYQdf/C09ONGWuAdu1hWBLUl4HBwfD0jvPlPoGvK5eYuqPBAfXQCZNy4sKREHD+5doBE hbQRTyMlkne4E7r4XItcuO5vbcvPNG8bwEq/NBE5NIDniinTbZNifoANDVIhNuvnaU/R nF0skysUbe5yLwpKBkgjVwG8S/8BCYx5QQFqYuFcmQ59pOB5yLxkrrV9qRcd8j3Zpvdl wWbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1VJzWPNd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si12114258edr.450.2021.04.19.06.31.27; Mon, 19 Apr 2021 06:31:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1VJzWPNd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242790AbhDSN3x (ORCPT + 99 others); Mon, 19 Apr 2021 09:29:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:56922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239808AbhDSNU6 (ORCPT ); Mon, 19 Apr 2021 09:20:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6135D613D9; Mon, 19 Apr 2021 13:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838248; bh=h+YTIdDCopsNT/NMVlSNPpW/uTfALyC3Dv3FlDC8Tys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1VJzWPNdBN1ltmNtYbWhlmJieqEgFvk7ytQv7EjfxtolEE4aC8wFZC7lUG+C9my8z ucfovZa3SBYGvL7WtpmVmutALhoXXY8pERVZxOVfPWaguCPYI7iTIObI8vh6XLlOcj fSElvZH9clLqVTfXSnOrAmn6ZjEqwAJYtgMVEerg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roman Mamedov , Heiner Kallweit , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 096/103] r8169: dont advertise pause in jumbo mode Date: Mon, 19 Apr 2021 15:06:47 +0200 Message-Id: <20210419130531.086618533@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130527.791982064@linuxfoundation.org> References: <20210419130527.791982064@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Heiner Kallweit [ Upstream commit 453a77894efa4d9b6ef9644d74b9419c47ac427c ] It has been reported [0] that using pause frames in jumbo mode impacts performance. There's no available chip documentation, but vendor drivers r8168 and r8125 don't advertise pause in jumbo mode. So let's do the same, according to Roman it fixes the issue. [0] https://bugzilla.kernel.org/show_bug.cgi?id=212617 Fixes: 9cf9b84cc701 ("r8169: make use of phy_set_asym_pause") Reported-by: Roman Mamedov Tested-by: Roman Mamedov Signed-off-by: Heiner Kallweit Cc: stable@vger.kernel.org Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index f981aa899c82..3bb36f4a984e 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -2420,6 +2420,13 @@ static void rtl_jumbo_config(struct rtl8169_private *tp) if (pci_is_pcie(tp->pci_dev) && tp->supports_gmii) pcie_set_readrq(tp->pci_dev, readrq); + + /* Chip doesn't support pause in jumbo mode */ + linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT, + tp->phydev->advertising, !jumbo); + linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, + tp->phydev->advertising, !jumbo); + phy_start_aneg(tp->phydev); } DECLARE_RTL_COND(rtl_chipcmd_cond) @@ -4711,8 +4718,6 @@ static int r8169_phy_connect(struct rtl8169_private *tp) if (!tp->supports_gmii) phy_set_max_speed(phydev, SPEED_100); - phy_support_asym_pause(phydev); - phy_attached_info(phydev); return 0; -- 2.30.2