static void uli526x_rx_packet(struct DEVICE *dev, struct uli526x_board_info * db) 
static void uli526x_rx_packet(struct net_device *dev, struct uli526x_board_info * db) 
static void uli526x_rx_packet(struct DEVICE *dev, struct uli526x_board_info * db){	struct rx_desc *rxptr;	struct sk_buff *skb;	int rxlen;	u32 rdes0;		rxptr = db->rx_ready_ptr;	while(db->rx_avail_cnt) {		rdes0 = le32_to_cpu(rxptr->rdes0);		if (rdes0 & 0x80000000)	/* packet owner check */		{			break;		}		db->rx_avail_cnt--;		db->interval_rx_cnt++;		pci_unmap_single(db->pdev, le32_to_cpu(rxptr->rdes2), RX_ALLOC_SIZE, PCI_DMA_FROMDEVICE);		if ( (rdes0 & 0x300) != 0x300) {			/* A packet without First/Last flag */			/* reuse this SKB */			ULI526X_DBUG(0, "Reuse SK buffer, rdes0", rdes0);			uli526x_reuse_skb(db, rxptr->rx_skb_ptr);		} else {			/* A packet with First/Last flag */			rxlen = ( (rdes0 >> 16) & 0x3fff) - 4;			/* error summary bit check */			if (rdes0 & 0x8000) {				/* This is a error packet */				//printk(DRV_NAME ": rdes0: %lx\n", rdes0);				db->stats.rx_errors++;				if (rdes0 & 1)					db->stats.rx_fifo_errors++;				if (rdes0 & 2)					db->stats.rx_crc_errors++;				if (rdes0 & 0x80)					db->stats.rx_length_errors++;			}			if ( !(rdes0 & 0x8000) ||				((db->cr6_data & CR6_PM) && (rxlen>6)) ) {				skb = rxptr->rx_skb_ptr;						/* Good packet, send to upper layer */				/* Shorst packet used new SKB */				if ( (rxlen < RX_COPY_SIZE) &&					( (skb = dev_alloc_skb(rxlen + 2) )					!= NULL) ) {					/* size less than COPY_SIZE, allocate a rxlen SKB */					skb->dev = dev;					skb_reserve(skb, 2); /* 16byte align */					memcpy(skb_put(skb, rxlen), rxptr->rx_skb_ptr->tail, rxlen);					uli526x_reuse_skb(db, rxptr->rx_skb_ptr);				} else {					skb->dev = dev;					skb_put(skb, rxlen);				}				skb->protocol = eth_type_trans(skb, dev);				netif_rx(skb);				dev->last_rx = jiffies;				db->stats.rx_packets++;				db->stats.rx_bytes += rxlen;							} else {				/* Reuse SKB buffer when the packet is error */				ULI526X_DBUG(0, "Reuse SK buffer, rdes0", rdes0);				uli526x_reuse_skb(db, rxptr->rx_skb_ptr);			}		}		rxptr = rxptr->next_rx_desc;	}	db->rx_ready_ptr = rxptr;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/945a787675cc5ba362f5d4ce135d2a2c20be5985/uli526x.c/buggy/drivers/net/tulip/uli526x.c