while (rx_left > 0) { 
for (; rx_left > 0; rx_left--, cur_rx++) { 
rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,		     void __iomem *ioaddr){	unsigned int cur_rx, rx_left;	unsigned int delta, count;	assert(dev != NULL);	assert(tp != NULL);	assert(ioaddr != NULL);	cur_rx = tp->cur_rx;	rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx;	rx_left = rtl8169_rx_quota(rx_left, (u32) dev->quota);	while (rx_left > 0) {		unsigned int entry = cur_rx % NUM_RX_DESC;		struct RxDesc *desc = tp->RxDescArray + entry;		u32 status;		rmb();		status = le32_to_cpu(desc->opts1);		if (status & DescOwn)			break;		if (status & RxRES) {			if (netif_msg_rx_err(tp)) {				printk(KERN_INFO				       "%s: Rx ERROR. status = %08x\n",				       dev->name, status);			}			tp->stats.rx_errors++;			if (status & (RxRWT | RxRUNT))				tp->stats.rx_length_errors++;			if (status & RxCRC)				tp->stats.rx_crc_errors++;			rtl8169_mark_to_asic(desc, tp->rx_buf_sz);		} else {			struct sk_buff *skb = tp->Rx_skbuff[entry];			int pkt_size = (status & 0x00001FFF) - 4;			void (*pci_action)(struct pci_dev *, dma_addr_t,				size_t, int) = pci_dma_sync_single_for_device;			/*			 * The driver does not support incoming fragmented			 * frames. They are seen as a symptom of over-mtu			 * sized frames.			 */			if (unlikely(rtl8169_fragmented_frame(status))) {				tp->stats.rx_dropped++;				tp->stats.rx_length_errors++;				rtl8169_mark_to_asic(desc, tp->rx_buf_sz);				goto move_on;			}			rtl8169_rx_csum(skb, desc);						pci_dma_sync_single_for_cpu(tp->pci_dev,				le64_to_cpu(desc->addr), tp->rx_buf_sz,				PCI_DMA_FROMDEVICE);			if (rtl8169_try_rx_copy(&skb, pkt_size, desc,						tp->rx_buf_sz)) {				pci_action = pci_unmap_single;				tp->Rx_skbuff[entry] = NULL;			}			pci_action(tp->pci_dev, le64_to_cpu(desc->addr),				   tp->rx_buf_sz, PCI_DMA_FROMDEVICE);			skb->dev = dev;			skb_put(skb, pkt_size);			skb->protocol = eth_type_trans(skb, dev);			if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0)				rtl8169_rx_skb(skb);			dev->last_rx = jiffies;			tp->stats.rx_bytes += pkt_size;			tp->stats.rx_packets++;		}move_on:				cur_rx++; 		rx_left--;	}	count = cur_rx - tp->cur_rx;	tp->cur_rx = cur_rx;	delta = rtl8169_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx);	if (!delta && count && netif_msg_intr(tp))		printk(KERN_INFO "%s: no Rx buffer allocated\n", dev->name);	tp->dirty_rx += delta;	/*	 * FIXME: until there is periodic timer to try and refill the ring,	 * a temporary shortage may definitely kill the Rx process.	 * - disable the asic to try and avoid an overflow and kick it again	 *   after refill ?	 * - how do others driver handle this condition (Uh oh...).	 */	if ((tp->dirty_rx + NUM_RX_DESC == tp->cur_rx) && netif_msg_intr(tp))		printk(KERN_EMERG "%s: Rx buffers exhausted\n", dev->name);	return count;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/4dcb7d33770541ae3e65a57351f3875df64e8af6/r8169.c/clean/drivers/net/r8169.c