aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge_ethtool.c
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2010-02-17 01:41:23 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 16:35:38 -0500
commitaa13bd6ef4ddd81080f972220fae30eb28f65b17 (patch)
treed9e92fde0111bca92016538988edaddbf578f5be /drivers/net/qlge/qlge_ethtool.c
parent801e9096c566d40d2e7c9903dc902fa01a5a0b36 (diff)
qlge: Fix occasional loopback test failure.
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_ethtool.c')
-rw-r--r--drivers/net/qlge/qlge_ethtool.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c
index 4f26afeb0f38..05b8bde9980d 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)
503 return -EPIPE; 503 return -EPIPE;
504 atomic_inc(&qdev->lb_count); 504 atomic_inc(&qdev->lb_count);
505 } 505 }
506 506 /* Give queue time to settle before testing results. */
507 msleep(2);
507 ql_clean_lb_rx_ring(&qdev->rx_ring[0], 128); 508 ql_clean_lb_rx_ring(&qdev->rx_ring[0], 128);
508 return atomic_read(&qdev->lb_count) ? -EIO : 0; 509 return atomic_read(&qdev->lb_count) ? -EIO : 0;
509} 510}
@@ -536,6 +537,10 @@ static void ql_self_test(struct net_device *ndev,
536 data[0] = 0; 537 data[0] = 0;
537 } 538 }
538 clear_bit(QL_SELFTEST, &qdev->flags); 539 clear_bit(QL_SELFTEST, &qdev->flags);
540 /* Give link time to come up after
541 * port configuration changes.
542 */
543 msleep_interruptible(4 * 1000);
539 } else { 544 } else {
540 netif_err(qdev, drv, qdev->ndev, 545 netif_err(qdev, drv, qdev->ndev,
541 "is down, Loopback test will fail.\n"); 546 "is down, Loopback test will fail.\n");