net/e1000: Fix EEPROM access error
[platform/kernel/u-boot.git] / drivers / net / e1000.c
index 0eba57c..b092867 100644 (file)
@@ -1113,7 +1113,7 @@ e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask)
                        return -E1000_ERR_SWFW_SYNC;
 
                swfw_sync = E1000_READ_REG(hw, SW_FW_SYNC);
-               if ((swfw_sync & swmask) && !(swfw_sync & fwmask))
+               if (!(swfw_sync & (fwmask | swmask)))
                        break;
 
                /* firmware currently using resource (fwmask) */
@@ -5362,7 +5362,9 @@ e1000_initialize(bd_t * bis)
                hw->autoneg_failed = 0;
                hw->autoneg = 1;
                hw->get_link_status = true;
+#ifndef CONFIG_E1000_NO_NVM
                hw->eeprom_semaphore_present = true;
+#endif
                hw->hw_addr = pci_map_bar(devno,        PCI_BASE_ADDRESS_0,
                                                        PCI_REGION_MEM);
                hw->mac_type = e1000_undefined;