Commit 2e3ea7e763f2ce33bbede1cd5cb8d4cd60f3e11a

Authored by Shahed Shaikh
Committed by David S. Miller
1 parent 01b91f4c31

qlcnic: Fix external loopback test.

Driver was not handling external loopback diagnostic
test request.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 10 additions and 2 deletions Side-by-side Diff

drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
... ... @@ -150,6 +150,7 @@
150 150 "Link_Test_on_offline",
151 151 "Interrupt_Test_offline",
152 152 "Internal_Loopback_offline",
  153 + "External_Loopback_offline",
153 154 "EEPROM_Test_offline"
154 155 };
155 156  
... ... @@ -1026,8 +1027,15 @@
1026 1027 if (data[3])
1027 1028 eth_test->flags |= ETH_TEST_FL_FAILED;
1028 1029  
1029   - data[4] = qlcnic_eeprom_test(dev);
1030   - if (data[4])
  1030 + if (eth_test->flags & ETH_TEST_FL_EXTERNAL_LB) {
  1031 + data[4] = qlcnic_loopback_test(dev, QLCNIC_ELB_MODE);
  1032 + if (data[4])
  1033 + eth_test->flags |= ETH_TEST_FL_FAILED;
  1034 + eth_test->flags |= ETH_TEST_FL_EXTERNAL_LB_DONE;
  1035 + }
  1036 +
  1037 + data[5] = qlcnic_eeprom_test(dev);
  1038 + if (data[5])
1031 1039 eth_test->flags |= ETH_TEST_FL_FAILED;
1032 1040 }
1033 1041 }