aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2011-06-29 16:00:49 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-01 01:32:49 -0400
commit0209bcd4d9ee66569d4ea76f9ab2de3a9c740c71 (patch)
tree7eca56aac7b37c5468a58616d896047d912f9bbf /include/linux/ethtool.h
parent781b864711d8cff56af9478be1b892b098e10de8 (diff)
net: add external loopback test in ethtool self test
External loopback test can be performed by application without any driver support on normal Ethernet cards. But on CNA devices, where multiple functions share same physical port. Here internal loopback test and external loopback test can be initiated by multiple functions at same time. To co exist all functions, firmware need to regulate what test can be run by which function. So before performing external loopback test, command need to send to firmware, which will quiescent other functions. User may not want to run external loopback test always. As special cable need to be connected for this test. So adding explicit flag in ethtool self test, which will specify interface to perform external loopback test. ETH_TEST_FL_EXTERNAL_LB: Application set to request external loopback test ETH_TEST_FL_EXTERNAL_LB_DONE: Driver ack if test performed Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 048d0fa38d03..c6e427ab65fe 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -310,9 +310,21 @@ struct ethtool_sset_info {
310 __u32's, etc. */ 310 __u32's, etc. */
311}; 311};
312 312
313/**
314 * enum ethtool_test_flags - flags definition of ethtool_test
315 * @ETH_TEST_FL_OFFLINE: if set perform online and offline tests, otherwise
316 * only online tests.
317 * @ETH_TEST_FL_FAILED: Driver set this flag if test fails.
318 * @ETH_TEST_FL_EXTERNAL_LB: Application request to perform external loopback
319 * test.
320 * @ETH_TEST_FL_EXTERNAL_LB_DONE: Driver performed the external loopback test
321 */
322
313enum ethtool_test_flags { 323enum ethtool_test_flags {
314 ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ 324 ETH_TEST_FL_OFFLINE = (1 << 0),
315 ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ 325 ETH_TEST_FL_FAILED = (1 << 1),
326 ETH_TEST_FL_EXTERNAL_LB = (1 << 2),
327 ETH_TEST_FL_EXTERNAL_LB_DONE = (1 << 3),
316}; 328};
317 329
318/* for requesting NIC test and getting results*/ 330/* for requesting NIC test and getting results*/