Skip to content

Commit

Permalink
qlcnic: Fix external loopback test.
Browse files Browse the repository at this point in the history
Driver was not handling external loopback diagnostic
test request.

Signed-off-by: Shahed Shaikh <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Shahed Shaikh authored and davem330 committed Aug 3, 2013
1 parent 01b91f4 commit 2e3ea7e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ static const char qlcnic_gstrings_test[][ETH_GSTRING_LEN] = {
"Link_Test_on_offline",
"Interrupt_Test_offline",
"Internal_Loopback_offline",
"External_Loopback_offline",
"EEPROM_Test_offline"
};

Expand Down Expand Up @@ -1026,8 +1027,15 @@ qlcnic_diag_test(struct net_device *dev, struct ethtool_test *eth_test,
if (data[3])
eth_test->flags |= ETH_TEST_FL_FAILED;

data[4] = qlcnic_eeprom_test(dev);
if (data[4])
if (eth_test->flags & ETH_TEST_FL_EXTERNAL_LB) {
data[4] = qlcnic_loopback_test(dev, QLCNIC_ELB_MODE);
if (data[4])
eth_test->flags |= ETH_TEST_FL_FAILED;
eth_test->flags |= ETH_TEST_FL_EXTERNAL_LB_DONE;
}

data[5] = qlcnic_eeprom_test(dev);
if (data[5])
eth_test->flags |= ETH_TEST_FL_FAILED;
}
}
Expand Down

0 comments on commit 2e3ea7e

Please sign in to comment.