netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Marc Haber <mh+netdev@zugschlus.de>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: WoL broken in r8169.c since kernel 4.19
Date: Fri, 1 Feb 2019 07:49:09 +0100	[thread overview]
Message-ID: <070e8dac-4ab2-ef86-f44d-991c7c8182aa@gmail.com> (raw)
In-Reply-To: <20190130153735.GN27062@torres.zugschlus.de>

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
> 


  reply	other threads:[~2019-02-01  6:49 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12 20:08 WoL broken in r8169.c since kernel 4.19 Marc Haber
2019-01-12 20:28 ` Heiner Kallweit
2019-01-12 20:44   ` Heiner Kallweit
2019-01-13 16:01   ` Marc Haber
2019-01-13 16:19     ` Heiner Kallweit
2019-01-22 16:10       ` Marc Haber
2019-01-22 18:47         ` Heiner Kallweit
2019-01-25  5:59           ` Marc Haber
2019-01-25  6:49             ` Heiner Kallweit
2019-01-25 12:02               ` Marc Haber
2019-01-25 18:22                 ` Heiner Kallweit
2019-01-26 13:56                   ` Marc Haber
2019-01-26 14:04                     ` Heiner Kallweit
2019-01-26 17:07                       ` Marc Haber
2019-01-26 19:22                         ` Heiner Kallweit
2019-01-27 20:55                           ` Marc Haber
2019-01-27 21:09                             ` Heiner Kallweit
2019-01-28  7:30                               ` Marc Haber
2019-01-28 19:02                                 ` Heiner Kallweit
2019-01-28 20:59                                   ` Marc Haber
2019-01-28 21:21                                     ` Heiner Kallweit
2019-01-29 11:52                                       ` Marc Haber
2019-01-28 20:22                                 ` Marc Haber
2019-01-28 20:28                                   ` Heiner Kallweit
2019-01-29  7:32                                     ` Marc Haber
2019-01-29 15:35                                       ` Marc Haber
2019-01-29 19:01                                         ` Heiner Kallweit
2019-01-30  8:46                                           ` Marc Haber
2019-01-29 21:20                                         ` Heiner Kallweit
2019-01-30 15:37                                           ` Marc Haber
2019-02-01  6:49                                             ` Heiner Kallweit [this message]
2019-02-01 17:19                                               ` Marc Haber
2019-02-01 18:24                                                 ` Heiner Kallweit
2019-02-01 18:41                                                   ` Marc Haber
2019-01-26 14:08     ` Heiner Kallweit
2019-01-26 14:09       ` Heiner Kallweit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=070e8dac-4ab2-ef86-f44d-991c7c8182aa@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=mh+netdev@zugschlus.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).