const unsigned int bufsize = sky2_rx_size(sky2); 
const unsigned int bufsize = rx_size(sky2); 
static struct sk_buff *sky2_receive(struct sky2_hw *hw, unsigned port,				    u16 length, u32 status){	struct net_device *dev = hw->dev[port];	struct sky2_port *sky2 = netdev_priv(dev);	struct ring_info *re = sky2->rx_ring + sky2->rx_next;	struct sk_buff *skb = NULL;	const unsigned int bufsize = sky2_rx_size(sky2);	if (unlikely(netif_msg_rx_status(sky2)))		printk(KERN_DEBUG PFX "%s: rx slot %u status 0x%x len %d\n",		       dev->name, sky2->rx_next, status, length);	sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending;	if (!(status & GMR_FS_RX_OK)	    || (status & GMR_FS_ANY_ERR)	    || (length << 16) != (status & GMR_FS_LEN)	    || length > bufsize)		goto error;	if (length < RX_COPY_THRESHOLD) {		skb = alloc_skb(length + 2, GFP_ATOMIC);		if (!skb)			goto resubmit;		skb_reserve(skb, 2);		pci_dma_sync_single_for_cpu(sky2->hw->pdev, re->mapaddr,					    length, PCI_DMA_FROMDEVICE);		memcpy(skb->data, re->skb->data, length);		pci_dma_sync_single_for_device(sky2->hw->pdev, re->mapaddr,					       length, PCI_DMA_FROMDEVICE);	} else {		struct sk_buff *nskb;		nskb = dev_alloc_skb(bufsize);		if (!nskb)			goto resubmit;		skb = re->skb;		re->skb = nskb;		pci_unmap_single(sky2->hw->pdev, re->mapaddr,				 re->maplen, PCI_DMA_FROMDEVICE);		prefetch(skb->data);		re->mapaddr = pci_map_single(sky2->hw->pdev, nskb->data,					     bufsize, PCI_DMA_FROMDEVICE);		re->maplen = bufsize;	}	skb->dev = dev;	skb_put(skb, length);	skb->protocol = eth_type_trans(skb, dev);	dev->last_rx = jiffies;resubmit:	sky2_rx_add(sky2, re);	return skb;error:	if (status & GMR_FS_GOOD_FC)		goto resubmit;	if (netif_msg_rx_err(sky2))		printk(KERN_INFO PFX "%s: rx error, status 0x%x length %d\n",		       sky2->netdev->name, status, length);	if (status & (GMR_FS_LONG_ERR | GMR_FS_UN_SIZE))		sky2->net_stats.rx_length_errors++;	if (status & GMR_FS_FRAGMENT)		sky2->net_stats.rx_frame_errors++;	if (status & GMR_FS_CRC_ERR)		sky2->net_stats.rx_crc_errors++;	if (status & GMR_FS_RX_FF_OV)		sky2->net_stats.rx_fifo_errors++;	goto resubmit;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6b1a3aefd897fd9be410d192f950656ef2b59694/sky2.c/buggy/drivers/net/sky2.c