From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_PASS 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 5A178C282D8 for ; Fri, 1 Feb 2019 06:49:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2936F20863 for ; Fri, 1 Feb 2019 06:49:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jg5Hf9y3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727952AbfBAGtS (ORCPT ); Fri, 1 Feb 2019 01:49:18 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34251 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbfBAGtS (ORCPT ); Fri, 1 Feb 2019 01:49:18 -0500 Received: by mail-wr1-f68.google.com with SMTP id f7so5902878wrp.1 for ; Thu, 31 Jan 2019 22:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=z2sWJW5LGYeISz+9/I/3UkUBq1fChSbXiBNl9qe00Lc=; b=Jg5Hf9y35wfeo4UJIGR7gAE7BMaLQ00EB6Sb/JVHH5utVamnGa1ZZYw6qCTEp1KMP4 5I7SEosZY5W4K2xZiRqGTKeBxv/kXm8Krpq52hXKkG6hbwVMWQDNyCIQjyd94dr1Pit8 Q5V0JJO9orO0vS6YyNBFtpk14BC/mD/IIGejIBxVxyJzLrkI/Rgkb+nCFo+sQEk819QL uTVbE6NE1fTs6Wu2dk41RqM0XOn0zYbmOtO5fKDy9xeLxvymdpXkLrVVM2notQztW6nm NuR1og68MqaPzRbO7i6oC/hIZFzdnEaKXv6Zz5plmI/2JzkKsp5Ab4L273vq/uIR+dIL IupA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=z2sWJW5LGYeISz+9/I/3UkUBq1fChSbXiBNl9qe00Lc=; b=fLRvl/5Rzp/0jF9g0Kdq7kfm60z8kRFRYWVaCSRQvLCAyMFTTZW2PO0gnILjOlzbMz SZ5hJS464Y4nCRrXsNoXnGEvOB332bX1DP4x5TGDFjJ86vgTHsPSuxbccHTFHzZO3RKo 41pp295+cFu1mWaji1B3tQXXPq/6CgOBdA6mc+Dva0QYSEFa61i1Y77CQ8ZtD71fAoDp raWcdOOAjt6AdMGWqrcX3yiMdwPomBK3rQRh8PBPn7UgeyMPk6U/+S89YyqdyLLSErxB ygBciILsH0hbea8mq2ahncSI94uNZMtgkcfDhpBPPKkzywBmVa0mL6m/MuQIIMxIkAue UcJg== X-Gm-Message-State: AHQUAuYp8/5bCu07tcjsXenxKVCxj5fl3bAm1fwMhL10/khnRLA4+dqf 3Us4MsemHjoJdXEOmpCLAQhobBVS X-Google-Smtp-Source: AHgI3IbUYnya5Nb5G5QS3QfBBxtjM8QQrau+B0gOQo2UT7bsEtRFkSiviAm82sbfnLZ7L6bGTPpm4g== X-Received: by 2002:a05:6000:10d1:: with SMTP id b17mr22758161wrx.306.1549003755836; Thu, 31 Jan 2019 22:49:15 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:81f8:3fab:207f:b0f2? (p200300EA8BF1E20081F83FAB207FB0F2.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:81f8:3fab:207f:b0f2]) by smtp.googlemail.com with ESMTPSA id m21sm979674wmi.43.2019.01.31.22.49.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 22:49:14 -0800 (PST) Subject: Re: WoL broken in r8169.c since kernel 4.19 To: Marc Haber Cc: "netdev@vger.kernel.org" References: <20190126170752.GE27062@torres.zugschlus.de> <6ecafe07-3278-a9c4-d76d-971c0df26ce8@gmail.com> <20190127205555.GF27062@torres.zugschlus.de> <64b22f62-ca8a-caee-5a39-f06ffe6598d1@gmail.com> <20190128073010.GG27062@torres.zugschlus.de> <20190128202235.GH27062@torres.zugschlus.de> <20190129073253.GJ27062@torres.zugschlus.de> <20190129153553.GL27062@torres.zugschlus.de> <638767f7-5701-309b-97b1-a83f774afbab@gmail.com> <20190130153735.GN27062@torres.zugschlus.de> From: Heiner Kallweit Message-ID: <070e8dac-4ab2-ef86-f44d-991c7c8182aa@gmail.com> Date: Fri, 1 Feb 2019 07:49:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190130153735.GN27062@torres.zugschlus.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Great, thanks. This patch has been applied and is part of latest linux-next kernel already: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/?h=next-20190201 Would be much appreciated if you could build and test this kernel version. Heiner On 30.01.2019 16:37, Marc Haber wrote: > On Tue, Jan 29, 2019 at 10:20:48PM +0100, Heiner Kallweit wrote: >> one more attempt, could you please test the following with 4.19 or 4.20 >> (w/o the other debug patches) ? > > With the following patch, the machine wakes up fine on a WoL magic > packet: > > nux-4.20.5/drivers/net/ethernet/realtek/r8169.c 2019-01-30 16:03:00.090841076 +0100 > +++ orig/linux-4.20.5/drivers/net/ethernet/realtek/r8169.c 2019-01-26 09:20:52.000000000 +0100 > @@ -1418,7 +1418,6 @@ > > #define WAKE_ANY (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_BCAST | WAKE_MCAST) > > -#if 0 > static u32 __rtl8169_get_wol(struct rtl8169_private *tp) > { > u8 options; > @@ -1453,7 +1452,6 @@ > > return wolopts; > } > -#endif > > static void rtl8169_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) > { > @@ -1463,8 +1461,6 @@ > wol->supported = WAKE_ANY; > wol->wolopts = tp->saved_wolopts; > rtl_unlock_work(tp); > - > - pr_info("get_wol: 0x%08x\n", wol->wolopts); > } > > static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts) > @@ -1540,8 +1536,6 @@ > struct rtl8169_private *tp = netdev_priv(dev); > struct device *d = tp_to_dev(tp); > > - pr_info("set_wol: 0x%08x\n", wol->wolopts); > - > if (wol->wolopts & ~WAKE_ANY) > return -EINVAL; > > @@ -4174,7 +4168,7 @@ > { > struct phy_device *phydev; > > - if (!device_may_wakeup(tp_to_dev(tp))) > + if (!__rtl8169_get_wol(tp)) > return false; > > /* phydev may not be attached to netdevice */ > @@ -7372,6 +7366,8 @@ > return rc; > } > > + tp->saved_wolopts = __rtl8169_get_wol(tp); > + > mutex_init(&tp->wk.mutex); > u64_stats_init(&tp->rx_stats.syncp); > u64_stats_init(&tp->tx_stats.syncp); > 1 [14/5006]mh@fan:~/linux/4.20.5 $ > > I'll send the dmesg output to you in private e-mail > > Greetings > Marc >