Commit 09400737 authored by Jeremy Linton's avatar Jeremy Linton Committed by Zheng Zengkai
Browse files

net: bcmgenet: Don't claim WOL when its not available

stable inclusion
from stable-v5.10.106
commit dc1c2b47b539b17fd7144513d6e23f00477dcb11
bugzilla: https://gitee.com/openeuler/kernel/issues/I573US

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dc1c2b47b539b17fd7144513d6e23f00477dcb11



--------------------------------

[ Upstream commit 00b022f8 ]

Some of the bcmgenet platforms don't correctly support WOL, yet
ethtool returns:

"Supports Wake-on: gsf"

which is false.

Ideally if there isn't a wol_irq, or there is something else that
keeps the device from being able to wakeup it should display:

"Supports Wake-on: d"

This patch checks whether the device can wakup, before using the
hard-coded supported flags. This corrects the ethtool reporting, as
well as the WOL configuration because ethtool verifies that the mode
is supported before attempting it.

Fixes: c51de7f3 ("net: bcmgenet: add Wake-on-LAN support code")
Signed-off-by: default avatarJeremy Linton <jeremy.linton@arm.com>
Tested-by: default avatarPeter Robinson <pbrobinson@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220310045535.224450-1-jeremy.linton@arm.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 18cfcf45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment