Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1708904pxb; Mon, 8 Mar 2021 04:36:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9i3AWur/FRIyg5nr9zlNpZ6f6dgmHqXTC4krUaoXax/cDHyihibkC8vcC5IUonxu66int X-Received: by 2002:a17:906:7754:: with SMTP id o20mr15061169ejn.209.1615206961622; Mon, 08 Mar 2021 04:36:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615206961; cv=none; d=google.com; s=arc-20160816; b=zSRODNzjzlVZOQ5nK6fSTU7RppvV7ttHpcXGOk3T5Jkm/gPz7Ef0NrLSKUJL4TopcJ bBM+RUXVVAkignyMX9dqvkNCg6IK0sU5mVvE+orjuyxaGDzq6cT7huRL8fz8rl2t8Iq0 lckMeA/pTAlRJO4AfcJncqA4YH1f6gNAGHUudd7vdp6kB1uCZglzLuebq9A0ZOJKcHo9 3ZdmMmnYSfqx9zfwlP0WEmG4SDeO9b/v3V/GJidmB018zxM8S2BSxPPdJKKb5LJZAWnj lYeEhbW1bQNOIaKG+PxQuQzfZACHEbOUlv8OkS04l2r1Frz/9yUfDHuCxOVz8jdjaXFJ jxQw== 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=iKCCFt24JSW6kkkNdWXfA6lqoRoJD2uZc/8uarTHF9E=; b=oW+/juj0wvxbZNJJ4u9dcSrhbwfklligrElnCO2pjmTzjTkEKpxjTPJzPe7RunLBEE yRfSMMHJPpByle74XtZldgWLqSjMpO2Wk/HN+DjDfPRSitMqR98ffou1jAgWCwppFb4g uPWlgtXEXRB8ac6bFZI/2Cf3u08zd1ku7ZZMKZafSkdaCtVcylEzUcHLwYSpouDLvCbq EEv1sVmDVb9k8MeSWn0x4L/e0Zb3Jt/l81l08rxdgFxYh3XSn2W8zbUztm+gf2lFEf7k znf/5BRLZtspw4kG/QwuX3yCBtk13ZIP4wJpGUG75vBJ54NechKLLntOHUqvW1tRap5j bTLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="pzcr56/j"; 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 f16si6798903eds.608.2021.03.08.04.35.39; Mon, 08 Mar 2021 04:36:01 -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="pzcr56/j"; 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 S232048AbhCHMcZ (ORCPT + 99 others); Mon, 8 Mar 2021 07:32:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:41032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbhCHMb5 (ORCPT ); Mon, 8 Mar 2021 07:31:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9BBEB651C3; Mon, 8 Mar 2021 12:31:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615206717; bh=d5GmAzr8WJu85zGcSa7pnLQspma0WwLnWWEZqTCz4eg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pzcr56/jbdcobQxcv6Pm7cl3SF4Q1veWcSyru+9+gwN+J2qcR4JrXFtUat4atLrz9 7qF2TAPIWPiStDD8SZRBnrul6iXfGEfHu54SwdASoChKRpjB4jwmXyNutn7f0+KABv Ld6aeAsGPaIduKEs8MDAsPHoeFm+RBDlAduyXRTQ= 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.4 22/22] r8169: fix resuming from suspend on RTL8105e if machine runs on battery Date: Mon, 8 Mar 2021 13:30:39 +0100 Message-Id: <20210308122715.474604148@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210308122714.391917404@linuxfoundation.org> References: <20210308122714.391917404@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 @@ -3959,6 +3959,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: @@ -3989,6 +3990,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: