Ethernet PHYs can maintain statistics, for example errors while idle and receive errors. Add an ethtool mechanism to retrieve these statistics, using the same model as MAC statistics.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -542,6 +542,7 @@ struct ethtool_pauseparam { · 541 unmodified lines | |||
| 542 | * now deprecated | 542 | * now deprecated |
| 543 | * @ETH_SS_FEATURES: Device feature names | 543 | * @ETH_SS_FEATURES: Device feature names |
| 544 | * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names | 544 | * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names |
| 545 | * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS | ||
| 545 | */ | 546 | */ |
| 546 | enum ethtool_stringset { | 547 | enum ethtool_stringset { |
| 547 | ETH_SS_TEST = 0, | 548 | ETH_SS_TEST = 0, |
| @@ -551,6 +552,7 @@ enum ethtool_stringset { · 3 unmodified lines | |||
| 551 | ETH_SS_FEATURES, | 552 | ETH_SS_FEATURES, |
| 552 | ETH_SS_RSS_HASH_FUNCS, | 553 | ETH_SS_RSS_HASH_FUNCS, |
| 553 | ETH_SS_TUNABLES, | 554 | ETH_SS_TUNABLES, |
| 555 | ETH_SS_PHY_STATS, | ||
| 554 | }; | 556 | }; |
| 555 | 557 | ||
| 556 | /** | 558 | /** |
| @@ -1225,6 +1227,7 @@ enum ethtool_sfeatures_retval_bits { · 668 unmodified lines | |||
| 1225 | #define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */ | 1227 | #define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */ |
| 1226 | #define ETHTOOL_GTUNABLE 0x00000048 /* Get tunable configuration */ | 1228 | #define ETHTOOL_GTUNABLE 0x00000048 /* Get tunable configuration */ |
| 1227 | #define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */ | 1229 | #define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */ |
| 1230 | #define ETHTOOL_GPHYSTATS 0x0000004a /* get PHY-specific statistics */ | ||
| 1228 | 1231 | ||
| 1229 | /* compatibility with older code */ | 1232 | /* compatibility with older code */ |
| 1230 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1233 | #define SPARC_ETH_GSET ETHTOOL_GSET |