kernels/linux-2.4.0/drivers/net/sundance.c
/* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. */
Read the EEPROM and MII Management Data I/O (MDIO) interfaces.
Read the EEPROM and MII Management Data I / O ( MDIO ) interfaces .
static int eeprom_read(long ioaddr, int location)
{
	int boguscnt = 1000;		
	writew(0x0200 | (location & 0xff), ioaddr + EECtrl);
	do {
		if (! (readw(ioaddr + EECtrl) & 0x8000)) {
			return readw(ioaddr + EEData);
		}
	} while (--boguscnt > 0);
	return 0;
}
static int eeprom_read ( long ioaddr , int location ) { int boguscnt = 1000 ; writew ( 0x0200 | ( location & 0xff ) , ioaddr + EECtrl ) ; do { if ( ! ( readw ( ioaddr + EECtrl ) & 0x8000 ) ) { return readw ( ioaddr + EEData ) ; } } while ( -- boguscnt > 0 ) ; return 0 ; }
Read the EEPROM and MII Management Data I/O (MDIO) interfaces.
Read the EEPROM and MII Management Data I / O ( MDIO ) interfaces .
/* Typical 190 ticks. */