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>
This commit is contained in:
commit
a1b6b102df
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -122,6 +122,7 @@ enum phylink_op_type {
|
||||
* (See commit 7cceb599d15d ("net: phylink: avoid mac_config calls")
|
||||
* @poll_fixed_state: if true, starts link_poll,
|
||||
* if MAC link is at %MLO_AN_FIXED mode.
|
||||
* @mac_managed_pm: if true, indicate the MAC driver is responsible for PHY PM.
|
||||
* @ovr_an_inband: if true, override PCS to MLO_AN_INBAND
|
||||
* @get_fixed_state: callback to execute to determine the fixed link state,
|
||||
* if MAC link is at %MLO_AN_FIXED mode.
|
||||
@ -134,6 +135,7 @@ struct phylink_config {
|
||||
enum phylink_op_type type;
|
||||
bool legacy_pre_march2020;
|
||||
bool poll_fixed_state;
|
||||
bool mac_managed_pm;
|
||||
bool ovr_an_inband;
|
||||
void (*get_fixed_state)(struct phylink_config *config,
|
||||
struct phylink_link_state *state);
|
||||
|
Loading…
Reference in New Issue
Block a user