if ((laddr = vdma_alloc(CPHYSADDR(skb->data), skb->len)) == ~0UL) { printk("%s: no VDMA entry for transmit available.\n", dev->name); 
 laddr = dma_map_single(lp->device, skb->data, length, DMA_TO_DEVICE); if (!laddr) { printk(KERN_ERR "%s: failed to map tx DMA buffer.\n", dev->name); 
static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev){	struct sonic_local *lp = (struct sonic_local *) dev->priv;	unsigned int base_addr = dev->base_addr;	unsigned int laddr;	int entry, length;	netif_stop_queue(dev);	if (sonic_debug > 2)		printk("sonic_send_packet: skb=%p, dev=%p\n", skb, dev);	/*	 * Map the packet data into the logical DMA address space	 */	if ((laddr = vdma_alloc(CPHYSADDR(skb->data), skb->len)) == ~0UL) {		printk("%s: no VDMA entry for transmit available.\n",		       dev->name);		dev_kfree_skb(skb);		netif_start_queue(dev);		return 1;	}	entry = lp->cur_tx & SONIC_TDS_MASK;	lp->tx_laddr[entry] = laddr;	lp->tx_skb[entry] = skb;	length = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len;	flush_cache_all();	/*	 * Setup the transmit descriptor and issue the transmit command.	 */	lp->tda[entry].tx_status = 0;	/* clear status */	lp->tda[entry].tx_frag_count = 1;	/* single fragment */	lp->tda[entry].tx_pktsize = length;	/* length of packet */	lp->tda[entry].tx_frag_ptr_l = laddr & 0xffff;	lp->tda[entry].tx_frag_ptr_h = laddr >> 16;	lp->tda[entry].tx_frag_size = length;	lp->cur_tx++;	lp->stats.tx_bytes += length;	if (sonic_debug > 2)		printk("sonic_send_packet: issueing Tx command\n");	SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP);	dev->trans_start = jiffies;	if (lp->cur_tx < lp->dirty_tx + SONIC_NUM_TDS)		netif_start_queue(dev);	else		lp->tx_full = 1;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/efcce839360fb3a7b6dedeacaec80f68b0f2d052/sonic.c/clean/drivers/net/sonic.c