diff options
author | Raju Lakkaraju <Raju.Lakkaraju@microsemi.com> | 2016-11-17 07:07:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-18 12:12:13 -0500 |
commit | 0d27f4e437e448c4ff440a31567b9729d1634d66 (patch) | |
tree | 14c2304e044bf71d4dcb73c92d864c18fa723001 /include/uapi/linux/ethtool.h | |
parent | 511d5d5b652fe06164952f2986aaf25ec72f25e4 (diff) |
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: Raju Lakkaraju <Raju.Lakkaraju@microsemi.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Allan W. Nielsen <allan.nielsen@microsemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/ethtool.h')
-rw-r--r-- | include/uapi/linux/ethtool.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 8e547231c1b7..42f696f139ec 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h | |||
@@ -248,6 +248,16 @@ struct ethtool_tunable { | |||
248 | void *data[0]; | 248 | void *data[0]; |
249 | }; | 249 | }; |
250 | 250 | ||
251 | enum phy_tunable_id { | ||
252 | ETHTOOL_PHY_ID_UNSPEC, | ||
253 | |||
254 | /* | ||
255 | * Add your fresh new phy tunable attribute above and remember to update | ||
256 | * phy_tunable_strings[] in net/core/ethtool.c | ||
257 | */ | ||
258 | __ETHTOOL_PHY_TUNABLE_COUNT, | ||
259 | }; | ||
260 | |||
251 | /** | 261 | /** |
252 | * struct ethtool_regs - hardware register dump | 262 | * struct ethtool_regs - hardware register dump |
253 | * @cmd: Command number = %ETHTOOL_GREGS | 263 | * @cmd: Command number = %ETHTOOL_GREGS |
@@ -548,6 +558,7 @@ struct ethtool_pauseparam { | |||
548 | * @ETH_SS_FEATURES: Device feature names | 558 | * @ETH_SS_FEATURES: Device feature names |
549 | * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names | 559 | * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names |
550 | * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS | 560 | * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS |
561 | * @ETH_SS_PHY_TUNABLES: PHY tunable names | ||
551 | */ | 562 | */ |
552 | enum ethtool_stringset { | 563 | enum ethtool_stringset { |
553 | ETH_SS_TEST = 0, | 564 | ETH_SS_TEST = 0, |
@@ -558,6 +569,7 @@ enum ethtool_stringset { | |||
558 | ETH_SS_RSS_HASH_FUNCS, | 569 | ETH_SS_RSS_HASH_FUNCS, |
559 | ETH_SS_TUNABLES, | 570 | ETH_SS_TUNABLES, |
560 | ETH_SS_PHY_STATS, | 571 | ETH_SS_PHY_STATS, |
572 | ETH_SS_PHY_TUNABLES, | ||
561 | }; | 573 | }; |
562 | 574 | ||
563 | /** | 575 | /** |
@@ -1313,7 +1325,8 @@ struct ethtool_per_queue_op { | |||
1313 | 1325 | ||
1314 | #define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */ | 1326 | #define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */ |
1315 | #define ETHTOOL_SLINKSETTINGS 0x0000004d /* Set ethtool_link_settings */ | 1327 | #define ETHTOOL_SLINKSETTINGS 0x0000004d /* Set ethtool_link_settings */ |
1316 | 1328 | #define ETHTOOL_PHY_GTUNABLE 0x0000004e /* Get PHY tunable configuration */ | |
1329 | #define ETHTOOL_PHY_STUNABLE 0x0000004f /* Set PHY tunable configuration */ | ||
1317 | 1330 | ||
1318 | /* compatibility with older code */ | 1331 | /* compatibility with older code */ |
1319 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1332 | #define SPARC_ETH_GSET ETHTOOL_GSET |