Commit 53243d41 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Jakub Kicinski

net: use bool values to pass bool param of phy_init_eee()

The 2nd param of phy_init_eee(): clk_stop_enable is a bool param, use
true or false instead of 1/0.
Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220123152241.1480-1-jszhang@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6e667749
...@@ -2186,7 +2186,7 @@ int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy) ...@@ -2186,7 +2186,7 @@ int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
{ {
int ret; int ret;
ret = phy_init_eee(phy, 0); ret = phy_init_eee(phy, false);
if (ret) if (ret)
return 0; return 0;
......
...@@ -2846,7 +2846,7 @@ static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, ...@@ -2846,7 +2846,7 @@ static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
mcr |= PMCR_RX_FC_EN; mcr |= PMCR_RX_FC_EN;
} }
if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, 0) >= 0) { if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
switch (speed) { switch (speed) {
case SPEED_1000: case SPEED_1000:
mcr |= PMCR_FORCE_EEE1G; mcr |= PMCR_FORCE_EEE1G;
......
...@@ -1368,7 +1368,7 @@ static int bcmgenet_set_eee(struct net_device *dev, struct ethtool_eee *e) ...@@ -1368,7 +1368,7 @@ static int bcmgenet_set_eee(struct net_device *dev, struct ethtool_eee *e)
if (!p->eee_enabled) { if (!p->eee_enabled) {
bcmgenet_eee_enable_set(dev, false); bcmgenet_eee_enable_set(dev, false);
} else { } else {
ret = phy_init_eee(dev->phydev, 0); ret = phy_init_eee(dev->phydev, false);
if (ret) { if (ret) {
netif_err(priv, hw, dev, "EEE initialization failed\n"); netif_err(priv, hw, dev, "EEE initialization failed\n");
return ret; return ret;
......
...@@ -2797,7 +2797,7 @@ static int fec_enet_eee_mode_set(struct net_device *ndev, bool enable) ...@@ -2797,7 +2797,7 @@ static int fec_enet_eee_mode_set(struct net_device *ndev, bool enable)
int ret = 0; int ret = 0;
if (enable) { if (enable) {
ret = phy_init_eee(ndev->phydev, 0); ret = phy_init_eee(ndev->phydev, false);
if (ret) if (ret)
return ret; return ret;
......
...@@ -4212,7 +4212,7 @@ static void mvneta_mac_link_up(struct phylink_config *config, ...@@ -4212,7 +4212,7 @@ static void mvneta_mac_link_up(struct phylink_config *config,
mvneta_port_up(pp); mvneta_port_up(pp);
if (phy && pp->eee_enabled) { if (phy && pp->eee_enabled) {
pp->eee_active = phy_init_eee(phy, 0) >= 0; pp->eee_active = phy_init_eee(phy, false) >= 0;
mvneta_set_eee(pp, pp->eee_active && pp->tx_lpi_enabled); mvneta_set_eee(pp, pp->eee_active && pp->tx_lpi_enabled);
} }
} }
......
...@@ -750,7 +750,7 @@ static int lan743x_ethtool_set_eee(struct net_device *netdev, ...@@ -750,7 +750,7 @@ static int lan743x_ethtool_set_eee(struct net_device *netdev,
} }
if (eee->eee_enabled) { if (eee->eee_enabled) {
ret = phy_init_eee(phydev, 0); ret = phy_init_eee(phydev, false);
if (ret) { if (ret) {
netif_err(adapter, drv, adapter->netdev, netif_err(adapter, drv, adapter->netdev,
"EEE initialization failed\n"); "EEE initialization failed\n");
......
...@@ -127,7 +127,7 @@ bool sxgbe_eee_init(struct sxgbe_priv_data * const priv) ...@@ -127,7 +127,7 @@ bool sxgbe_eee_init(struct sxgbe_priv_data * const priv)
/* MAC core supports the EEE feature. */ /* MAC core supports the EEE feature. */
if (priv->hw_cap.eee) { if (priv->hw_cap.eee) {
/* Check if the PHY supports EEE */ /* Check if the PHY supports EEE */
if (phy_init_eee(ndev->phydev, 1)) if (phy_init_eee(ndev->phydev, true))
return false; return false;
priv->eee_active = 1; priv->eee_active = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment