mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
net: phy: add genphy_c45_read_eee_abilities() function
Add generic function for EEE abilities defined by IEEE 802.3 specification. For now following registers are supported: - IEEE 802.3-2018 45.2.3.10 EEE control and capability 1 (Register 3.20) - IEEE 802.3cg-2019 45.2.1.186b 10BASE-T1L PMA status register (Register 1.2295) Since I was not able to find any flag signaling support of these registers, we should detect link mode abilities first and then based on these abilities doing EEE link modes detection. Results of EEE ability detection will be stored into new variable phydev->supported_eee. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
69d3b36ca0
commit
14e47d1fb8
@@ -52,6 +52,7 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_gbit_all_ports_features) __ro_after_
|
||||
extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_features) __ro_after_init;
|
||||
extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_fec_features) __ro_after_init;
|
||||
extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_init;
|
||||
extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_eee_cap1_features) __ro_after_init;
|
||||
|
||||
#define PHY_BASIC_FEATURES ((unsigned long *)&phy_basic_features)
|
||||
#define PHY_BASIC_T1_FEATURES ((unsigned long *)&phy_basic_t1_features)
|
||||
@@ -62,6 +63,7 @@ extern __ETHTOOL_DECLARE_LINK_MODE_MASK(phy_10gbit_full_features) __ro_after_ini
|
||||
#define PHY_10GBIT_FEATURES ((unsigned long *)&phy_10gbit_features)
|
||||
#define PHY_10GBIT_FEC_FEATURES ((unsigned long *)&phy_10gbit_fec_features)
|
||||
#define PHY_10GBIT_FULL_FEATURES ((unsigned long *)&phy_10gbit_full_features)
|
||||
#define PHY_EEE_CAP1_FEATURES ((unsigned long *)&phy_eee_cap1_features)
|
||||
|
||||
extern const int phy_basic_ports_array[3];
|
||||
extern const int phy_fibre_port_array[1];
|
||||
@@ -572,6 +574,7 @@ struct macsec_ops;
|
||||
* @supported: Combined MAC/PHY supported linkmodes
|
||||
* @advertising: Currently advertised linkmodes
|
||||
* @adv_old: Saved advertised while power saving for WoL
|
||||
* @supported_eee: supported PHY EEE linkmodes
|
||||
* @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
|
||||
@@ -676,6 +679,8 @@ struct phy_device {
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising);
|
||||
/* used with phy_speed_down */
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(adv_old);
|
||||
/* used for eee validation */
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(supported_eee);
|
||||
|
||||
/* Host supported PHY interface types. Should be ignored if empty. */
|
||||
DECLARE_PHY_INTERFACE_MASK(host_interfaces);
|
||||
@@ -1737,6 +1742,7 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev);
|
||||
int genphy_c45_an_disable_aneg(struct phy_device *phydev);
|
||||
int genphy_c45_read_mdix(struct phy_device *phydev);
|
||||
int genphy_c45_pma_read_abilities(struct phy_device *phydev);
|
||||
int genphy_c45_read_eee_abilities(struct phy_device *phydev);
|
||||
int genphy_c45_pma_baset1_read_master_slave(struct phy_device *phydev);
|
||||
int genphy_c45_read_status(struct phy_device *phydev);
|
||||
int genphy_c45_baset1_read_status(struct phy_device *phydev);
|
||||
|
Reference in New Issue
Block a user