kernels/linux-2.4.0/drivers/net/sis900.c
/**
 *	sis900_open: - open sis900 device
 *	@net_dev: the net device to open
 *
 *	Do some initialization and start net interface.
 *	enable interrupts and set sis900 timer.
 */
- open sis900 device
@net_dev: the net device to open

Do some initialization and start net interface.
enable interrupts and set sis900 timer.
- open sis900 device @net_dev : the net device to open Do some initialization and start net interface . enable interrupts and set sis900 timer .
static int
sis900_open(struct net_device *net_dev)
{
	struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv;
	long ioaddr = net_dev->base_addr;
	u8  revision;
	MOD_INC_USE_COUNT;
	sis900_reset(net_dev);
	pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
	if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV ||
	    revision == SIS630A_900_REV)
		sis630_set_eq(net_dev,revision);
	if (request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, net_dev->name, net_dev)) {
		MOD_DEC_USE_COUNT;
		return -EAGAIN;
	}
	sis900_init_rxfilter(net_dev);
	sis900_init_tx_ring(net_dev);
	sis900_init_rx_ring(net_dev);
	set_rx_mode(net_dev);
	netif_start_queue(net_dev);
	outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr);
	outl(RxENA, ioaddr + cr);
	outl(IE, ioaddr + ier);
	sis900_check_mode(net_dev, sis_priv->mii);
	init_timer(&sis_priv->timer);
	sis_priv->timer.expires = jiffies + HZ;
	sis_priv->timer.data = (unsigned long)net_dev;
	sis_priv->timer.function = &sis900_timer;
	add_timer(&sis_priv->timer);
	return 0;
}
static int sis900_open ( struct net_device * net_dev ) { struct sis900_private * sis_priv = ( struct sis900_private * ) net_dev -> priv ; long ioaddr = net_dev -> base_addr ; u8 revision ; MOD_INC_USE_COUNT ; sis900_reset ( net_dev ) ; pci_read_config_byte ( sis_priv -> pci_dev , PCI_CLASS_REVISION , & revision ) ; if ( revision == SIS630E_900_REV || revision == SIS630EA1_900_REV || revision == SIS630A_900_REV ) sis630_set_eq ( net_dev , revision ) ; if ( request_irq ( net_dev -> irq , & sis900_interrupt , SA_SHIRQ , net_dev -> name , net_dev ) ) { MOD_DEC_USE_COUNT ; return - EAGAIN ; } sis900_init_rxfilter ( net_dev ) ; sis900_init_tx_ring ( net_dev ) ; sis900_init_rx_ring ( net_dev ) ; set_rx_mode ( net_dev ) ; netif_start_queue ( net_dev ) ; outl ( ( RxSOVR | RxORN | RxERR | RxOK | TxURN | TxERR | TxIDLE ) , ioaddr + imr ) ; outl ( RxENA , ioaddr + cr ) ; outl ( IE , ioaddr + ier ) ; sis900_check_mode ( net_dev , sis_priv -> mii ) ; init_timer ( & sis_priv -> timer ) ; sis_priv -> timer . expires = jiffies + HZ ; sis_priv -> timer . data = ( unsigned long ) net_dev ; sis_priv -> timer . function = & sis900_timer ; add_timer ( & sis_priv -> timer ) ; return 0 ; }
sis900_open: - open sis900 device
      @net_dev: the net device to open
sis900_open : - open sis900 device @net_dev : the net device to open
/* Soft reset the chip. */ /* Equalizer workaround Rule */ /* Enable all known interrupts by setting the interrupt mask. */ /* Set the timer to switch to check for link beat and perhaps switch
	   to an alternate media type. */