Commit 68bf5a10 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller

bnx2x: add Big-Endian ethtool comment

There's a known issue that using `ethtool -e' flips the endianity of the
written data, i.e., using `ethtool -E' to dump eeprom image and than using
`ethtool -e' to re-write that same image will result in an image where
the data has the opposite endianity.
Sadly, this cannot be fixed as there are already various tools deployed
based on the endianity of the eeprom read/write.
Instead, a comment is added to the code to help explain why this is un-fixable.
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33d8e6a5
...@@ -1639,6 +1639,12 @@ static int bnx2x_nvram_write(struct bnx2x *bp, u32 offset, u8 *data_buf, ...@@ -1639,6 +1639,12 @@ static int bnx2x_nvram_write(struct bnx2x *bp, u32 offset, u8 *data_buf,
memcpy(&val, data_buf, 4); memcpy(&val, data_buf, 4);
/* Notice unlike bnx2x_nvram_read_dword() this will not
* change val using be32_to_cpu(), which causes data to flip
* if the eeprom is read and then written back. This is due
* to tools utilizing this functionality that would break
* if this would be resolved.
*/
rc = bnx2x_nvram_write_dword(bp, offset, val, cmd_flags); rc = bnx2x_nvram_write_dword(bp, offset, val, cmd_flags);
/* advance to the next dword */ /* advance to the next dword */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment