txbdp->bufPtr = dma_map_single(NULL, skb->data, 
txbdp->bufPtr = dma_map_single(NULL, skb->data, 
static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev){	struct gfar_private *priv = netdev_priv(dev);	struct txbd8 *txbdp;	/* Update transmit stats */	priv->stats.tx_bytes += skb->len;	/* Lock priv now */	spin_lock_irq(&priv->lock);	/* Point at the first free tx descriptor */	txbdp = priv->cur_tx;	/* Clear all but the WRAP status flags */	txbdp->status &= TXBD_WRAP;	/* Set buffer length and pointer */	txbdp->length = skb->len;	txbdp->bufPtr = dma_map_single(NULL, skb->data, 			skb->len, DMA_TO_DEVICE);	/* Save the skb pointer so we can free it later */	priv->tx_skbuff[priv->skb_curtx] = skb;	/* Update the current skb pointer (wrapping if this was the last) */	priv->skb_curtx =	    (priv->skb_curtx + 1) & TX_RING_MOD_MASK(priv->tx_ring_size);	/* Flag the BD as interrupt-causing */	txbdp->status |= TXBD_INTERRUPT;	/* Flag the BD as ready to go, last in frame, and  */	/* in need of CRC */	txbdp->status |= (TXBD_READY | TXBD_LAST | TXBD_CRC);	dev->trans_start = jiffies;	/* If this was the last BD in the ring, the next one */	/* is at the beginning of the ring */	if (txbdp->status & TXBD_WRAP)		txbdp = priv->tx_bd_base;	else		txbdp++;	/* If the next BD still needs to be cleaned up, then the bds	   are full.  We need to tell the kernel to stop sending us stuff. */	if (txbdp == priv->dirty_tx) {		netif_stop_queue(dev);		priv->stats.tx_fifo_errors++;	}	/* Update the current txbd to the next one */	priv->cur_tx = txbdp;	/* Tell the DMA to go go go */	gfar_write(&priv->regs->tstat, TSTAT_CLEAR_THALT);	/* Unlock priv */	spin_unlock_irq(&priv->lock);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0bbaf069f053957e8d733784e18a2992afd1dd3c/gianfar.c/buggy/drivers/net/gianfar.c