Merge branch 'net-phy-rename-eee_broken_mode'
Heiner Kallweit says: ==================== net: phy: rename eee_broken_mode eee_broken_mode is used also if an EEE mode isn't actually broken but e.g. not supported by MAC. So rename it. This is split out from a bigger series that needs more rework. ==================== Link: https://patch.msgid.link/d7924d4e-49b0-4182-831f-73c558d4425e@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -5252,9 +5252,9 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
|
||||
|
||||
/* mimic behavior of r8125/r8126 vendor drivers */
|
||||
if (tp->mac_version == RTL_GIGA_MAC_VER_61)
|
||||
phy_set_eee_broken(tp->phydev,
|
||||
ETHTOOL_LINK_MODE_2500baseT_Full_BIT);
|
||||
phy_set_eee_broken(tp->phydev, ETHTOOL_LINK_MODE_5000baseT_Full_BIT);
|
||||
phy_disable_eee_mode(tp->phydev,
|
||||
ETHTOOL_LINK_MODE_2500baseT_Full_BIT);
|
||||
phy_disable_eee_mode(tp->phydev, ETHTOOL_LINK_MODE_5000baseT_Full_BIT);
|
||||
|
||||
/* PHY will be woken up in rtl_open() */
|
||||
phy_suspend(tp->phydev);
|
||||
|
||||
@@ -686,7 +686,7 @@ static int genphy_c45_write_eee_adv(struct phy_device *phydev,
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(tmp);
|
||||
int val, changed = 0;
|
||||
|
||||
linkmode_andnot(tmp, adv, phydev->eee_broken_modes);
|
||||
linkmode_andnot(tmp, adv, phydev->eee_disabled_modes);
|
||||
|
||||
if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP1_FEATURES)) {
|
||||
val = linkmode_to_mii_eee_cap1_t(tmp);
|
||||
|
||||
@@ -406,7 +406,7 @@ void of_set_phy_supported(struct phy_device *phydev)
|
||||
void of_set_phy_eee_broken(struct phy_device *phydev)
|
||||
{
|
||||
struct device_node *node = phydev->mdio.dev.of_node;
|
||||
unsigned long *modes = phydev->eee_broken_modes;
|
||||
unsigned long *modes = phydev->eee_disabled_modes;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_OF_MDIO) || !node)
|
||||
return;
|
||||
|
||||
@@ -2966,7 +2966,7 @@ void phy_disable_eee(struct phy_device *phydev)
|
||||
phydev->eee_cfg.tx_lpi_enabled = false;
|
||||
phydev->eee_cfg.eee_enabled = false;
|
||||
/* don't let userspace re-enable EEE advertisement */
|
||||
linkmode_fill(phydev->eee_broken_modes);
|
||||
linkmode_fill(phydev->eee_disabled_modes);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(phy_disable_eee);
|
||||
|
||||
|
||||
+6
-6
@@ -611,7 +611,7 @@ struct macsec_ops;
|
||||
* @eee_cfg: User configuration of EEE
|
||||
* @lp_advertising: Current link partner advertised linkmodes
|
||||
* @host_interfaces: PHY interface modes supported by host
|
||||
* @eee_broken_modes: Energy efficient ethernet modes which should be prohibited
|
||||
* @eee_disabled_modes: Energy efficient ethernet modes not to be advertised
|
||||
* @autoneg: Flag autoneg being used
|
||||
* @rate_matching: Current rate matching mode
|
||||
* @link: Current link state
|
||||
@@ -727,7 +727,7 @@ struct phy_device {
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(supported_eee);
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising_eee);
|
||||
/* Energy efficient ethernet modes which should be prohibited */
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(eee_broken_modes);
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(eee_disabled_modes);
|
||||
bool enable_tx_lpi;
|
||||
bool eee_active;
|
||||
struct eee_config eee_cfg;
|
||||
@@ -1347,13 +1347,13 @@ void of_set_phy_timing_role(struct phy_device *phydev);
|
||||
int phy_speed_down_core(struct phy_device *phydev);
|
||||
|
||||
/**
|
||||
* phy_set_eee_broken - Mark an EEE mode as broken so that it isn't advertised.
|
||||
* phy_disable_eee_mode - Don't advertise an EEE mode.
|
||||
* @phydev: The phy_device struct
|
||||
* @link_mode: The broken EEE mode
|
||||
* @link_mode: The EEE mode to be disabled
|
||||
*/
|
||||
static inline void phy_set_eee_broken(struct phy_device *phydev, u32 link_mode)
|
||||
static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode)
|
||||
{
|
||||
linkmode_set_bit(link_mode, phydev->eee_broken_modes);
|
||||
linkmode_set_bit(link_mode, phydev->eee_disabled_modes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user