tg3: Fix io failures after chip reset
[firefly-linux-kernel-4.4.55.git] / drivers / net / dl2k.c
index c445457b66d53df856564a2d88895680249f49bf..23179dbcedd260ccd6b401f21c859bbdeb753675 100644 (file)
@@ -346,7 +346,7 @@ parse_eeprom (struct net_device *dev)
        if (np->pdev->vendor == PCI_VENDOR_ID_DLINK) {  /* D-Link Only */
                /* Check CRC */
                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",
                                        dev->name);
                        return -1;