#ifdef MV643XX_NAPI budget--; #endif 
static int mv643xx_eth_receive_queue(struct net_device *dev)#endif{	struct mv643xx_private *mp = netdev_priv(dev);	struct net_device_stats *stats = &mp->stats;	unsigned int received_packets = 0;	struct sk_buff *skb;	struct pkt_info pkt_info;#ifdef MV643XX_NAPI	while (eth_port_receive(mp, &pkt_info) == ETH_OK && budget > 0) {#else	while (eth_port_receive(mp, &pkt_info) == ETH_OK) {#endif		mp->rx_ring_skbs--;		received_packets++;#ifdef MV643XX_NAPI		budget--;#endif		/* Update statistics. Note byte count includes 4 byte CRC count */		stats->rx_packets++;		stats->rx_bytes += pkt_info.byte_cnt;		skb = pkt_info.return_info;		/*		 * In case received a packet without first / last bits on OR		 * the error summary bit is on, the packets needs to be dropeed.		 */		if (((pkt_info.cmd_sts				& (ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) !=					(ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC))				|| (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)) {			stats->rx_dropped++;			if ((pkt_info.cmd_sts & (ETH_RX_FIRST_DESC |							ETH_RX_LAST_DESC)) !=				(ETH_RX_FIRST_DESC | ETH_RX_LAST_DESC)) {				if (net_ratelimit())					printk(KERN_ERR						"%s: Received packet spread "						"on multiple descriptors\n",						dev->name);			}			if (pkt_info.cmd_sts & ETH_ERROR_SUMMARY)				stats->rx_errors++;			dev_kfree_skb_irq(skb);		} else {			/*			 * The -4 is for the CRC in the trailer of the			 * received packet			 */			skb_put(skb, pkt_info.byte_cnt - 4);			skb->dev = dev;			if (pkt_info.cmd_sts & ETH_LAYER_4_CHECKSUM_OK) {				skb->ip_summed = CHECKSUM_UNNECESSARY;				skb->csum = htons(					(pkt_info.cmd_sts & 0x0007fff8) >> 3);			}			skb->protocol = eth_type_trans(skb, dev);#ifdef MV643XX_NAPI			netif_receive_skb(skb);#else			netif_rx(skb);#endif		}	}	return received_packets;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b1dd9ca177bd2ff5260376dd024dd43eb4631dc7/mv643xx_eth.c/buggy/drivers/net/mv643xx_eth.c