Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

Revert "bnx2x: allow nvram test to run when device is down"



This reverts commit d2d2d87d
("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: 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 91bc033c
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -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;