From: "Dmitry Kravkov" <dmitry@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: eilong@broadcom.com, "Dmitry Kravkov" <dmitry@broadcom.com>
Subject: [PATCH net-next 3/4] bnx2x: allow nvram test to run when device is down
Date: Sat, 13 Apr 2013 11:56:50 +0300 [thread overview]
Message-ID: <1365843411-27103-4-git-send-email-dmitry@broadcom.com> (raw)
In-Reply-To: <1365843411-27103-1-git-send-email-dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
.../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index b32a7f0..527fe4d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -2814,9 +2814,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;
}
@@ -2878,13 +2885,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;
--
1.7.7.2
next prev parent reply other threads:[~2013-04-13 8:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 8:56 [PATCH net-next 0/4] bnx2x: refactor nvram related code and update version Dmitry Kravkov
2013-04-13 8:56 ` [PATCH net-next 1/4] bnx2x: refactor nvram read procedure Dmitry Kravkov
2013-04-13 11:09 ` Francois Romieu
2013-04-15 7:14 ` Dmitry Kravkov
2013-04-15 23:31 ` Francois Romieu
2013-04-17 20:19 ` Dmitry Kravkov
2013-04-13 8:56 ` [PATCH net-next 2/4] bnx2x: add additional regions for CRC memory test Dmitry Kravkov
2013-04-13 8:56 ` Dmitry Kravkov [this message]
2013-04-13 8:56 ` [PATCH net-next 4/4] bnx2x: update version to 1.78.17-0 Dmitry Kravkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365843411-27103-4-git-send-email-dmitry@broadcom.com \
--to=dmitry@broadcom.com \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).