--- u-boot/common/miiphyutil.c 2005-06-24 14:02:18.457551500 -0500 +++ u-boot/common/miiphyutil.c 2005-06-24 14:03:17.000000000 -0500 @@ -29,6 +29,14 @@ #include #include +/* undefine functions that may have been renamed for a specific board */ +#ifdef miiphy_speed +#undef miiphy_speed +#endif +#ifdef miiphy_duplex +#undef miiphy_duplex +#endif + #if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) /***************************************************************************** @@ -93,7 +101,13 @@ int miiphy_reset (unsigned char addr) unsigned short reg; int loop_cnt; - if (miiphy_write (addr, PHY_BMCR, 0x8000) != 0) { + if (miiphy_read (addr, PHY_BMCR, ®) != 0) { +#ifdef DEBUG + printf ("PHY status read failed\n"); +#endif + return (-1); + } + if (miiphy_write (addr, PHY_BMCR, reg | 0x8000) != 0) { #ifdef DEBUG puts ("PHY reset failed\n"); #endif