Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1709685pxb; Mon, 8 Mar 2021 04:37:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUItlQgdSl/VCQPd8ekkOxcOhHhEKW6HyAGhPwWi5LAwnki7P++8bh+bmH/lAJ3CO2jhO+ X-Received: by 2002:a50:ee18:: with SMTP id g24mr13778354eds.267.1615207029874; Mon, 08 Mar 2021 04:37:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615207029; cv=none; d=google.com; s=arc-20160816; b=kI5E5Ost6IaP9pQfXGb/60v8NCA8ZF1P/GgUa0UYqk3usdQPUJVIzxy670X+dnJnax eEosmw+ZD+Yb4YceFHRIuDfpXvyLnqaskiFrVeF3Gm161HeReph90QvnVGVCym+fFs7r DsK5UzRvVknr89IcJmI6a5K8iiF0SUxMoWfJEyFfBPrhqBIoXhdf74D7yEIrtytgNmpr GtaLbh1hJreAAxC9rqC8YETkjepFEVBe22m9wQFLV9pTo+K0CMAd25pAXQuOEJhvsUjC UoixgOYnK/P7sP38l1VmZZoj95OIwmKk0rTOMFmpuAqiu4qZrn0GY9y+HWDloHitcmHt bF5A== 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=sXPCPHwEMhIlQJAgmP3xb6ng39GLNFfPgtcen8EFwU4=; b=LmkPw5NMgH5z4/EJZLFpLHOR6VUvGvJ/WqRWIwavvmVgG/PPEkLhQn9WaP6bxBpBXn Gh0/2RaHPN+i5h/f4QN+EA8I/cKSfiHgy8nKOq86hNqAiB/xJJLR/68Ye7+vqXahWKa2 CcbXo8HMWoSibQ97B+9JVFiVEuaBMFfkTf5+Qsy0CfZlW+WqsjgMwJeNqtz+gOzHbBod hAROnWCEShZcK68X7wo0JNvP+0wah/Vydy/ef4Liq6POMxTi+VVeG48BR15tLLJiR6Sk zoNVTQDjbd44TzvS5iADocI0QEmuSlPEkqPENNOSRfKvuZb82p63bLH6n/GSwgr0YxMN 7FYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jFlblVGC; 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 j19si6645808edp.531.2021.03.08.04.36.46; Mon, 08 Mar 2021 04:37:09 -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=jFlblVGC; 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 S231951AbhCHMfX (ORCPT + 99 others); Mon, 8 Mar 2021 07:35:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:44076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231601AbhCHMex (ORCPT ); Mon, 8 Mar 2021 07:34:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 883DA651C9; Mon, 8 Mar 2021 12:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615206893; bh=OkDafQvKTcFdS2IodSiW4vL2ELzOLKubu5fv56H+DuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jFlblVGCJfO8rgF4UvSaREL8o5dA5Loi682GNTf9qLeU4yIrsfNyjSAoIIrjzdlE7 AuPpj0IPw1q2KMRSn1d8Td6fJzesiawReC3OGcVS22lEvP5VP3Bm8gXLZjEhLu36L2 0l20FYVviVu2+mQMTz9bGwiCpl8+gwgwbNvivKdE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Armin Wolf , Heiner Kallweit , "David S. Miller" Subject: [PATCH 5.10 42/42] r8169: fix resuming from suspend on RTL8105e if machine runs on battery Date: Mon, 8 Mar 2021 13:31:08 +0100 Message-Id: <20210308122720.144343202@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210308122718.120213856@linuxfoundation.org> References: <20210308122718.120213856@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 commit d2a04370817fc7b0172dad2ef2decf907e1a304e upstream. Armin reported that after referenced commit his RTL8105e is dead when resuming from suspend and machine runs on battery. This patch has been confirmed to fix the issue. Fixes: e80bd76fbf56 ("r8169: work around power-saving bug on some chip versions") Reported-by: Armin Wolf Tested-by: Armin Wolf Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/realtek/r8169_main.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -2244,6 +2244,7 @@ static void rtl_pll_power_down(struct rt switch (tp->mac_version) { case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26: + case RTL_GIGA_MAC_VER_29 ... RTL_GIGA_MAC_VER_30: case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_33: case RTL_GIGA_MAC_VER_37: case RTL_GIGA_MAC_VER_39: @@ -2271,6 +2272,7 @@ static void rtl_pll_power_up(struct rtl8 { switch (tp->mac_version) { case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26: + case RTL_GIGA_MAC_VER_29 ... RTL_GIGA_MAC_VER_30: case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_33: case RTL_GIGA_MAC_VER_37: case RTL_GIGA_MAC_VER_39: