Commit bd8e012b authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

bnx2x: Test nvram when interface is down

Since commit 3fb43eb2 ("bnx2x: Change to D3hot only on removal") nvram
is accessible whenever the driver is loaded - Thus it is possible to
test it during self-test even if the interface is down
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aa661581
......@@ -2900,9 +2900,16 @@ static void bnx2x_self_test(struct net_device *dev,
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)) {
DP(BNX2X_MSG_ETHTOOL,
"Can't perform self-test when interface is down\n");
DP(BNX2X_MSG_ETHTOOL, "Interface is down\n");
return;
}
......@@ -2964,13 +2971,7 @@ static void bnx2x_self_test(struct net_device *dev,
/* wait until link state is restored */
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 (!IS_MF(bp))
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