net: ethtool: Add generic parts of cable test TDR
Add the generic parts of the code used to trigger a cable test and return raw TDR data. Any PHY driver which support this must implement the new driver op. Signed-off-by: Andrew Lunn <andrew@lunn.ch> v2 Update nxp-tja11xx for API change. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
a331172b15
commit
1a644de29f
@@ -699,6 +699,10 @@ struct phy_driver {
|
||||
|
||||
/* Start a cable test */
|
||||
int (*cable_test_start)(struct phy_device *dev);
|
||||
|
||||
/* Start a raw TDR cable test */
|
||||
int (*cable_test_tdr_start)(struct phy_device *dev);
|
||||
|
||||
/* Once per second, or on interrupt, request the status of the
|
||||
* test.
|
||||
*/
|
||||
@@ -1251,6 +1255,8 @@ int phy_reset_after_clk_enable(struct phy_device *phydev);
|
||||
#if IS_ENABLED(CONFIG_PHYLIB)
|
||||
int phy_start_cable_test(struct phy_device *phydev,
|
||||
struct netlink_ext_ack *extack);
|
||||
int phy_start_cable_test_tdr(struct phy_device *phydev,
|
||||
struct netlink_ext_ack *extack);
|
||||
#else
|
||||
static inline
|
||||
int phy_start_cable_test(struct phy_device *phydev,
|
||||
@@ -1259,6 +1265,13 @@ int phy_start_cable_test(struct phy_device *phydev,
|
||||
NL_SET_ERR_MSG(extack, "Kernel not compiled with PHYLIB support");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
static inline
|
||||
int phy_start_cable_test_tdr(struct phy_device *phydev,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
NL_SET_ERR_MSG(extack, "Kernel not compiled with PHYLIB support");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
#endif
|
||||
|
||||
int phy_cable_test_result(struct phy_device *phydev, u8 pair, u16 result);
|
||||
|
||||
Reference in New Issue
Block a user