if (Flags & NV_RX_ERROR) { /* framing errors are soft errors, the rest is fatal. */ if (Flags & NV_RX_FRAMINGERR) { if (Flags & NV_RX_SUBSTRACT1) { len--; } } else { 
if (Flags & NV_RX_ERROR4) { len = nv_getlen(dev, np->rx_skbuff[i]->data, len); if (len < 0) { 
static void nv_rx_process(struct net_device *dev){	struct fe_priv *np = get_nvpriv(dev);	u32 Flags;	for (;;) {		struct sk_buff *skb;		int len;		int i;		if (np->cur_rx - np->refill_rx >= RX_RING)			break;	/* we scanned the whole ring - do not continue */		i = np->cur_rx % RX_RING;		Flags = le32_to_cpu(np->rx_ring[i].FlagLen);		len = nv_descr_getlength(&np->rx_ring[i], np->desc_ver);		dprintk(KERN_DEBUG "%s: nv_rx_process: looking at packet %d, Flags 0x%x.\n",					dev->name, np->cur_rx, Flags);		if (Flags & NV_RX_AVAIL)			break;	/* still owned by hardware, */		/*		 * the packet is for us - immediately tear down the pci mapping.		 * TODO: check if a prefetch of the first cacheline improves		 * the performance.		 */		pci_unmap_single(np->pci_dev, np->rx_dma[i],				np->rx_skbuff[i]->len,				PCI_DMA_FROMDEVICE);		{			int j;			dprintk(KERN_DEBUG "Dumping packet (flags 0x%x).",Flags);			for (j=0; j<64; j++) {				if ((j%16) == 0)					dprintk("\n%03x:", j);				dprintk(" %02x", ((unsigned char*)np->rx_skbuff[i]->data)[j]);			}			dprintk("\n");		}		/* look at what we actually got: */		if (np->desc_ver == DESC_VER_1) {			if (!(Flags & NV_RX_DESCRIPTORVALID))				goto next_pkt;			if (Flags & NV_RX_MISSEDFRAME) {				np->stats.rx_missed_errors++;				np->stats.rx_errors++;				goto next_pkt;			}			if (Flags & (NV_RX_ERROR1|NV_RX_ERROR2|NV_RX_ERROR3|NV_RX_ERROR4)) {				np->stats.rx_errors++;				goto next_pkt;			}			if (Flags & NV_RX_CRCERR) {				np->stats.rx_crc_errors++;				np->stats.rx_errors++;				goto next_pkt;			}			if (Flags & NV_RX_OVERFLOW) {				np->stats.rx_over_errors++;				np->stats.rx_errors++;				goto next_pkt;			}			if (Flags & NV_RX_ERROR) {				/* framing errors are soft errors, the rest is fatal. */				if (Flags & NV_RX_FRAMINGERR) {					if (Flags & NV_RX_SUBSTRACT1) {						len--;					}				} else {					np->stats.rx_errors++;					goto next_pkt;				}			}		} else {			if (!(Flags & NV_RX2_DESCRIPTORVALID))				goto next_pkt;			if (Flags & (NV_RX2_ERROR1|NV_RX2_ERROR2|NV_RX2_ERROR3|NV_RX2_ERROR4)) {				np->stats.rx_errors++;				goto next_pkt;			}			if (Flags & NV_RX2_CRCERR) {				np->stats.rx_crc_errors++;				np->stats.rx_errors++;				goto next_pkt;			}			if (Flags & NV_RX2_OVERFLOW) {				np->stats.rx_over_errors++;				np->stats.rx_errors++;				goto next_pkt;			}			if (Flags & NV_RX2_ERROR) {				/* framing errors are soft errors, the rest is fatal. */				if (Flags & NV_RX2_FRAMINGERR) {					if (Flags & NV_RX2_SUBSTRACT1) {						len--;					}				} else {					np->stats.rx_errors++;					goto next_pkt;				}			}			Flags &= NV_RX2_CHECKSUMMASK;			if (Flags == NV_RX2_CHECKSUMOK1 ||					Flags == NV_RX2_CHECKSUMOK2 ||					Flags == NV_RX2_CHECKSUMOK3) {				dprintk(KERN_DEBUG "%s: hw checksum hit!.\n", dev->name);				np->rx_skbuff[i]->ip_summed = CHECKSUM_UNNECESSARY;			} else {				dprintk(KERN_DEBUG "%s: hwchecksum miss!.\n", dev->name);			}		}		/* got a valid packet - forward it to the network core */		skb = np->rx_skbuff[i];		np->rx_skbuff[i] = NULL;		skb_put(skb, len);		skb->protocol = eth_type_trans(skb, dev);		dprintk(KERN_DEBUG "%s: nv_rx_process: packet %d with %d bytes, proto %d accepted.\n",					dev->name, np->cur_rx, len, skb->protocol);		netif_rx(skb);		dev->last_rx = jiffies;		np->stats.rx_packets++;		np->stats.rx_bytes += len;next_pkt:		np->cur_rx++;	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/22c6d143f33f10721216a8cfa3a83f7edfc2bd4e/forcedeth.c/clean/drivers/net/forcedeth.c