aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2020-05-27 00:21:38 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-26 23:21:48 -0700
commit1a644de29f712771c2ec00e52caa391544eb6141 (patch)
treee0bf03d3de999e853aaa53a31eaf09662d68a245 /include/linux/phy.h
parentnet: ethtool: Add attributes for cable test TDR data (diff)
downloadwireguard-linux-1a644de29f712771c2ec00e52caa391544eb6141.tar.xz
wireguard-linux-1a644de29f712771c2ec00e52caa391544eb6141.zip
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>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 6d256e720a66..d3c384f353ca 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -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);