/* Enable the MII link status autopoll feature on the Velocity hardware. Wait for it to enable.  */
static void enable_mii_autopoll(struct mac_regs __iomem *regs)
/* Enable the MII link status autopoll feature on the Velocity hardware. Wait for it to enable.  */
static void enable_mii_autopoll(struct mac_regs __iomem *regs)
{
	int ii;
	writeb(0, &(regs->MIICR));
	writeb(MIIADR_SWMPL, &regs->MIIADR);
	for (ii = 0; ii < W_MAX_TIMEOUT; ii++) {
		udelay(1);
		if (BYTE_REG_BITS_IS_ON(MIISR_MIDLE, &regs->MIISR))
			break;
	}
	writeb(MIICR_MAUTO, &regs->MIICR);
	for (ii = 0; ii < W_MAX_TIMEOUT; ii++) {
		udelay(1);
		if (!BYTE_REG_BITS_IS_ON(MIISR_MIDLE, &regs->MIISR))
			break;
	}
}