diff options
author | 2022-10-15 11:51:52 +0100 | |
---|---|---|
committer | 2022-10-15 11:51:52 +0100 | |
commit | a1b6b102df03ac10e83d6c4ea31f07af05fa19c4 (patch) | |
tree | dbd8cda5c9f7ba7583383355803725118412fb33 /drivers | |
parent | Revert "net: fix cpu_max_bits_warn() usage in netif_attrmask_next{,_and}" (diff) | |
parent | net: stmmac: Enable mac_managed_pm phylink config (diff) | |
download | wireguard-linux-a1b6b102df03ac10e83d6c4ea31f07af05fa19c4.tar.xz wireguard-linux-a1b6b102df03ac10e83d6c4ea31f07af05fa19c4.zip |
Merge branch 'phylink_set_mac_pm'
Shenwei Wang says:
====================
net: phylink: add phylink_set_mac_pm() helper
Per Russell's suggestion, the implementation is changed from the helper
function to add an extra property in phylink_config structure because this
change can easily cover SFP usecase too.
Changes in v6:
- update the fix tag hash and format
Changes in v5:
- Add fix tag in the commit message
Changes in v4:
- Clean up the codes in phylink.c
- Continue the version number
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 | ||||
-rw-r--r-- | drivers/net/phy/phylink.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 65c96773c6d2..8273e6a175c8 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1214,6 +1214,7 @@ static int stmmac_phy_setup(struct stmmac_priv *priv) if (priv->plat->tx_queues_to_use > 1) priv->phylink_config.mac_capabilities &= ~(MAC_10HD | MAC_100HD | MAC_1000HD); + priv->phylink_config.mac_managed_pm = true; phylink = phylink_create(&priv->phylink_config, fwnode, mode, &stmmac_phylink_mac_ops); diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 75464df191ef..6547b6cc6cbe 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1661,6 +1661,9 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy, if (phy_interrupt_is_valid(phy)) phy_request_interrupt(phy); + if (pl->config->mac_managed_pm) + phy->mac_managed_pm = true; + return 0; } |