]> git.baikalelectronics.ru Git - kernel.git/commit
net: phylink: add suspend/resume support
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 7 Sep 2021 10:56:46 +0000 (18:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Sep 2021 13:04:59 +0000 (14:04 +0100)
commit63edee332b150d4cb3aa8ced2e2e376e451b3b63
tree477b38213c685bd8a68eb75af5585244f32722f1
parentc92b84db08f6b066c504893840412b43634eb3e3
net: phylink: add suspend/resume support

Joakim Zhang reports that Wake-on-Lan with the stmmac ethernet driver broke
when moving the incorrect handling of mac link state out of mac_config().
This reason this breaks is because the stmmac's WoL is handled by the MAC
rather than the PHY, and phylink doesn't cater for that scenario.

This patch adds the necessary phylink code to handle suspend/resume events
according to whether the MAC still needs a valid link or not. This is the
barest minimum for this support.

Reported-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Tested-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c
include/linux/phylink.h