netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] Revert "bnx2x: allow nvram test to run when device is down"
@ 2013-04-30  9:34 Dmitry Kravkov
  2013-04-30 19:49 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Kravkov @ 2013-04-30  9:34 UTC (permalink / raw)
  To: davem, netdev; +Cc: Dmitry Kravkov, Eilon Greenstein

This reverts commit d2d2d87dfd1a25ee270994c5b9e3eb4690428d32.
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>
---
This will be done in another patch-series after the current merge window.
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 19 +++++++++----------
 1 file 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 397537b..ce1a916 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;
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] Revert "bnx2x: allow nvram test to run when device is down"
  2013-04-30  9:34 [PATCH net-next] Revert "bnx2x: allow nvram test to run when device is down" Dmitry Kravkov
@ 2013-04-30 19:49 ` David Miller
  2013-04-30 20:09   ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2013-04-30 19:49 UTC (permalink / raw)
  To: dmitry; +Cc: netdev, eilong

From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Tue, 30 Apr 2013 12:34:07 +0300

> This reverts commit d2d2d87dfd1a25ee270994c5b9e3eb4690428d32.

Please refer to commits in the following format:

${SHA_ID} ("Commit message header line.")

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] Revert "bnx2x: allow nvram test to run when device is down"
  2013-04-30 19:49 ` David Miller
@ 2013-04-30 20:09   ` Sergei Shtylyov
  2013-04-30 20:28     ` Dmitry Kravkov
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2013-04-30 20:09 UTC (permalink / raw)
  To: David Miller; +Cc: dmitry, netdev, eilong

Hello.

On 04/30/2013 11:49 PM, David Miller wrote:

>
>> This reverts commit d2d2d87dfd1a25ee270994c5b9e3eb4690428d32.
> Please refer to commits in the following format:
>
> ${SHA_ID} ("Commit message header line.")

    David, this is a standard revert changelog format, reverted commit's 
summary is in the subject.

WBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] Revert "bnx2x: allow nvram test to run when device is down"
  2013-04-30 20:09   ` Sergei Shtylyov
@ 2013-04-30 20:28     ` Dmitry Kravkov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Kravkov @ 2013-04-30 20:28 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: David Miller, Dmitry Kravkov, netdev, Eilon Greenstein

On Tue, Apr 30, 2013 at 11:09 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Hello.
>
>
> On 04/30/2013 11:49 PM, David Miller wrote:
>
>>
>>> This reverts commit d2d2d87dfd1a25ee270994c5b9e3eb4690428d32.
>>
>> Please refer to commits in the following format:
>>
>> ${SHA_ID} ("Commit message header line.")
>
>
>    David, this is a standard revert changelog format, reverted commit's
> summary is in the subject.
>
> WBR, Sergei
>

I think both of then the ID and the message will appear in the log once applied.
Probably we want to fix git-revert format. Anyway sent v2.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-30 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30  9:34 [PATCH net-next] Revert "bnx2x: allow nvram test to run when device is down" Dmitry Kravkov
2013-04-30 19:49 ` David Miller
2013-04-30 20:09   ` Sergei Shtylyov
2013-04-30 20:28     ` Dmitry Kravkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).