netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amit Kumar Salecha <amit.salecha@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ameen.rahman@qlogic.com,
	Sony Chacko <sony.chacko@qlogic.com>
Subject: [PATCH NEXT 6/8] qlcnic: fix link diag test
Date: Wed, 11 Aug 2010 05:05:27 -0700	[thread overview]
Message-ID: <1281528329-8812-7-git-send-email-amit.salecha@qlogic.com> (raw)
In-Reply-To: <1281528329-8812-1-git-send-email-amit.salecha@qlogic.com>

From: Sony Chacko <sony.chacko@qlogic.com>

o Give sufficient time for all makes of PHY modules
  to establish the link after loopback test.
o Perform online test before offline test.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/qlcnic/qlcnic_ethtool.c |   17 ++++++++---------
 drivers/net/qlcnic/qlcnic_hw.c      |    1 +
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c
index 9328d59..3d4655d 100644
--- a/drivers/net/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/qlcnic/qlcnic_ethtool.c
@@ -747,6 +747,14 @@ qlcnic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
 {
 	memset(data, 0, sizeof(u64) * QLCNIC_TEST_LEN);
 
+	data[0] = qlcnic_reg_test(dev);
+	if (data[0])
+		eth_test->flags |= ETH_TEST_FL_FAILED;
+
+	data[1] = (u64) qlcnic_test_link(dev);
+	if (data[1])
+		eth_test->flags |= ETH_TEST_FL_FAILED;
+
 	if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
 		data[2] = qlcnic_irq_test(dev);
 		if (data[2])
@@ -757,15 +765,6 @@ qlcnic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
 			eth_test->flags |= ETH_TEST_FL_FAILED;
 
 	}
-
-	data[0] = qlcnic_reg_test(dev);
-	if (data[0])
-		eth_test->flags |= ETH_TEST_FL_FAILED;
-
-	/* link test */
-	data[1] = (u64) qlcnic_test_link(dev);
-	if (data[1])
-		eth_test->flags |= ETH_TEST_FL_FAILED;
 }
 
 static void
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
index e08c8b0..9d40ce0 100644
--- a/drivers/net/qlcnic/qlcnic_hw.c
+++ b/drivers/net/qlcnic/qlcnic_hw.c
@@ -1245,4 +1245,5 @@ void qlcnic_clear_ilb_mode(struct qlcnic_adapter *adapter)
 		mode = VPORT_MISS_MODE_ACCEPT_MULTI;
 
 	qlcnic_nic_set_promisc(adapter, mode);
+	msleep(1000);
 }
-- 
1.6.0.2


  parent reply	other threads:[~2010-08-11 12:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 12:05 [PATCH NEXT 0/8]qlcnic: enhancement and fixes Amit Kumar Salecha
2010-08-11 12:05 ` [PATCH NEXT 1/8] qlcnic: fix aer for virtual func Amit Kumar Salecha
2010-08-11 12:05 ` [PATCH NEXT 2/8] qlcnic: device state management fixes " Amit Kumar Salecha
2010-08-11 12:05 ` [PATCH NEXT 3/8] qlcnic: fix for setting function modes Amit Kumar Salecha
2010-08-11 12:05 ` [PATCH NEXT 4/8] qlcnic: add eswitch statistics support Amit Kumar Salecha
2010-08-11 12:05 ` [PATCH NEXT 5/8] qlcnic: fix link status message Amit Kumar Salecha
2010-08-11 12:05 ` Amit Kumar Salecha [this message]
2010-08-11 12:05 ` [PATCH NEXT 7/8] qlcnic: turn off lro when rxcsum is disabled Amit Kumar Salecha
2010-08-11 12:05 ` [PATCH NEXT 8/8] qlcnic: update version 5.0.8.0 Amit Kumar Salecha
2010-08-12  3:41 ` [PATCH NEXT 0/8]qlcnic: enhancement and fixes Amit Salecha
2010-08-12  5:23   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1281528329-8812-7-git-send-email-amit.salecha@qlogic.com \
    --to=amit.salecha@qlogic.com \
    --cc=ameen.rahman@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sony.chacko@qlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).