From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiner Kallweit Subject: Re: [PATCH net v2 0/2] net: phy: fix WoL handling when suspending the PHY Date: Fri, 28 Sep 2018 21:41:26 +0200 Message-ID: <97fefc19-b79f-8e75-2eae-61eb44032592@gmail.com> References: <43386295-806b-ff32-4c7c-56aaeb87b4db@gmail.com> <20180926.200435.34563447557737934.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: andrew@lunn.ch, f.fainelli@gmail.com, nic_swsd@realtek.com, netdev@vger.kernel.org To: David Miller Return-path: Received: from mail-wr1-f66.google.com ([209.85.221.66]:46394 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726405AbeI2CGw (ORCPT ); Fri, 28 Sep 2018 22:06:52 -0400 Received: by mail-wr1-f66.google.com with SMTP id z3-v6so7506665wrr.13 for ; Fri, 28 Sep 2018 12:41:35 -0700 (PDT) In-Reply-To: <20180926.200435.34563447557737934.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 27.09.2018 05:04, David Miller wrote: > From: Heiner Kallweit > Date: Mon, 24 Sep 2018 21:58:04 +0200 > >> phy_suspend doesn't always recognize that WoL is enabled and therefore >> suspends the PHY when it should not. First idea to address the issue >> was to reuse checks used in mdio_bus_phy_may_suspend which check >> whether relevant devices are wakeup-enabled. >> Florian raised some concerns because drivers may enable wakeup even if >> WoL isn't enabled (e.g. certain USB network drivers). >> >> The new approach focuses on reducing the risk to break existing stuff. >> We add a flag wol_enabled to struct net_device which is set in >> ethtool_set_wol(). Then this flag is checked in phy_suspend(). >> This doesn't cover 100% of the cases yet (e.g. if WoL is enabled w/o >> explicit configuration), but it covers the most relevant cases with >> very little risk of regressions. >> >> v2: >> - Fix a typo > > Series applied, thanks. > > Please deal with the extra 4 byte size of net_device in net-next. > Sure. Next week I'm on travel, will do it the week after. > Thanks. >