]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: ethernet: ave: Set initial wol state to disabled
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Thu, 29 Nov 2018 08:06:32 +0000 (17:06 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jan 2019 08:20:43 +0000 (09:20 +0100)
commit2ca0f9b6c513fcef85d293ac17cc33b06a2d6e3d
treea70d80462975c269f7dc69cf1cdcba931d13be10
parentd09c144edee9613e92ce465a81304cffd8c84879
net: ethernet: ave: Set initial wol state to disabled

[ Upstream commit 7200f2e3c9e267d29e2bfa075794339032e0b98e ]

If wol state of phy hardware is enabled after reset, phy_ethtool_get_wol()
returns that wol.wolopts is true.

However, since net_device.wol_enabled is zero and this doesn't apply wol
state until calling ethtool_set_wol(), so mdio_bus_phy_may_suspend()
returns true, that is, it's in a state where phy can suspend even though
wol state is enabled.

In this inconsistency, phy_suspend() returns -EBUSY, and at last,
suspend sequence fails with the following message:

    dpm_run_callback(): mdio_bus_phy_suspend+0x0/0x58 returns -16
    PM: Device 65000000.ethernet-ffffffff:01 failed to suspend: error -16
    PM: Some devices failed to suspend, or early wake event detected

In order to fix the above issue, this patch forces to set initial wol state
to disabled as default.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/socionext/sni_ave.c