Commit d2d2d87d authored by Dmitry Kravkov's avatar Dmitry Kravkov Committed by David S. Miller
Browse files

bnx2x: allow nvram test to run when device is down


Signed-off-by: default avatarDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent edb944d2
...@@ -2864,9 +2864,16 @@ static void bnx2x_self_test(struct net_device *dev, ...@@ -2864,9 +2864,16 @@ static void bnx2x_self_test(struct net_device *dev,
memset(buf, 0, sizeof(u64) * BNX2X_NUM_TESTS(bp)); memset(buf, 0, sizeof(u64) * BNX2X_NUM_TESTS(bp));
if (bnx2x_test_nvram(bp) != 0) {
if (!IS_MF(bp))
buf[4] = 1;
else
buf[0] = 1;
etest->flags |= ETH_TEST_FL_FAILED;
}
if (!netif_running(dev)) { if (!netif_running(dev)) {
DP(BNX2X_MSG_ETHTOOL, DP(BNX2X_MSG_ETHTOOL, "Interface is down\n");
"Can't perform self-test when interface is down\n");
return; return;
} }
...@@ -2928,13 +2935,7 @@ static void bnx2x_self_test(struct net_device *dev, ...@@ -2928,13 +2935,7 @@ static void bnx2x_self_test(struct net_device *dev,
/* wait until link state is restored */ /* wait until link state is restored */
bnx2x_wait_for_link(bp, link_up, is_serdes); bnx2x_wait_for_link(bp, link_up, is_serdes);
} }
if (bnx2x_test_nvram(bp) != 0) {
if (!IS_MF(bp))
buf[4] = 1;
else
buf[0] = 1;
etest->flags |= ETH_TEST_FL_FAILED;
}
if (bnx2x_test_intr(bp) != 0) { if (bnx2x_test_intr(bp) != 0) {
if (!IS_MF(bp)) if (!IS_MF(bp))
buf[5] = 1; buf[5] = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment