netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ron Mercer <ron.mercer@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ron.mercer@qlogic.com
Subject: [net-next PATCH 3/3] qlge: Fix occasional loopback test failure.
Date: Wed, 17 Feb 2010 08:41:23 -0800	[thread overview]
Message-ID: <1266424883-25927-4-git-send-email-ron.mercer@qlogic.com> (raw)
In-Reply-To: <1266424883-25927-1-git-send-email-ron.mercer@qlogic.com>

On some servers we see the cleaning of the RX queue finish before all
the loopback packets are sent out.  This delay allows the queues to
settle before checking for successful completion.
Also, delay completion so link has time to come back up.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
 drivers/net/qlge/qlge_ethtool.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c
index 4f26afe..05b8bde 100644
--- a/drivers/net/qlge/qlge_ethtool.c
+++ b/drivers/net/qlge/qlge_ethtool.c
@@ -503,7 +503,8 @@ static int ql_run_loopback_test(struct ql_adapter *qdev)
 			return -EPIPE;
 		atomic_inc(&qdev->lb_count);
 	}
-
+	/* Give queue time to settle before testing results. */
+	msleep(2);
 	ql_clean_lb_rx_ring(&qdev->rx_ring[0], 128);
 	return atomic_read(&qdev->lb_count) ? -EIO : 0;
 }
@@ -536,6 +537,10 @@ static void ql_self_test(struct net_device *ndev,
 			data[0] = 0;
 		}
 		clear_bit(QL_SELFTEST, &qdev->flags);
+		/* Give link time to come up after
+		 * port configuration changes.
+		 */
+		msleep_interruptible(4 * 1000);
 	} else {
 		netif_err(qdev, drv, qdev->ndev,
 			  "is down, Loopback test will fail.\n");
-- 
1.6.0.2


  parent reply	other threads:[~2010-02-17 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 16:41 [net-next PATCH 0/3] qlge: minor fixes Ron Mercer
2010-02-17 16:41 ` [net-next PATCH 1/3] qlge: Fix dropping of large non-TCP/UDP frames Ron Mercer
2010-02-17 16:41 ` [net-next PATCH 2/3] qlge: Fix bonding mac address bug Ron Mercer
2010-02-17 16:41 ` Ron Mercer [this message]
2010-02-17 21:42 ` [net-next PATCH 0/3] qlge: minor fixes 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=1266424883-25927-4-git-send-email-ron.mercer@qlogic.com \
    --to=ron.mercer@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).