static int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit) 
int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit) 
static int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit){	struct rxbd8 *bdp;	struct sk_buff *skb;	u16 pkt_len;	int howmany = 0;	struct gfar_private *priv = netdev_priv(dev);	/* Get the first full descriptor */	bdp = priv->cur_rx;	while (!((bdp->status & RXBD_EMPTY) || (--rx_work_limit < 0))) {		skb = priv->rx_skbuff[priv->skb_currx];		if (!(bdp->status &		      (RXBD_LARGE | RXBD_SHORT | RXBD_NONOCTET		       | RXBD_CRCERR | RXBD_OVERRUN | RXBD_TRUNCATED))) {			/* Increment the number of packets */			priv->stats.rx_packets++;			howmany++;			/* Remove the FCS from the packet length */			pkt_len = bdp->length - 4;			gfar_process_frame(dev, skb, pkt_len);			priv->stats.rx_bytes += pkt_len;		} else {			count_errors(bdp->status, priv);			if (skb)				dev_kfree_skb_any(skb);			priv->rx_skbuff[priv->skb_currx] = NULL;		}		dev->last_rx = jiffies;		/* Clear the status flags for this buffer */		bdp->status &= ~RXBD_STATS;		/* Add another skb for the future */		skb = gfar_new_skb(dev, bdp);		priv->rx_skbuff[priv->skb_currx] = skb;		/* Update to the next pointer */		if (bdp->status & RXBD_WRAP)			bdp = priv->rx_bd_base;		else			bdp++;		/* update to point at the next skb */		priv->skb_currx =		    (priv->skb_currx +		     1) & RX_RING_MOD_MASK(priv->rx_ring_size);	}	/* Update the current rxbd pointer to be the next one */	priv->cur_rx = bdp;	/* If no packets have arrived since the	 * last one we processed, clear the IEVENT RX and	 * BSY bits so that another interrupt won't be	 * generated when we set IMASK */	if (bdp->status & RXBD_EMPTY)		gfar_write(&priv->regs->ievent, IEVENT_RX_MASK);	return howmany;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0bbaf069f053957e8d733784e18a2992afd1dd3c/gianfar.c/clean/drivers/net/gianfar.c