From: Nate Klein <nxk@google.com>
To: netdev@vger.kernel.org
Cc: eilong@broadcom.com, nxk@google.com, linux-kernel@vger.kernel.org
Subject: [PATCH] net-bnx2x: Fix byte order problem on NVRAM writes
Date: Mon, 21 Oct 2013 14:57:01 -0700 [thread overview]
Message-ID: <1382392621-8998-1-git-send-email-nxk@google.com> (raw)
Tested:
ethtool -e eth0 raw on >first.nvram
ethtool -E eth0 <first.nvram
ethtool -e eth0 raw on >second.nvram
cmp first.nvram second.nvram || ethtool -E eth0 <second.nvram
(No output means pass.)
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index 8213cc8..35671fb 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -1549,7 +1549,7 @@ static int bnx2x_nvram_write_dword(struct bnx2x *bp, u32 offset, u32 val,
REG_WR(bp, MCP_REG_MCPR_NVM_COMMAND, MCPR_NVM_COMMAND_DONE);
/* write the data */
- REG_WR(bp, MCP_REG_MCPR_NVM_WRITE, val);
+ REG_WR(bp, MCP_REG_MCPR_NVM_WRITE, cpu_to_be32(val));
/* address of the NVRAM to write to */
REG_WR(bp, MCP_REG_MCPR_NVM_ADDR,
--
1.8.4
next reply other threads:[~2013-10-21 21:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 21:57 Nate Klein [this message]
2013-10-22 13:30 ` [PATCH] net-bnx2x: Fix byte order problem on NVRAM writes Yuval Mintz
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=1382392621-8998-1-git-send-email-nxk@google.com \
--to=nxk@google.com \
--cc=eilong@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--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).