netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] be2net: do external loopback test only when it is requested
@ 2014-03-04 18:04 Ivan Vecera
  2014-03-04 19:03 ` Ajit Khaparde
  2014-03-04 20:17 ` Sergei Shtylyov
  0 siblings, 2 replies; 4+ messages in thread
From: Ivan Vecera @ 2014-03-04 18:04 UTC (permalink / raw)
  To: netdev; +Cc: sathya.perla, subbu.seetharaman, ajit.khaparde

Cc: sathya.perla@emulex.com
Cc: subbu.seetharaman@emulex.com
Cc: ajit.khaparde@emulex.com

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
 drivers/net/ethernet/emulex/benet/be_ethtool.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index cf09d8f..957848f 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -809,9 +809,12 @@ be_self_test(struct net_device *netdev, struct ethtool_test *test, u64 *data)
 						&data[1]) != 0) {
 			test->flags |= ETH_TEST_FL_FAILED;
 		}
-		if (be_loopback_test(adapter, BE_ONE_PORT_EXT_LOOPBACK,
-						&data[2]) != 0) {
-			test->flags |= ETH_TEST_FL_FAILED;
+		if (test->flags & ETH_TEST_FL_EXTERNAL_LB) {
+			if (be_loopback_test(adapter, BE_ONE_PORT_EXT_LOOPBACK,
+					     &data[2]) != 0) {
+				test->flags |= ETH_TEST_FL_FAILED;
+			}
+			test->flags |= ETH_TEST_FL_EXTERNAL_LB_DONE;
 		}
 	}
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-05 10:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 18:04 [PATCH net-next] be2net: do external loopback test only when it is requested Ivan Vecera
2014-03-04 19:03 ` Ajit Khaparde
2014-03-04 20:17 ` Sergei Shtylyov
2014-03-05 10:56   ` Ivan Vecera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).