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
248248 void *data[0];
249249 };
250250
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+
251261 /**
252262 * struct ethtool_regs - hardware register dump
253263 * @cmd: Command number = %ETHTOOL_GREGS
@@ -548,6 +558,7 @@ struct ethtool_pauseparam { · 294 unmodified lines
548558 * @ETH_SS_FEATURES: Device feature names
549559 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
550560 * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
561+ * @ETH_SS_PHY_TUNABLES: PHY tunable names
551562 */
552563 enum ethtool_stringset {
553564 ETH_SS_TEST = 0,
@@ -558,6 +569,7 @@ enum ethtool_stringset { · 4 unmodified lines
558569 ETH_SS_RSS_HASH_FUNCS,
559570 ETH_SS_TUNABLES,
560571 ETH_SS_PHY_STATS,
572+ ETH_SS_PHY_TUNABLES,
561573 };
562574
563575 /**
@@ -1313,7 +1325,8 @@ struct ethtool_per_queue_op { · 749 unmodified lines
13131325
13141326 #define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */
13151327 #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 */
13171330
13181331 /* compatibility with older code */
13191332 #define SPARC_ETH_GSET ETHTOOL_GSET