switch(le->opcode & ~HW_OWNER) { case OP_LARGESEND: case OP_PACKET: if (skb) dev_kfree_skb_any(skb); skb = re->skb; BUG_ON(!skb); re->skb = NULL; 
/* Check for partial status */ if (tx_dist(sky2->tx_cons, done) < tx_dist(sky2->tx_cons, re->idx)) goto out; 
static void sky2_tx_complete(struct net_device *dev, u16 done){	struct sky2_port *sky2 = netdev_priv(dev);	unsigned idx = sky2->tx_cons;	struct sk_buff *skb = NULL;	BUG_ON(done >= TX_RING_SIZE);	spin_lock(&sky2->tx_lock);	while (idx != done) {		struct ring_info *re = sky2->tx_ring + idx;		struct sky2_tx_le *le = sky2->tx_le + idx;		BUG_ON(le->opcode == 0);		switch(le->opcode & ~HW_OWNER) {		case OP_LARGESEND:		case OP_PACKET:			if (skb)				dev_kfree_skb_any(skb);			skb = re->skb;			BUG_ON(!skb);			re->skb = NULL;			pci_unmap_single(sky2->hw->pdev, 					 pci_unmap_addr(re, mapaddr),					 pci_unmap_len(re, maplen),					 PCI_DMA_TODEVICE);			break;		case OP_BUFFER:			pci_unmap_page(sky2->hw->pdev,				       pci_unmap_addr(re, mapaddr),				       pci_unmap_len(re, maplen),				       PCI_DMA_TODEVICE);			break;		}		le->opcode = 0;		idx = (idx + 1) % TX_RING_SIZE;	}	if (skb)		dev_kfree_skb_any(skb);	sky2->tx_cons = idx;	if (sky2_xmit_avail(sky2) > MAX_SKB_TX_LE)		netif_wake_queue(dev);	spin_unlock(&sky2->tx_lock);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/793b883ed12a6ae6e2901ddb5e038b77d6f0c0ac/sky2.c/buggy/drivers/net/sky2.c