mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f777737885
commit
06866bf5c5
1 changed files with 1 additions and 1 deletions
|
@ -346,7 +346,7 @@ parse_eeprom (struct net_device *dev)
|
||||||
if (np->pdev->vendor == PCI_VENDOR_ID_DLINK) { /* D-Link Only */
|
if (np->pdev->vendor == PCI_VENDOR_ID_DLINK) { /* D-Link Only */
|
||||||
/* Check CRC */
|
/* Check CRC */
|
||||||
crc = ~ether_crc_le (256 - 4, sromdata);
|
crc = ~ether_crc_le (256 - 4, sromdata);
|
||||||
if (psrom->crc != crc) {
|
if (psrom->crc != cpu_to_le32(crc)) {
|
||||||
printk (KERN_ERR "%s: EEPROM data CRC error.\n",
|
printk (KERN_ERR "%s: EEPROM data CRC error.\n",
|
||||||
dev->name);
|
dev->name);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue