StringBuffer sb = new StringBuffer();
    final int mdioWrite(int phy_id, int location, int value) {        int val, boguscnt = 7; /* <64 usec. to complete, typ 27 ticks */        regs.setReg32(SCBCtrlMDI, 0x04000000 | (location << 16) | (phy_id << 21) | value);        do {            systemDelay(10);            val = regs.getReg32(SCBCtrlMDI);            if (--boguscnt < 0) {                StringBuffer sb = new StringBuffer();                log.debug("eepro100: mdioWrite() timed out with val =" + Integer.toHexString(val));                break;            }        } while ((val & 0x10000000) == 0);        return val & 0xffff;    }