Commit 0d27f4e4 authored by Raju Lakkaraju's avatar Raju Lakkaraju Committed by David S. Miller

ethtool: (uapi) Add ETHTOOL_PHY_GTUNABLE and ETHTOOL_PHY_STUNABLE

Defines a generic API to get/set phy tunables. The API is using the
existing ethtool_tunable/tunable_type_id types which is already being used
for mac level tunables.
Signed-off-by: default avatarRaju Lakkaraju <Raju.Lakkaraju@microsemi.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarAllan W. Nielsen <allan.nielsen@microsemi.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 511d5d5b
...@@ -248,6 +248,16 @@ struct ethtool_tunable { ...@@ -248,6 +248,16 @@ struct ethtool_tunable {
void *data[0]; void *data[0];
}; };
enum phy_tunable_id {
ETHTOOL_PHY_ID_UNSPEC,
/*
* Add your fresh new phy tunable attribute above and remember to update
* phy_tunable_strings[] in net/core/ethtool.c
*/
__ETHTOOL_PHY_TUNABLE_COUNT,
};
/** /**
* struct ethtool_regs - hardware register dump * struct ethtool_regs - hardware register dump
* @cmd: Command number = %ETHTOOL_GREGS * @cmd: Command number = %ETHTOOL_GREGS
...@@ -548,6 +558,7 @@ struct ethtool_pauseparam { ...@@ -548,6 +558,7 @@ struct ethtool_pauseparam {
* @ETH_SS_FEATURES: Device feature names * @ETH_SS_FEATURES: Device feature names
* @ETH_SS_RSS_HASH_FUNCS: RSS hush function names * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
* @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
* @ETH_SS_PHY_TUNABLES: PHY tunable names
*/ */
enum ethtool_stringset { enum ethtool_stringset {
ETH_SS_TEST = 0, ETH_SS_TEST = 0,
...@@ -558,6 +569,7 @@ enum ethtool_stringset { ...@@ -558,6 +569,7 @@ enum ethtool_stringset {
ETH_SS_RSS_HASH_FUNCS, ETH_SS_RSS_HASH_FUNCS,
ETH_SS_TUNABLES, ETH_SS_TUNABLES,
ETH_SS_PHY_STATS, ETH_SS_PHY_STATS,
ETH_SS_PHY_TUNABLES,
}; };
/** /**
...@@ -1313,7 +1325,8 @@ struct ethtool_per_queue_op { ...@@ -1313,7 +1325,8 @@ struct ethtool_per_queue_op {
#define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */ #define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */
#define ETHTOOL_SLINKSETTINGS 0x0000004d /* Set ethtool_link_settings */ #define ETHTOOL_SLINKSETTINGS 0x0000004d /* Set ethtool_link_settings */
#define ETHTOOL_PHY_GTUNABLE 0x0000004e /* Get PHY tunable configuration */
#define ETHTOOL_PHY_STUNABLE 0x0000004f /* Set PHY tunable configuration */
/* compatibility with older code */ /* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET #define SPARC_ETH_GSET ETHTOOL_GSET
......
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