} else if (status & IM_RCV_INT) { DBG(3, "%s: RX irq\n", dev->name); smc_rcv(dev); 
static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs){	struct net_device *dev = dev_id;	struct smc_local *lp = netdev_priv(dev);	void __iomem *ioaddr = lp->base;	int status, mask, timeout, card_stats;	int saved_pointer;	DBG(3, "%s: %s\n", dev->name, __FUNCTION__);	spin_lock(&lp->lock);	/* A preamble may be used when there is a potential race	 * between the interruptible transmit functions and this	 * ISR. */	SMC_INTERRUPT_PREAMBLE;	saved_pointer = SMC_GET_PTR();	mask = SMC_GET_INT_MASK();	SMC_SET_INT_MASK(0);	/* set a timeout value, so I don't stay here forever */	timeout = 8;	do {		status = SMC_GET_INT();		DBG(2, "%s: INT 0x%02x MASK 0x%02x MEM 0x%04x FIFO 0x%04x\n",			dev->name, status, mask,			({ int meminfo; SMC_SELECT_BANK(0);			   meminfo = SMC_GET_MIR();			   SMC_SELECT_BANK(2); meminfo; }),			SMC_GET_FIFO());		status &= mask;		if (!status)			break;		if (status & IM_RCV_INT) {			DBG(3, "%s: RX irq\n", dev->name);			smc_rcv(dev);		} else if (status & IM_TX_INT) {			DBG(3, "%s: TX int\n", dev->name);			smc_tx(dev);			SMC_ACK_INT(IM_TX_INT);			if (THROTTLE_TX_PKTS)				netif_wake_queue(dev);		} else if (status & IM_ALLOC_INT) {			DBG(3, "%s: Allocation irq\n", dev->name);			tasklet_hi_schedule(&lp->tx_task);			mask &= ~IM_ALLOC_INT;		} else if (status & IM_TX_EMPTY_INT) {			DBG(3, "%s: TX empty\n", dev->name);			mask &= ~IM_TX_EMPTY_INT;			/* update stats */			SMC_SELECT_BANK(0);			card_stats = SMC_GET_COUNTER();			SMC_SELECT_BANK(2);			/* single collisions */			lp->stats.collisions += card_stats & 0xF;			card_stats >>= 4;			/* multiple collisions */			lp->stats.collisions += card_stats & 0xF;		} else if (status & IM_RX_OVRN_INT) {			DBG(1, "%s: RX overrun (EPH_ST 0x%04x)\n", dev->name,			       ({ int eph_st; SMC_SELECT_BANK(0);				  eph_st = SMC_GET_EPH_STATUS();				  SMC_SELECT_BANK(2); eph_st; }) );			SMC_ACK_INT(IM_RX_OVRN_INT);			lp->stats.rx_errors++;			lp->stats.rx_fifo_errors++;		} else if (status & IM_EPH_INT) {			smc_eph_interrupt(dev);		} else if (status & IM_MDINT) {			SMC_ACK_INT(IM_MDINT);			smc_phy_interrupt(dev);		} else if (status & IM_ERCV_INT) {			SMC_ACK_INT(IM_ERCV_INT);			PRINTK("%s: UNSUPPORTED: ERCV INTERRUPT \n", dev->name);		}	} while (--timeout);	/* restore register states */	SMC_SET_PTR(saved_pointer);	SMC_SET_INT_MASK(mask);	spin_unlock(&lp->lock);	DBG(3, "%s: Interrupt done (%d loops)\n", dev->name, 8-timeout);	/*	 * We return IRQ_HANDLED unconditionally here even if there was	 * nothing to do.  There is a possibility that a packet might	 * get enqueued into the chip right after TX_EMPTY_INT is raised	 * but just before the CPU acknowledges the IRQ.	 * Better take an unneeded IRQ in some occasions than complexifying	 * the code for all cases.	 */	return IRQ_HANDLED;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ea9375607f8b312cf4389d68909330ed32a622ef/smc91x.c/clean/drivers/net/smc91x.c