diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2013-04-30 10:24:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-30 19:00:25 -0400 |
commit | 97cd1ee6ef24eadf42bb199ab20bdc07cf919939 (patch) | |
tree | 018f19745943cca27c18a6e0fd1847a39ec8ed3f | |
parent | 91bc033c4d01656e3d8e45a13fd58924a3099693 (diff) | |
download | linux-97cd1ee6ef24eadf42bb199ab20bdc07cf919939.tar.bz2 |
Revert "bnx2x: allow nvram test to run when device is down"
This reverts commit d2d2d87dfd1a25ee270994c5b9e3eb4690428d32
("bnx2x: allow nvram test to run when device is down").
Since it makes access to the device in D3 state possible.
More work is required to make sure device is not set to D3
during ifdown. Until this is done the nvram-test should simply
exit if device is down like it did before.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 397537bb4448..ce1a91618677 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c @@ -2867,16 +2867,9 @@ 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, "Interface is down\n"); + DP(BNX2X_MSG_ETHTOOL, + "Can't perform self-test when interface is down\n"); return; } @@ -2938,7 +2931,13 @@ 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; |