out2: if (ei_status.reg0) iounmap((void *)dev->mem_start); 
static int __init ac_probe1(int ioaddr, struct net_device *dev){	int i, retval;	if (!request_region(ioaddr, AC_IO_EXTENT, DRV_NAME))		return -EBUSY;	if (inb_p(ioaddr + AC_ID_PORT) == 0xff) {		retval = -ENODEV;		goto out;	}	if (inl(ioaddr + AC_ID_PORT) != AC_EISA_ID) {		retval = -ENODEV;		goto out;	}#ifndef final_version	printk(KERN_DEBUG "AC3200 ethercard configuration register is %#02x,"		   " EISA ID %02x %02x %02x %02x.\n", inb(ioaddr + AC_CONFIG),		   inb(ioaddr + AC_ID_PORT + 0), inb(ioaddr + AC_ID_PORT + 1),		   inb(ioaddr + AC_ID_PORT + 2), inb(ioaddr + AC_ID_PORT + 3));#endif	printk("AC3200 in EISA slot %d, node", ioaddr/0x1000);	for(i = 0; i < 6; i++)		printk(" %02x", dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i));#if 0	/* Check the vendor ID/prefix. Redundant after checking the EISA ID */	if (inb(ioaddr + AC_SA_PROM + 0) != AC_ADDR0		|| inb(ioaddr + AC_SA_PROM + 1) != AC_ADDR1		|| inb(ioaddr + AC_SA_PROM + 2) != AC_ADDR2 ) {		printk(", not found (invalid prefix).\n");		retval = -ENODEV;		goto out;	}#endif	/* Assign and allocate the interrupt now. */	if (dev->irq == 0) {		dev->irq = config2irq(inb(ioaddr + AC_CONFIG));		printk(", using");	} else {		dev->irq = irq_canonicalize(dev->irq);		printk(", assigning");	}	retval = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev);	if (retval) {		printk (" nothing! Unable to get IRQ %d.\n", dev->irq);		goto out1;	}	printk(" IRQ %d, %s port\n", dev->irq, port_name[dev->if_port]);	dev->base_addr = ioaddr;#ifdef notyet	if (dev->mem_start)	{		/* Override the value from the board. */		for (i = 0; i < 7; i++)			if (addrmap[i] == dev->mem_start)				break;		if (i >= 7)			i = 0;		outb((inb(ioaddr + AC_CONFIG) & ~7) | i, ioaddr + AC_CONFIG);	}#endif	dev->if_port = inb(ioaddr + AC_CONFIG) >> 6;	dev->mem_start = config2mem(inb(ioaddr + AC_CONFIG));	printk("%s: AC3200 at %#3x with %dkB memory at physical address %#lx.\n", 			dev->name, ioaddr, AC_STOP_PG/4, dev->mem_start);	/*	 *  BEWARE!! Some dain-bramaged EISA SCUs will allow you to put	 *  the card mem within the region covered by `normal' RAM  !!!	 *	 *  ioremap() will fail in that case.	 */	ei_status.mem = ioremap(dev->mem_start, AC_STOP_PG*0x100);	if (!ei_status.mem) {		printk(KERN_ERR "ac3200.c: Unable to remap card memory above 1MB !!\n");		printk(KERN_ERR "ac3200.c: Try using EISA SCU to set memory below 1MB.\n");		printk(KERN_ERR "ac3200.c: Driver NOT installed.\n");		retval = -EINVAL;		goto out1;	}	printk("ac3200.c: remapped %dkB card memory to virtual address %p\n",			AC_STOP_PG/4, ei_status.mem);	dev->mem_start = (unsigned long)ei_status.mem;	dev->mem_end = dev->mem_start + (AC_STOP_PG - AC_START_PG)*256;	ei_status.name = "AC3200";	ei_status.tx_start_page = AC_START_PG;	ei_status.rx_start_page = AC_START_PG + TX_PAGES;	ei_status.stop_page = AC_STOP_PG;	ei_status.word16 = 1;	if (ei_debug > 0)		printk(version);	ei_status.reset_8390 = &ac_reset_8390;	ei_status.block_input = &ac_block_input;	ei_status.block_output = &ac_block_output;	ei_status.get_8390_hdr = &ac_get_8390_hdr;	dev->open = &ac_open;	dev->stop = &ac_close_card;#ifdef CONFIG_NET_POLL_CONTROLLER	dev->poll_controller = ei_poll;#endif	NS8390_init(dev, 0);	return 0;out1:	free_irq(dev->irq, dev);out:	release_region(ioaddr, AC_IO_EXTENT);	return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b1fc5505e0dbcc3fd7c75bfe6bee39ec50080963/ac3200.c/clean/drivers/net/ac3200.c