aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2014-02-12 17:14:03 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-12 17:33:02 -0500
commitdaba1b6bc1cb89c462bdd444c29c023dda3459e6 (patch)
treef5706f28973fd97dc6bf72ebe8c19087506b85ef /include/uapi/linux
parentbf8fc60a62db3fa99d2ded50e68bf3e5be027ebe (diff)
ethtool: Expand documentation of struct ethtool_drvinfo
Replace the inline comments (and some others below) with a full explanation of the semantics, in kernel-doc format. Specify which strings may be empty. Document the relationship with other commands. Replace the 'deprecation' of some fields with a proper explanation of the conversion to generalised string sets, as userland programs may not be able to assume that ETHTOOL_GSSET_INFO is available. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/ethtool.h56
1 files changed, 39 insertions, 17 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index c4d5eb2bfac5..cc523cb53b07 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -139,28 +139,50 @@ static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
139 139
140#define ETHTOOL_FWVERS_LEN 32 140#define ETHTOOL_FWVERS_LEN 32
141#define ETHTOOL_BUSINFO_LEN 32 141#define ETHTOOL_BUSINFO_LEN 32
142/* these strings are set to whatever the driver author decides... */ 142
143/**
144 * struct ethtool_drvinfo - general driver and device information
145 * @cmd: Command number = %ETHTOOL_GDRVINFO
146 * @driver: Driver short name. This should normally match the name
147 * in its bus driver structure (e.g. pci_driver::name). Must
148 * not be an empty string.
149 * @version: Driver version string; may be an empty string
150 * @fw_version: Firmware version string; may be an empty string
151 * @bus_info: Device bus address. This should match the dev_name()
152 * string for the underlying bus device, if there is one. May be
153 * an empty string.
154 * @n_priv_flags: Number of flags valid for %ETHTOOL_GPFLAGS and
155 * %ETHTOOL_SPFLAGS commands; also the number of strings in the
156 * %ETH_SS_PRIV_FLAGS set
157 * @n_stats: Number of u64 statistics returned by the %ETHTOOL_GSTATS
158 * command; also the number of strings in the %ETH_SS_STATS set
159 * @testinfo_len: Number of results returned by the %ETHTOOL_TEST
160 * command; also the number of strings in the %ETH_SS_TEST set
161 * @eedump_len: Size of EEPROM accessible through the %ETHTOOL_GEEPROM
162 * and %ETHTOOL_SEEPROM commands, in bytes
163 * @regdump_len: Size of register dump returned by the %ETHTOOL_GREGS
164 * command, in bytes
165 *
166 * Users can use the %ETHTOOL_GSSET_INFO command to get the number of
167 * strings in any string set (from Linux 2.6.34).
168 *
169 * Drivers should set at most @driver, @version, @fw_version and
170 * @bus_info in their get_drvinfo() implementation. The ethtool
171 * core fills in the other fields using other driver operations.
172 */
143struct ethtool_drvinfo { 173struct ethtool_drvinfo {
144 __u32 cmd; 174 __u32 cmd;
145 char driver[32]; /* driver short name, "tulip", "eepro100" */ 175 char driver[32];
146 char version[32]; /* driver version string */ 176 char version[32];
147 char fw_version[ETHTOOL_FWVERS_LEN]; /* firmware version string */ 177 char fw_version[ETHTOOL_FWVERS_LEN];
148 char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ 178 char bus_info[ETHTOOL_BUSINFO_LEN];
149 /* For PCI devices, use pci_name(pci_dev). */
150 char reserved1[32]; 179 char reserved1[32];
151 char reserved2[12]; 180 char reserved2[12];
152 /* 181 __u32 n_priv_flags;
153 * Some struct members below are filled in 182 __u32 n_stats;
154 * using ops->get_sset_count(). Obtaining
155 * this info from ethtool_drvinfo is now
156 * deprecated; Use ETHTOOL_GSSET_INFO
157 * instead.
158 */
159 __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */
160 __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
161 __u32 testinfo_len; 183 __u32 testinfo_len;
162 __u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */ 184 __u32 eedump_len;
163 __u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */ 185 __u32 regdump_len;
164}; 186};
165 187
166#define SOPASS_MAX 6 188#define SOPASS_MAX 6