/* Read value stored in a PHY register. Note: MDI interface is assumed to already have been enabled.  */
static void read_phy(unsigned char phy_addr, unsigned char address, unsigned int *value)
/* Read value stored in a PHY register. Note: MDI interface is assumed to already have been enabled.  */
static void read_phy(unsigned char phy_addr, unsigned char address, unsigned int *value)
{
    unsigned short mii_rxdata;
    sep_emac_write(MAC_MII_ADDRESS,(unsigned long)(address<<8) | phy_addr);
    sep_emac_write(MAC_MII_CMD ,0x2);
    udelay(40);
    sep_phy_wait();
    mii_rxdata = sep_emac_read(MAC_MII_RXDATA);
    *value =  mii_rxdata;
    return;
}