aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/ethtool.h
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2014-02-12 22:14:17 +0000
committerDavid S. Miller <davem@davemloft.net>2014-02-12 17:33:02 -0500
commitc8364a63f6483db0826ccec6e485c1646522faf1 (patch)
treef4fa29a5035c9beb3e56561e7907102fe38d63df /include/uapi/linux/ethtool.h
parentethtool: Expand documentation of struct ethtool_regs (diff)
downloadlinux-dev-c8364a63f6483db0826ccec6e485c1646522faf1.tar.xz
linux-dev-c8364a63f6483db0826ccec6e485c1646522faf1.zip
ethtool: Expand documentation of struct ethtool_eeprom
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/ethtool.h')
-rw-r--r--include/uapi/linux/ethtool.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 441bd316b850..d5a0d20a9ff0 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -231,12 +231,29 @@ struct ethtool_regs {
__u8 data[0];
};
-/* for passing EEPROM chunks */
+/**
+ * struct ethtool_eeprom - EEPROM dump
+ * @cmd: Command number = %ETHTOOL_GEEPROM, %ETHTOOL_GMODULEEEPROM or
+ * %ETHTOOL_SEEPROM
+ * @magic: A 'magic cookie' value to guard against accidental changes.
+ * The value passed in to %ETHTOOL_SEEPROM must match the value
+ * returned by %ETHTOOL_GEEPROM for the same device. This is
+ * unused when @cmd is %ETHTOOL_GMODULEEEPROM.
+ * @offset: Offset within the EEPROM to begin reading/writing, in bytes
+ * @len: On entry, number of bytes to read/write. On successful
+ * return, number of bytes actually read/written. In case of
+ * error, this may indicate at what point the error occurred.
+ * @data: Buffer to read/write from
+ *
+ * Users may use %ETHTOOL_GDRVINFO or %ETHTOOL_GMODULEINFO to find
+ * the length of an on-board or module EEPROM, respectively. They
+ * must allocate the buffer immediately following this structure.
+ */
struct ethtool_eeprom {
__u32 cmd;
__u32 magic;
- __u32 offset; /* in bytes */
- __u32 len; /* in bytes */
+ __u32 offset;
+ __u32 len;
__u8 data[0];
};