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, *nskb;	const unsigned int rx_buf_size = dev->mtu + ETH_HLEN + 8;	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;	skb = NULL;	if (!(status & GMR_FS_RX_OK)	    || (status & GMR_FS_ANY_ERR)	    || (length << 16) != (status & GMR_FS_LEN)	    || length > rx_buf_size)		goto error;	if (length < RX_COPY_THRESHOLD) {		nskb = sky2_rx_alloc(sky2, length, GFP_ATOMIC);		if (!nskb)			goto resubmit;		pci_dma_sync_single_for_cpu(sky2->hw->pdev, re->mapaddr,					    length, PCI_DMA_FROMDEVICE);		memcpy(nskb->data, re->skb->data, length);		pci_dma_sync_single_for_device(sky2->hw->pdev, re->mapaddr,					       length, PCI_DMA_FROMDEVICE);		skb = nskb;	} else {		nskb = sky2_rx_alloc(sky2, rx_buf_size, GFP_ATOMIC);		if (!nskb)			goto resubmit;		skb = re->skb;		pci_unmap_single(sky2->hw->pdev, re->mapaddr,				 re->maplen, PCI_DMA_FROMDEVICE);		prefetch(skb->data);		re->skb = nskb;		re->mapaddr = pci_map_single(sky2->hw->pdev, nskb->data,					     rx_buf_size, PCI_DMA_FROMDEVICE);		re->maplen = rx_buf_size;	}resubmit:	BUG_ON(re->skb == skb);	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/79e57d32fe6d2d5bd38378f6dccfdbe6bd1d1dab/sky2.c/buggy/drivers/net/sky2.c