mvmfp: add MFP configuration support for PANTHEON
[oweals/u-boot.git] / drivers / net / eepro100.c
index 22e14e3814deeadf854b0b09d4494d4038c5b360..86709a7f0ad8173902cc5756a5f9b95854eb816f 100644 (file)
@@ -335,7 +335,7 @@ static struct eth_device* verify_phyaddr (const char *devname,
        }
 
        /* read id2 register */
-       if (get_phyreg(dev, addr, PHY_PHYIDR2, &value) != 0) {
+       if (get_phyreg(dev, addr, MII_PHYSID2, &value) != 0) {
                printf("%s: mii read timeout!\n", devname);
                return NULL;
        }
@@ -450,6 +450,11 @@ int eepro100_initialize (bd_t * bis)
                }
 
                dev = (struct eth_device *) malloc (sizeof *dev);
+               if (!dev) {
+                       printf("eepro100: Can not allocate memory\n");
+                       break;
+               }
+               memset(dev, 0, sizeof(*dev));
 
                sprintf (dev->name, "i82559#%d", card_number);
                dev->priv = (void *) devno; /* this have to come before bus_to_phys() */