kernels/linux-2.4.0/drivers/acorn/net/etherh.c
/*
 * Open/initialize the board.  This is called (in the current kernel)
 * sometime after booting when the 'ifconfig' program is run.
 *
 * This routine should set everything up anew at each open, even
 * registers that "should" only need to be set once at boot, so that
 * there is non-reboot way to recover if something goes wrong.
 */
Open/initialize the board.  This is called (in the current kernel)
sometime after booting when the 'ifconfig' program is run.

This routine should set everything up anew at each open, even
registers that "should" only need to be set once at boot, so that
there is non-reboot way to recover if something goes wrong.
Open / initialize the board . This is called ( in the current kernel ) sometime after booting when the ' ifconfig ' program is run . This routine should set everything up anew at each open even registers that " should " only need to be set once at boot so that there is non - reboot way to recover if something goes wrong .
static int
etherh_open(struct net_device *dev)
{
	MOD_INC_USE_COUNT;
	if (request_irq(dev->irq, ei_interrupt, 0, "etherh", dev)) {
		MOD_DEC_USE_COUNT;
		return -EAGAIN;
	}
	ei_status.interface_num = 0;
	if (dev->flags & IFF_AUTOMEDIA) {
		dev->if_port = IF_PORT_10BASET;
		etherh_setif(dev);
		mdelay(1);
		if (!etherh_getifstat(dev)) {
			dev->if_port = IF_PORT_10BASE2;
			etherh_setif(dev);
		}
	} else
		etherh_setif(dev);
	etherh_reset(dev);
	ei_open(dev);
	return 0;
}
static int etherh_open ( struct net_device * dev ) { MOD_INC_USE_COUNT ; if ( request_irq ( dev -> irq , ei_interrupt , 0 , " " , dev ) ) { MOD_DEC_USE_COUNT ; return - EAGAIN ; } ei_status . interface_num = 0 ; if ( dev -> flags & IFF_AUTOMEDIA ) { dev -> if_port = IF_PORT_10BASET ; etherh_setif ( dev ) ; mdelay ( 1 ) ; if ( ! etherh_getifstat ( dev ) ) { dev -> if_port = IF_PORT_10BASE2 ; etherh_setif ( dev ) ; } } else etherh_setif ( dev ) ; etherh_reset ( dev ) ; ei_open ( dev ) ; return 0 ; }
Open/initialize the board.
Open / initialize the board .
/*
	 * Make sure that we aren't going to change the
	 * media type on the next reset - we are about to
	 * do automedia manually now.
	 */ /*
	 * If we are doing automedia detection, do it now.
	 * This is more reliable than the 8390's detection.
	 */