lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 21 Oct 2013 14:57:01 -0700
From:	Nate Klein <nxk@...gle.com>
To:	netdev@...r.kernel.org
Cc:	eilong@...adcom.com, nxk@...gle.com, linux-kernel@...r.kernel.org
Subject: [PATCH] net-bnx2x: Fix byte order problem on NVRAM writes

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ