History

ethtool: Expand documentation of struct ethtool_test

Ben Hutchings committed 12 years ago

Commit 4e5a62d1 parent fe5df1b1 file · +17 −4Browse files

Unified · Split

include/uapi/linux/ethtool.h+17−4
@@ -575,12 +575,25 @@ enum ethtool_test_flags { · 574 unmodified lines
575575 ETH_TEST_FL_EXTERNAL_LB_DONE = (1 << 3),
576576 };
577577
578−/* for requesting NIC test and getting results*/
578+/**
579+ * struct ethtool_test - device self-test invocation
580+ * @cmd: Command number = %ETHTOOL_TEST
581+ * @flags: A bitmask of flags from &enum ethtool_test_flags. Some
582+ * flags may be set by the user on entry; others may be set by
583+ * the driver on return.
584+ * @len: On return, the number of test results
585+ * @data: Array of test results
586+ *
587+ * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the
588+ * number of test results that will be returned. They must allocate a
589+ * buffer of the appropriate size (8 * number of results) immediately
590+ * following this structure.
591+ */
579592 struct ethtool_test {
580− __u32 cmd; /* ETHTOOL_TEST */
581− __u32 flags; /* ETH_TEST_FL_xxx */
593+ __u32 cmd;
594+ __u32 flags;
582595 __u32 reserved;
583− __u32 len; /* result length, in number of u64 elements */
596+ __u32 len;
584597 __u64 data[0];
585598 };
586599