Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp404823pxb; Wed, 3 Mar 2021 06:20:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHXNDnSKVeuJAG0naiaT4R2Fkhgj9uIvqQ2PKxaEuvFbmzEb/a0LqeZoO0iW9caYVrytm8 X-Received: by 2002:a17:906:b082:: with SMTP id x2mr25101997ejy.100.1614781202284; Wed, 03 Mar 2021 06:20:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614781202; cv=none; d=google.com; s=arc-20160816; b=j0upLUCa+CSsiJZcGyAGMZA34xBkGC34hYBzjkIh0gLQp4vj+WsIxWD/GiEguhvBTF 5HLMH43gtwSfvZdLuUYNtbqfRAiNBrlUXCQtllqz6A5vGiTrPfZfInnZEFC0kaNTA5+r xl+y45bweVa6peQf1n09HM3BCCiFI+fUwdtb/tyGfrAQCd09zxvqQbUm5AuQM+WI5CQk SNiiLaVk3uRj4HEUWps/N4RXdRhWwqNDQeV1zzZlI1q45EcaX/noZ17K6OHStaddmRYK ENUprhLX+teZobnd57p9WiI1piMCufoUaQb646wuTWaMmvNejeVwV9PIfvIvMF3xu9PP 1F0g== 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=mtx/2giNOI8nWKJZOIDvhDD7G7WJB195e9914IeXoHE=; b=FmqkhpikmbWmkDviwbafxY76OVBG0l9IHHnxPHbrJHW3Zn4Wg1UrPCdaNZ5onBrA4t zouvXmpaw9TgJ52MOw+pwjAevvxDB+oyxVRVixVrmKz0iKYOXVv46isZAU19SBej6vHL FDtqmc2ULX0eSaOPjtI2Ym3NxclR5chfkaropEttukijC0OOE9WFCmzAJAKx1fTxlDcP wpLEb80DRUoitgjwO0j5/4ABso8LBcgMi9OFE4IH3iNiIA+zDQwtCVSGS3uVMS2Ml8uH MLMU2FEo5Sy6AJ8X9yguTZAalzxBsNM8esmZK+7xOSJgyW/s0nb5ZERyqL5Tvd8wNo2b H7dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lUJyJXhF; 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 l17si16089707ejx.485.2021.03.03.06.19.34; Wed, 03 Mar 2021 06:20:02 -0800 (PST) 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=lUJyJXhF; 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 S244024AbhCAVDO (ORCPT + 99 others); Mon, 1 Mar 2021 16:03:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:46226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237032AbhCARMN (ORCPT ); Mon, 1 Mar 2021 12:12:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23AC165028; Mon, 1 Mar 2021 16:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617014; bh=usgMplVX90ivNkRsImqL027UgTVzYrCSbe9iO0GmNVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lUJyJXhFRACaqvIUnR0d4IoBLCoqd0dNoEpGTVK2PmCushZyxtrsTILkm6f9Z1X3L 2ItDNsk4mdwVeT061NLGokdBPumM06z/EKkPnHiayW0BCfa8RYWS0kcJ2ggCadzqZU lrliYG4ZYs3re8fVtJsrXwe+qB5/mUOBXVGI5FhM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Josef=20O=C5=A1kera?= , Heiner Kallweit , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.19 173/247] r8169: fix jumbo packet handling on RTL8168e Date: Mon, 1 Mar 2021 17:13:13 +0100 Message-Id: <20210301161040.131205594@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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 6cf739131a15e4177e58a1b4f2bede9d5da78552 ] Josef reported [0] that using jumbo packets fails on RTL8168e. Aligning the values for register MaxTxPacketSize with the vendor driver fixes the problem. [0] https://bugzilla.kernel.org/show_bug.cgi?id=211827 Fixes: d58d46b5d851 ("r8169: jumbo fixes.") Reported-by: Josef Oškera Tested-by: Josef Oškera Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/b15ddef7-0d50-4320-18f4-6a3f86fbfd3e@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/realtek/r8169.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 6b901bf1cd54d..6fd1a639ec533 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -4365,7 +4365,7 @@ static void r8168dp_hw_jumbo_disable(struct rtl8169_private *tp) static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp) { - RTL_W8(tp, MaxTxPacketSize, 0x3f); + RTL_W8(tp, MaxTxPacketSize, 0x24); RTL_W8(tp, Config3, RTL_R8(tp, Config3) | Jumbo_En0); RTL_W8(tp, Config4, RTL_R8(tp, Config4) | 0x01); rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_512B); @@ -4373,7 +4373,7 @@ static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp) static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp) { - RTL_W8(tp, MaxTxPacketSize, 0x0c); + RTL_W8(tp, MaxTxPacketSize, 0x3f); RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Jumbo_En0); RTL_W8(tp, Config4, RTL_R8(tp, Config4) & ~0x01); rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); -- 2.27.0