corkscrew_setup(dev, ioaddr, idev, cards_found++); 
static struct net_device *corkscrew_scan(int unit){	struct net_device *dev;	static int cards_found = 0;	static int ioaddr;	int err;#ifdef __ISAPNP__	short i;	static int pnp_cards;#endif	dev = alloc_etherdev(sizeof(struct corkscrew_private));	if (!dev)		return ERR_PTR(-ENOMEM);	if (unit >= 0) {		sprintf(dev->name, "eth%d", unit);		netdev_boot_setup_check(dev);	}	SET_MODULE_OWNER(dev);#ifdef __ISAPNP__	if(nopnp == 1)		goto no_pnp;	for(i=0; corkscrew_isapnp_adapters[i].vendor != 0; i++) {		struct pnp_dev *idev = NULL;		int irq;		while((idev = pnp_find_dev(NULL,					   corkscrew_isapnp_adapters[i].vendor,					   corkscrew_isapnp_adapters[i].function,					   idev))) {			if (pnp_device_attach(idev) < 0)				continue;			if (pnp_activate_dev(idev) < 0) {				printk("pnp activate failed (out of resources?)\n");				pnp_device_detach(idev);				continue;			}			if (!pnp_port_valid(idev, 0) || !pnp_irq_valid(idev, 0)) {				pnp_device_detach(idev);				continue;			}			ioaddr = pnp_port_start(idev, 0);			irq = pnp_irq(idev, 0);			if (!check_device(ioaddr)) {				pnp_device_detach(idev);				continue;			}			if(corkscrew_debug)				printk ("ISAPNP reports %s at i/o 0x%x, irq %d\n",					(char*) corkscrew_isapnp_adapters[i].driver_data, ioaddr, irq);			printk(KERN_INFO "3c515 Resource configuration register %#4.4x, DCR %4.4x.\n",		     		inl(ioaddr + 0x2002), inw(ioaddr + 0x2000));			/* irq = inw(ioaddr + 0x2002) & 15; */ /* Use the irq from isapnp */			corkscrew_setup(dev, ioaddr, idev, cards_found++);			SET_NETDEV_DEV(dev, &idev->dev);			pnp_cards++;			err = register_netdev(dev);			if (!err)				return dev;			cleanup_card(dev);		}	}no_pnp:#endif /* __ISAPNP__ */	/* Check all locations on the ISA bus -- evil! */	for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x20) {		if (!check_device(ioaddr))			continue;		printk(KERN_INFO "3c515 Resource configuration register %#4.4x, DCR %4.4x.\n",		     inl(ioaddr + 0x2002), inw(ioaddr + 0x2000));		corkscrew_setup(dev, ioaddr, NULL, cards_found++);		err = register_netdev(dev);		if (!err)			return dev;		cleanup_card(dev);	}	free_netdev(dev);	return NULL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b1fc5505e0dbcc3fd7c75bfe6bee39ec50080963/3c515.c/clean/drivers/net/3c515.c