dma_unmap_single(fep->dev, skb->data, skb->len, DMA_TO_DEVICE); 
dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp), skb->len, DMA_TO_DEVICE); 
static void fs_enet_tx(struct net_device *dev){	struct fs_enet_private *fep = netdev_priv(dev);	cbd_t *bdp;	struct sk_buff *skb;	int dirtyidx, do_wake, do_restart;	u16 sc;	spin_lock(&fep->lock);	bdp = fep->dirty_tx;	do_wake = do_restart = 0;	while (((sc = CBDR_SC(bdp)) & BD_ENET_TX_READY) == 0) {		dirtyidx = bdp - fep->tx_bd_base;		if (fep->tx_free == fep->tx_ring)			break;		skb = fep->tx_skbuff[dirtyidx];		/*		 * Check for errors. 		 */		if (sc & (BD_ENET_TX_HB | BD_ENET_TX_LC |			  BD_ENET_TX_RL | BD_ENET_TX_UN | BD_ENET_TX_CSL)) {			if (sc & BD_ENET_TX_HB)	/* No heartbeat */				fep->stats.tx_heartbeat_errors++;			if (sc & BD_ENET_TX_LC)	/* Late collision */				fep->stats.tx_window_errors++;			if (sc & BD_ENET_TX_RL)	/* Retrans limit */				fep->stats.tx_aborted_errors++;			if (sc & BD_ENET_TX_UN)	/* Underrun */				fep->stats.tx_fifo_errors++;			if (sc & BD_ENET_TX_CSL)	/* Carrier lost */				fep->stats.tx_carrier_errors++;			if (sc & (BD_ENET_TX_LC | BD_ENET_TX_RL | BD_ENET_TX_UN)) {				fep->stats.tx_errors++;				do_restart = 1;			}		} else			fep->stats.tx_packets++;		if (sc & BD_ENET_TX_READY)			printk(KERN_WARNING DRV_MODULE_NAME			       ": %s HEY! Enet xmit interrupt and TX_READY.\n",			       dev->name);		/*		 * Deferred means some collisions occurred during transmit,		 * but we eventually sent the packet OK.		 */		if (sc & BD_ENET_TX_DEF)			fep->stats.collisions++;		/* unmap */		dma_unmap_single(fep->dev, skb->data, skb->len, DMA_TO_DEVICE);		/*		 * Free the sk buffer associated with this last transmit. 		 */		dev_kfree_skb_irq(skb);		fep->tx_skbuff[dirtyidx] = NULL;		/*		 * Update pointer to next buffer descriptor to be transmitted. 		 */		if ((sc & BD_ENET_TX_WRAP) == 0)			bdp++;		else			bdp = fep->tx_bd_base;		/*		 * Since we have freed up a buffer, the ring is no longer		 * full.		 */		if (!fep->tx_free++)			do_wake = 1;	}	fep->dirty_tx = bdp;	if (do_restart)		(*fep->ops->tx_restart)(dev);	spin_unlock(&fep->lock);	if (do_wake)		netif_wake_queue(dev);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/34e30d612f54e959a9953a62143f9f8402207b35/fs_enet-main.c/clean/drivers/net/fs_enet/fs_enet-main.c