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 2CDB56FA1 for ; Mon, 3 Apr 2023 14:28:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6FB5C4339E; Mon, 3 Apr 2023 14:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680532110; bh=V7R50GzPEh0LA6RroHUD3MkOHCM67gpVWZSpW7uxhKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VuJdGGihNBF9kKi9FMuUymRSQLyLwhGlXA6qOSKaPVx4wFfPcH4w59hUAr75Xuhny 9cYjzB/IDO+WNqCUKQMth26mSaDOQn72Ss30nA+L339aj/9u6uwA8+dFrnot+L8Q/D 7oHQj1Co2Uj8RSbRlQFyAtk18+pcx3POm3qoRT/g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, ChunHao Lin , Heiner Kallweit , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 131/173] r8169: fix RTL8168H and RTL8107E rx crc error Date: Mon, 3 Apr 2023 16:09:06 +0200 Message-Id: <20230403140418.706912277@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403140414.174516815@linuxfoundation.org> References: <20230403140414.174516815@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: ChunHao Lin [ Upstream commit 33189f0a94b9639c058781fcf82e4ea3803b1682 ] When link speed is 10 Mbps and temperature is under -20°C, RTL8168H and RTL8107E may have rx crc error. Disable phy 10 Mbps pll off to fix this issue. Fixes: 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E") Signed-off-by: ChunHao Lin Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/realtek/r8169_phy_config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169_phy_config.c b/drivers/net/ethernet/realtek/r8169_phy_config.c index 913d030d73eb4..e18a76f5049fd 100644 --- a/drivers/net/ethernet/realtek/r8169_phy_config.c +++ b/drivers/net/ethernet/realtek/r8169_phy_config.c @@ -970,6 +970,9 @@ static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp, /* disable phy pfm mode */ phy_modify_paged(phydev, 0x0a44, 0x11, BIT(7), 0); + /* disable 10m pll off */ + phy_modify_paged(phydev, 0x0a43, 0x10, BIT(0), 0); + rtl8168g_disable_aldps(phydev); rtl8168g_config_eee_phy(phydev); } -- 2.39.2