History

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.

Raju Lakkaraju committed 9 years ago

Commit 0d27f4e1 parent 511d5d51 file · +14 −1Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/ethtool.h+14−1
@@ -248,6 +248,16 @@ struct ethtool_tunable { · 247 unmodified lines
248 void *data[0];248 void *data[0];
249};249};
250 250
251enum 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 dump262 * struct ethtool_regs - hardware register dump
253 * @cmd: Command number = %ETHTOOL_GREGS263 * @cmd: Command number = %ETHTOOL_GREGS
@@ -548,6 +558,7 @@ struct ethtool_pauseparam { · 294 unmodified lines
548 * @ETH_SS_FEATURES: Device feature names558 * @ETH_SS_FEATURES: Device feature names
549 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names559 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
550 * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS560 * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
561 * @ETH_SS_PHY_TUNABLES: PHY tunable names
551 */562 */
552enum ethtool_stringset {563enum ethtool_stringset {
553 ETH_SS_TEST = 0,564 ETH_SS_TEST = 0,
@@ -558,6 +569,7 @@ enum ethtool_stringset { · 4 unmodified lines
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 { · 749 unmodified lines
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_GSET1332#define SPARC_ETH_GSET ETHTOOL_GSET