diff options
author | Sony Chacko <sony.chacko@qlogic.com> | 2010-08-16 20:34:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-17 06:59:48 -0400 |
commit | 8dec32cc421864702912c4341934fe0c737a9798 (patch) | |
tree | dbf48881cd59c393f735bd5cdb4cf23365f346be | |
parent | 69324275de07584fbd0e77a517f9b43e82eaf9d6 (diff) |
qlcnic: fix link diag test
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ethtool.c | 17 | ||||
-rw-r--r-- | 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 9328d59e21e0..3d4655dce4b5 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, | |||
747 | { | 747 | { |
748 | memset(data, 0, sizeof(u64) * QLCNIC_TEST_LEN); | 748 | memset(data, 0, sizeof(u64) * QLCNIC_TEST_LEN); |
749 | 749 | ||
750 | data[0] = qlcnic_reg_test(dev); | ||
751 | if (data[0]) | ||
752 | eth_test->flags |= ETH_TEST_FL_FAILED; | ||
753 | |||
754 | data[1] = (u64) qlcnic_test_link(dev); | ||
755 | if (data[1]) | ||
756 | eth_test->flags |= ETH_TEST_FL_FAILED; | ||
757 | |||
750 | if (eth_test->flags == ETH_TEST_FL_OFFLINE) { | 758 | if (eth_test->flags == ETH_TEST_FL_OFFLINE) { |
751 | data[2] = qlcnic_irq_test(dev); | 759 | data[2] = qlcnic_irq_test(dev); |
752 | if (data[2]) | 760 | if (data[2]) |
@@ -757,15 +765,6 @@ qlcnic_diag_test(struct net_device *dev, struct ethtool_test *eth_test, | |||
757 | eth_test->flags |= ETH_TEST_FL_FAILED; | 765 | eth_test->flags |= ETH_TEST_FL_FAILED; |
758 | 766 | ||
759 | } | 767 | } |
760 | |||
761 | data[0] = qlcnic_reg_test(dev); | ||
762 | if (data[0]) | ||
763 | eth_test->flags |= ETH_TEST_FL_FAILED; | ||
764 | |||
765 | /* link test */ | ||
766 | data[1] = (u64) qlcnic_test_link(dev); | ||
767 | if (data[1]) | ||
768 | eth_test->flags |= ETH_TEST_FL_FAILED; | ||
769 | } | 768 | } |
770 | 769 | ||
771 | static void | 770 | static void |
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c index e08c8b0556a4..9d40ce05cb17 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) | |||
1245 | mode = VPORT_MISS_MODE_ACCEPT_MULTI; | 1245 | mode = VPORT_MISS_MODE_ACCEPT_MULTI; |
1246 | 1246 | ||
1247 | qlcnic_nic_set_promisc(adapter, mode); | 1247 | qlcnic_nic_set_promisc(adapter, mode); |
1248 | msleep(1000); | ||
1248 | } | 1249 | } |