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.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -248,6 +248,16 @@ struct ethtool_tunable { · 247 unmodified lines | ||
| 248 | 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 | 262 | * struct ethtool_regs - hardware register dump |
| 253 | 263 | * @cmd: Command number = %ETHTOOL_GREGS |
| @@ -548,6 +558,7 @@ struct ethtool_pauseparam { · 294 unmodified lines | ||
| 548 | 558 | * @ETH_SS_FEATURES: Device feature names |
| 549 | 559 | * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names |
| 550 | 560 | * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS |
| 561 | + * @ETH_SS_PHY_TUNABLES: PHY tunable names | |
| 551 | 562 | */ |
| 552 | 563 | enum ethtool_stringset { |
| 553 | 564 | ETH_SS_TEST = 0, |
| @@ -558,6 +569,7 @@ enum ethtool_stringset { · 4 unmodified lines | ||
| 558 | 569 | ETH_SS_RSS_HASH_FUNCS, |
| 559 | 570 | ETH_SS_TUNABLES, |
| 560 | 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 | 1326 | #define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */ |
| 1315 | 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 | 1331 | /* compatibility with older code */ |
| 1319 | 1332 | #define SPARC_ETH_GSET ETHTOOL_GSET |