return -ENOMEM; 
error = -ENOMEM; goto free_irq; 
static int __devinit eni_start(struct atm_dev *dev){	struct eni_dev *eni_dev;		void __iomem *buf;	unsigned long buffer_mem;	int error;	DPRINTK(">eni_start\n");	eni_dev = ENI_DEV(dev);	if (request_irq(eni_dev->irq,&eni_int,SA_SHIRQ,DEV_LABEL,dev)) {		printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",		    dev->number,eni_dev->irq);		return -EAGAIN;	}	/* @@@ should release IRQ on error */	pci_set_master(eni_dev->pci_dev);	if ((error = pci_write_config_word(eni_dev->pci_dev,PCI_COMMAND,	    PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |	    (eni_dev->asic ? PCI_COMMAND_PARITY | PCI_COMMAND_SERR : 0)))) {		printk(KERN_ERR DEV_LABEL "(itf %d): can't enable memory+"		    "master (0x%02x)\n",dev->number,error);		return error;	}	if ((error = pci_write_config_byte(eni_dev->pci_dev,PCI_TONGA_CTRL,	    END_SWAP_DMA))) {		printk(KERN_ERR DEV_LABEL "(itf %d): can't set endian swap "		    "(0x%02x)\n",dev->number,error);		return error;	}	/* determine addresses of internal tables */	eni_dev->vci = eni_dev->ram;	eni_dev->rx_dma = eni_dev->ram+NR_VCI*16;	eni_dev->tx_dma = eni_dev->rx_dma+NR_DMA_RX*8;	eni_dev->service = eni_dev->tx_dma+NR_DMA_TX*8;	buf = eni_dev->service+NR_SERVICE*4;	DPRINTK("vci 0x%lx,rx 0x%lx, tx 0x%lx,srv 0x%lx,buf 0x%lx\n",	     eni_dev->vci,eni_dev->rx_dma,eni_dev->tx_dma,	     eni_dev->service,buf);	spin_lock_init(&eni_dev->lock);	tasklet_init(&eni_dev->task,eni_tasklet,(unsigned long) dev);	eni_dev->events = 0;	/* initialize memory management */	buffer_mem = eni_dev->mem - (buf - eni_dev->ram);	eni_dev->free_list_size = buffer_mem/MID_MIN_BUF_SIZE/2;	eni_dev->free_list = (struct eni_free *) kmalloc(	    sizeof(struct eni_free)*(eni_dev->free_list_size+1),GFP_KERNEL);	if (!eni_dev->free_list) {		printk(KERN_ERR DEV_LABEL "(itf %d): couldn't get free page\n",		    dev->number);		return -ENOMEM;	}	eni_dev->free_len = 0;	eni_put_free(eni_dev,buf,buffer_mem);	memset_io(eni_dev->vci,0,16*NR_VCI); /* clear VCI table */	/*	 * byte_addr  free (k)	 * 0x00000000     512  VCI table	 * 0x00004000	  496  RX DMA	 * 0x00005000	  492  TX DMA	 * 0x00006000	  488  service list	 * 0x00007000	  484  buffers	 * 0x00080000	    0  end (512kB)	 */	eni_out(0xffffffff,MID_IE);	error = start_tx(dev);	if (error) return error;	error = start_rx(dev);	if (error) return error;	error = dev->phy->start(dev);	if (error) return error;	eni_out(eni_in(MID_MC_S) | (1 << MID_INT_SEL_SHIFT) |	    MID_TX_LOCK_MODE | MID_DMA_ENABLE | MID_TX_ENABLE | MID_RX_ENABLE,	    MID_MC_S);	    /* Tonga uses SBus INTReq1 */	(void) eni_in(MID_ISA); /* clear Midway interrupts */	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/758d11bf096ada9d38fc690c2efe5e4661685bfc/eni.c/clean/drivers/atm/eni.c