From patchwork Fri Jan 8 11:57:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12006425 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8B79C433E0 for ; Fri, 8 Jan 2021 12:01:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8EC84239ED for ; Fri, 8 Jan 2021 12:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726600AbhAHMBH (ORCPT ); Fri, 8 Jan 2021 07:01:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbhAHMBG (ORCPT ); Fri, 8 Jan 2021 07:01:06 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A90D3C0612F4 for ; Fri, 8 Jan 2021 04:00:25 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id e25so8222592wme.0 for ; Fri, 08 Jan 2021 04:00:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jt3zw0dfENHCHUmf/u475QK+Rs4cwPdEOzlKvH1tBNE=; b=QW7d0W+Q0PnUu+/Ku5fWnArt0/2OgwcB/A7Tk3xy8lG15HV7WinZYkjR7GOkshat6D /+WOEnuG2UKiQ36zh7G7j/7fPdvqf756Fvl+SdJvGmabpS/WmOHRVMvC6cKLq/0fW1CZ 2hb5wH/cm/VLLfaYd74/D4IJ59xD85AauVSy29IPEMa3H7AvgnsSwxDdYfmJrz9cYica giBelTGebnP8XYb40QRVQoBlAPm6b/8AdyYPoSQaIjmCcWMNWUCnuRpVOnRAFX6BLLhC n1c8vMgRjzAWPuCet6pGAs0riE/FuJk8ezLbHlRLy61x8nj5DjNzPhshjPy5jCFqBZ3s o+Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jt3zw0dfENHCHUmf/u475QK+Rs4cwPdEOzlKvH1tBNE=; b=WrdhCbmlM7EtlSTAMtiSyab9lFIxJc+abmG9frI2XBj7M325g+o5VzZtk7l6FMPznX a2RoNKTc69yxEx7v+xtIjN9d3/ODRCUaBVyxqehtIKCXUm6XxFFl0n5tPfnoh/sQmVup EUpf/fpEsMqtsaDW5p9LgvgxZxPiJ7yvhaIx10HB8jQh4nz6Ap45EO1T65n8pSMrdWYW fwU9LUrbJpogBNgiaKciTopaOXC+LIp/LFAt1omu06V9a+gJobys68xXVcz/0pfM1kUt pkzDr/raBTNnx5TrAKBWv7Wt59CLbyG7TIvMcHrqA/YHkMW8hXHO9psHrHhlrY+YBFjO B0Hw== X-Gm-Message-State: AOAM533teSb7sSf5Vs/rH3/e1A5cCR82FTzp+wRFn7rH45caH/KquCPf i4Edze6i/pTdKPhyM9WHPMZvmcMtSiw= X-Google-Smtp-Source: ABdhPJyRunovPtyLyzY17WzhUIK7WXIPLetyA0LkkB7rbLFdeewhDzKFNI2RoaNPPvo34n35NDcVjQ== X-Received: by 2002:a1c:220a:: with SMTP id i10mr2703715wmi.93.1610107223898; Fri, 08 Jan 2021 04:00:23 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:6dbb:aa76:4e1a:5cc4? (p200300ea8f0655006dbbaa764e1a5cc4.dip0.t-ipconnect.de. [2003:ea:8f06:5500:6dbb:aa76:4e1a:5cc4]) by smtp.googlemail.com with ESMTPSA id o8sm13095907wrm.17.2021.01.08.04.00.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Jan 2021 04:00:23 -0800 (PST) Subject: [PATCH net-next v2 1/3] r8169: replace BUG_ON with WARN in _rtl_eri_write From: Heiner Kallweit To: Jakub Kicinski , David Miller , Realtek linux nic maintainers Cc: "netdev@vger.kernel.org" References: <938caef4-8a0b-bbbd-66aa-76f758ff877a@gmail.com> Message-ID: Date: Fri, 8 Jan 2021 12:57:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <938caef4-8a0b-bbbd-66aa-76f758ff877a@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use WARN here to avoid stopping the system. In addition print the addr and mask values that triggered the warning. v2: - return on WARN to avoid an invalid register write Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index c9abc7ccb..317b34723 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -763,7 +763,9 @@ static void _rtl_eri_write(struct rtl8169_private *tp, int addr, u32 mask, { u32 cmd = ERIAR_WRITE_CMD | type | mask | addr; - BUG_ON((addr & 3) || (mask == 0)); + if (WARN(addr & 3 || !mask, "addr: 0x%x, mask: 0x%08x\n", addr, mask)) + return; + RTL_W32(tp, ERIDR, val); r8168fp_adjust_ocp_cmd(tp, &cmd, type); RTL_W32(tp, ERIAR, cmd); From patchwork Fri Jan 8 11:58:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12006427 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AB92C433DB for ; Fri, 8 Jan 2021 12:01:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB13A239ED for ; Fri, 8 Jan 2021 12:01:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726763AbhAHMBI (ORCPT ); Fri, 8 Jan 2021 07:01:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbhAHMBH (ORCPT ); Fri, 8 Jan 2021 07:01:07 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD020C0612F5 for ; Fri, 8 Jan 2021 04:00:26 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id 190so7616998wmz.0 for ; Fri, 08 Jan 2021 04:00:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vPQAq5rL2RT0Kb9F+IBKUZ7s46kdUygloMmy2B3StMk=; b=lC3jQsSJesUYE0+OaMONHV5dgYG/n/NH5UE/+Tz10DIKloiTgqAZs8tjw5U/OzXy56 MCJZCiGQ1eMVFAzAinWJXQEet5BYsBfyz1OSqGGcFCtkK0P1Nn7YfdJFeV3tm7DEcgN3 Jb+50SFOWB8CjUuxuei2DAh0X20DfNz3hBf2GrcGCyNJ15b6b/BDdjcMBJE0xHhHiNbq a9CyMWNwXj/mgE2IXH5B8722JJBxr66abhSsT3Yrz2LUhzmCpM3NexjAMJ+vJJ4Zp2xb 99rL5a2XNmi43BMFtH4vRagt0NF8PF49eM0587Qt9i9aszVyPBqVYSXhPJpWKVeXYjeR Apyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vPQAq5rL2RT0Kb9F+IBKUZ7s46kdUygloMmy2B3StMk=; b=nDenZb1WHyhleVa+o1ns1d+eKWKEl1S3k+eLwyWd8+0wYjqR05n2fkXcIjM58mAbHc 68QsHJaqetMWR9xzP6Age+RN7p4bcFSKcDJgmSqOYkxTiYgz7PqUGl8RCul9eOzSuT5U sEM/mwZuUUHRuvtwNDMwjd4KiJaz/YWbvM+y3Ks2QsKUO9B4ul/e1BYzBmdO4XArbKEp QU3UDCm2guIKxrJ6bN/l7rAl9Nl8lvgltV4T5sz8WAYSYMWXWH0Vv8LHeseTLRgLUtT2 ZSCFxFkt6szX3j9TM/k/ByBS2on4nB3zQeUKby4pQA4VU+TsQjk/j1ZZGwrc4lzfe07S JxmQ== X-Gm-Message-State: AOAM533hD5H/mtVdJ6kAUm4+3lb4W81Rjs/CTtwmlz6f7vw2giRi+pE+ 4zhzG/pmQYB2mln62P1XPmQGoYH5gGE= X-Google-Smtp-Source: ABdhPJxgzeDOCkx4hcpYPg9j6u4A3E+wn29nJNwVoOMepXr3gi3l/a9oojPD1pHmHtWlE1z9OozAIA== X-Received: by 2002:a1c:790f:: with SMTP id l15mr2773250wme.188.1610107225367; Fri, 08 Jan 2021 04:00:25 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:6dbb:aa76:4e1a:5cc4? (p200300ea8f0655006dbbaa764e1a5cc4.dip0.t-ipconnect.de. [2003:ea:8f06:5500:6dbb:aa76:4e1a:5cc4]) by smtp.googlemail.com with ESMTPSA id s12sm11847874wmh.29.2021.01.08.04.00.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Jan 2021 04:00:24 -0800 (PST) Subject: [PATCH net-next v2 2/3] r8169: improve rtl_ocp_reg_failure From: Heiner Kallweit To: Jakub Kicinski , David Miller , Realtek linux nic maintainers Cc: "netdev@vger.kernel.org" References: <938caef4-8a0b-bbbd-66aa-76f758ff877a@gmail.com> Message-ID: <502d3af4-bef0-c6c3-0858-5156124df7ac@gmail.com> Date: Fri, 8 Jan 2021 12:58:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <938caef4-8a0b-bbbd-66aa-76f758ff877a@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use WARN_ONCE here to get a call trace in case of a problem. This facilitates finding the offending code part. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 9af048ad0..6005d37b6 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -810,14 +810,9 @@ static void rtl_eri_clear_bits(struct rtl8169_private *tp, int addr, u32 m) rtl_w0w1_eri(tp, addr, 0, m); } -static bool rtl_ocp_reg_failure(struct rtl8169_private *tp, u32 reg) +static bool rtl_ocp_reg_failure(u32 reg) { - if (reg & 0xffff0001) { - if (net_ratelimit()) - netdev_err(tp->dev, "Invalid ocp reg %x!\n", reg); - return true; - } - return false; + return WARN_ONCE(reg & 0xffff0001, "Invalid ocp reg %x!\n", reg); } DECLARE_RTL_COND(rtl_ocp_gphy_cond) @@ -827,7 +822,7 @@ DECLARE_RTL_COND(rtl_ocp_gphy_cond) static void r8168_phy_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data) { - if (rtl_ocp_reg_failure(tp, reg)) + if (rtl_ocp_reg_failure(reg)) return; RTL_W32(tp, GPHY_OCP, OCPAR_FLAG | (reg << 15) | data); @@ -837,7 +832,7 @@ static void r8168_phy_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data) static int r8168_phy_ocp_read(struct rtl8169_private *tp, u32 reg) { - if (rtl_ocp_reg_failure(tp, reg)) + if (rtl_ocp_reg_failure(reg)) return 0; RTL_W32(tp, GPHY_OCP, reg << 15); @@ -848,7 +843,7 @@ static int r8168_phy_ocp_read(struct rtl8169_private *tp, u32 reg) static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data) { - if (rtl_ocp_reg_failure(tp, reg)) + if (rtl_ocp_reg_failure(reg)) return; RTL_W32(tp, OCPDR, OCPAR_FLAG | (reg << 15) | data); @@ -856,7 +851,7 @@ static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data) static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg) { - if (rtl_ocp_reg_failure(tp, reg)) + if (rtl_ocp_reg_failure(reg)) return 0; RTL_W32(tp, OCPDR, reg << 15); From patchwork Fri Jan 8 12:00:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12006429 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8BBDC433E0 for ; Fri, 8 Jan 2021 12:01:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CF2D239ED for ; Fri, 8 Jan 2021 12:01:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbhAHMBK (ORCPT ); Fri, 8 Jan 2021 07:01:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbhAHMBJ (ORCPT ); Fri, 8 Jan 2021 07:01:09 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2633C0612F6 for ; Fri, 8 Jan 2021 04:00:28 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id w5so8714174wrm.11 for ; Fri, 08 Jan 2021 04:00:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2BgG1Oq469kmsx9I+eoguuVlj/o96Nb8n0c0wyoGSew=; b=HHWpAMkviEIn4ZNoBai/V8H4jwY2HBre/welDdD3sWsH9zxKqyXofFfTv4pDJAo6/c lEmhGpAioZ8hQBnmVACe68G6AtNMROShjEO/Zj2Z0wXVyhqMyFMxmNcGrvDVScyCx2gq CJb3mULNFFsBRH0UowDnbECmH6cYuKAt0vKhGoXwpKw75UWfseYhfWoVISS2FT/6i4QF KwFPN3SKxYdZEb+rW3tlX9ewRDh57B5zFzs4j+9Sjcn3ibV288WgxQKIoMkuzh0PiHOa /PqRALXp5o/rwsUbf7tH6GJK+DwQUVwFNgWO0+ZLDZbLjUvt8Wm3C7Cmj423zn67hwjE mKYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2BgG1Oq469kmsx9I+eoguuVlj/o96Nb8n0c0wyoGSew=; b=Ey6QGn230LWy0kY/sufgb3+GnFVoFkc9eV7EDP3kYKN1kTpF1mQ9MUPVPiXZrH4znM f2qi5Rstl029Mdx0ynB3TZnIXj0LlRaoUaXX7ktJ36XbOSoXWZaqo7b2JQcx1TYWVUtL SXOaKf1+iLVNqsR7Wjv+TlO+CWbVrFBUSjWPSmkqnsDmNNvJh/lECNngHTG8LjboqGIr UIMozpNQdxquaX0xk8rKZoSrkcy5etMXnmOlHTOqvhcGcLRGB+4a6Lsfx8wvMqmCfvXr UWq8T2UFW0cw29kHt8hPynVoeDJKwr/dEjBA+UOZfpBsnND8pmgAdKk5kAqJ6TdpH6fr E3ew== X-Gm-Message-State: AOAM532rKVz6mM7hPz0xLIz1eR8mVDi1tzHM2i5NG8jhw13bFPKWayHX WY+Zr9/7YIAgAEdYltdCtgJdZU2/syU= X-Google-Smtp-Source: ABdhPJxcCiEx4phEfInZwnJt4x1lmNSkqgfXX4rSGM4G37ZPmzR9mgEL2CwhyoAQwAQh6Zoa2EVlhQ== X-Received: by 2002:a5d:6045:: with SMTP id j5mr3179462wrt.223.1610107227373; Fri, 08 Jan 2021 04:00:27 -0800 (PST) Received: from ?IPv6:2003:ea:8f06:5500:6dbb:aa76:4e1a:5cc4? (p200300ea8f0655006dbbaa764e1a5cc4.dip0.t-ipconnect.de. [2003:ea:8f06:5500:6dbb:aa76:4e1a:5cc4]) by smtp.googlemail.com with ESMTPSA id i9sm13832327wrs.70.2021.01.08.04.00.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Jan 2021 04:00:26 -0800 (PST) Subject: [PATCH net-next v2 3/3] r8169: don't wakeup-enable device on shutdown if WOL is disabled From: Heiner Kallweit To: Jakub Kicinski , David Miller , Realtek linux nic maintainers Cc: "netdev@vger.kernel.org" References: <938caef4-8a0b-bbbd-66aa-76f758ff877a@gmail.com> Message-ID: Date: Fri, 8 Jan 2021 13:00:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <938caef4-8a0b-bbbd-66aa-76f758ff877a@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org If WOL isn't enabled, then there's no need to enable wakeup from D3 on system shutdown. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 6005d37b6..982e6b2f0 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4876,7 +4876,7 @@ static void rtl_shutdown(struct pci_dev *pdev) rtl_wol_shutdown_quirk(tp); } - pci_wake_from_d3(pdev, true); + pci_wake_from_d3(pdev, tp->saved_wolopts); pci_set_power_state(pdev, PCI_D3hot); } }