be2net: Avoid diagnostic test in certain versions of firmware to avoid NIC freeze.
authorSuresh Reddy <suresh.reddy@emulex.com>
Thu, 25 Apr 2013 23:03:22 +0000 (23:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Apr 2013 03:24:11 +0000 (23:24 -0400)
Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com>
Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_ethtool.c

index c4662db825b0fc9c7d30860374f5447627fe36c2..ec3050b3133e3946ea3d9062d8fdb611a4b13e79 100644 (file)
@@ -755,6 +755,12 @@ be_self_test(struct net_device *netdev, struct ethtool_test *test, u64 *data)
        int status;
        u8 link_status = 0;
 
+       if (adapter->function_caps & BE_FUNCTION_CAPS_SUPER_NIC) {
+               dev_err(&adapter->pdev->dev, "Self test not supported\n");
+               test->flags |= ETH_TEST_FL_FAILED;
+               return;
+       }
+
        memset(data, 0, sizeof(u64) * ETHTOOL_TESTS_NUM);
 
        if (test->flags & ETH_TEST_FL_OFFLINE) {