Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2470181pxb; Mon, 19 Apr 2021 06:32:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiDiJLr5vwG1BYLZ9J1sg3TQWujUtfnvgm3zWo1WPNx+s1JT6Maj/UoLHmoUtxwxPqGeNV X-Received: by 2002:a05:6402:254c:: with SMTP id l12mr7104962edb.278.1618839160538; Mon, 19 Apr 2021 06:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618839160; cv=none; d=google.com; s=arc-20160816; b=fTq260TcsnUdJQfTEqJc6MQgY1AYQKM6RlUnC7hT44E1HC5G2m8bCCFWJzHom5xr4j eQqgKyM5Utxq/rzbFtCfoUeQ6rNRYQROzfI3qpFmH/bFTfyTQcbgbd8BiECcZkEw1JrW gAeKEU4gHfYK1QGY8Ngj3e79pv4PSyHgCWJjfp58ObkutWHFGegj/HSO0K6SaXJPpvcp pGPnDgQDxalqV6ybHumzz+wNfjttUz0/fZjifANcp+3YqRDnu8Bs3MK309FKAu3qhzJb xlOJvPZ8JAUKkxbeTlO/OxpI+/psY7SCZP5RZRrBzJsEwgOsKrSBB1WTIYJsOVFxVobe IAcg== 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=VDOFc3sXv/LokBPuPuj2TZFSdjVEmxV8fFBjv4tOmiA=; b=o8E3Be15IDKdKlfIL/X20Y4MjBdKZ94xmTuQH9G1zUQny1/Yvz+VwJTUf3GcHEPMcr 0kdqNk5D3ezWKIXnmTAHvDrdjb86FSD03BHVJLN94Eo0HXELb39dje/GytwOnI8X42Vm /R5cWsQUL5PZ6KexYNNw+bVzY6bIZxQ06LFTBCh8umhDHaa+cLkpadGMTfiVdQQIlGxR rnuePK/OcBDXg4IKqyOG9CawZVGeWyDzpoMoE9iqt4td9Al3XdchLyvLkMRkVmfdb5nM Q5qs4Gr8R2DX1EQYh8eIa1X3wkjvCX/DExtoLek23AVBl7EWiDUJ7ooNbnQ4KFSZu6V5 qvfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yihUVQTj; 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 ca6si8433419edb.84.2021.04.19.06.32.13; Mon, 19 Apr 2021 06:32:40 -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=yihUVQTj; 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 S242724AbhDSN3j (ORCPT + 99 others); Mon, 19 Apr 2021 09:29:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:56886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241564AbhDSNU5 (ORCPT ); Mon, 19 Apr 2021 09:20:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7056D613D1; Mon, 19 Apr 2021 13:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838246; bh=sGvYeRJhS/asiYP2BNSpszk4kJjZ+gDrEDnxuni56EU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yihUVQTjjAmUUMUSJ33hLlffGJ42kNYgFcYS1XOstWcOvTjvUkGcUQ+u06ZhwHFod KSQei0bC7MF9Q9JRQyTmW/oZ/kD3IscRgOZcg2hkRsXXKBrevrsliPGEKmWQHHetnY YedpDIvUVbqIabe0+CgirVy4fLVp5H6TEdASlNLA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiner Kallweit , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 095/103] r8169: tweak max read request size for newer chips also in jumbo mtu mode Date: Mon, 19 Apr 2021 15:06:46 +0200 Message-Id: <20210419130531.050477674@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 5e00e16cb98935bcf06f51931876d898c226f65c ] So far we don't increase the max read request size if we switch to jumbo mode before bringing up the interface for the first time. Let's change this. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/realtek/r8169_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index d634da20b4f9..f981aa899c82 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -2378,13 +2378,14 @@ static void r8168b_1_hw_jumbo_disable(struct rtl8169_private *tp) static void rtl_jumbo_config(struct rtl8169_private *tp) { bool jumbo = tp->dev->mtu > ETH_DATA_LEN; + int readrq = 4096; rtl_unlock_config_regs(tp); switch (tp->mac_version) { case RTL_GIGA_MAC_VER_12: case RTL_GIGA_MAC_VER_17: if (jumbo) { - pcie_set_readrq(tp->pci_dev, 512); + readrq = 512; r8168b_1_hw_jumbo_enable(tp); } else { r8168b_1_hw_jumbo_disable(tp); @@ -2392,7 +2393,7 @@ static void rtl_jumbo_config(struct rtl8169_private *tp) break; case RTL_GIGA_MAC_VER_18 ... RTL_GIGA_MAC_VER_26: if (jumbo) { - pcie_set_readrq(tp->pci_dev, 512); + readrq = 512; r8168c_hw_jumbo_enable(tp); } else { r8168c_hw_jumbo_disable(tp); @@ -2417,8 +2418,8 @@ static void rtl_jumbo_config(struct rtl8169_private *tp) } rtl_lock_config_regs(tp); - if (!jumbo && pci_is_pcie(tp->pci_dev) && tp->supports_gmii) - pcie_set_readrq(tp->pci_dev, 4096); + if (pci_is_pcie(tp->pci_dev) && tp->supports_gmii) + pcie_set_readrq(tp->pci_dev, readrq); } DECLARE_RTL_COND(rtl_chipcmd_cond) -- 2.30.2