driver: net: fsl-mc: Update print to reflect correct string
[oweals/u-boot.git] / drivers / net / e1000.c
index 508ebfb55bd072d0793e7dffbc2b4267f53a5645..70fc02ee5ca6bb9bb28abf9361eb359398e6089e 100644 (file)
@@ -5096,11 +5096,11 @@ _e1000_poll(struct e1000_hw *hw)
        inval_end = inval_start + roundup(sizeof(*rd), ARCH_DMA_MINALIGN);
        invalidate_dcache_range(inval_start, inval_end);
 
-       if (!(le32_to_cpu(rd->status)) & E1000_RXD_STAT_DD)
+       if (!(rd->status & E1000_RXD_STAT_DD))
                return 0;
        /* DEBUGOUT("recv: packet len=%d\n", rd->length); */
        /* Packet received, make sure the data are re-loaded from RAM. */
-       len = le32_to_cpu(rd->length);
+       len = le16_to_cpu(rd->length);
        invalidate_dcache_range((unsigned long)packet,
                                (unsigned long)packet +
                                roundup(len, ARCH_DMA_MINALIGN));
@@ -5286,7 +5286,6 @@ static int e1000_init_one(struct e1000_hw *hw, int cardnum, pci_dev_t devno,
 
 #ifndef CONFIG_E1000_NO_NVM
        /* Validate the EEPROM and get chipset information */
-#if !defined(CONFIG_MVBC_1G)
        if (e1000_init_eeprom_params(hw)) {
                E1000_ERR(hw, "EEPROM is invalid!\n");
                return -EINVAL;
@@ -5294,7 +5293,6 @@ static int e1000_init_one(struct e1000_hw *hw, int cardnum, pci_dev_t devno,
        if ((E1000_READ_REG(hw, I210_EECD) & E1000_EECD_FLUPD) &&
            e1000_validate_eeprom_checksum(hw))
                return -ENXIO;
-#endif
        e1000_read_mac_addr(hw, enetaddr);
 #endif
        e1000_get_bus_type(hw);
@@ -5555,8 +5553,8 @@ static int e1000_eth_probe(struct udevice *dev)
        int ret;
 
        hw->name = dev->name;
-       ret = e1000_init_one(hw, trailing_strtol(dev->name), pci_get_bdf(dev),
-                            plat->enetaddr);
+       ret = e1000_init_one(hw, trailing_strtol(dev->name),
+                            dm_pci_get_bdf(dev), plat->enetaddr);
        if (ret < 0) {
                printf(pr_fmt("failed to initialize card: %d\n"), ret);
                return ret;