 mp->tx_ring_skbs++; BUG_ON(mp->tx_ring_skbs > mp->tx_ring_size); 
static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,					 struct pkt_info *p_pkt_info){	int tx_desc_curr;	int tx_desc_used;	struct eth_tx_desc *current_descriptor;	unsigned int command_status;	/* Do not process Tx ring in case of Tx ring resource error */	if (mp->tx_resource_err)		return ETH_QUEUE_FULL;	/* Get the Tx Desc ring indexes */	tx_desc_curr = mp->tx_curr_desc_q;	tx_desc_used = mp->tx_used_desc_q;	current_descriptor = &mp->p_tx_desc_area[tx_desc_curr];	command_status = p_pkt_info->cmd_sts | ETH_ZERO_PADDING | ETH_GEN_CRC;	current_descriptor->buf_ptr = p_pkt_info->buf_ptr;	current_descriptor->byte_cnt = p_pkt_info->byte_cnt;	mp->tx_skb[tx_desc_curr] = p_pkt_info->return_info;	/* Set last desc with DMA ownership and interrupt enable. */	wmb();	current_descriptor->cmd_sts = command_status |			ETH_BUFFER_OWNED_BY_DMA | ETH_TX_ENABLE_INTERRUPT;	wmb();	ETH_ENABLE_TX_QUEUE(mp->port_num);	/* Finish Tx packet. Update first desc in case of Tx resource error */	tx_desc_curr = (tx_desc_curr + 1) % mp->tx_ring_size;	/* Update the current descriptor */	mp->tx_curr_desc_q = tx_desc_curr;	/* Check for ring index overlap in the Tx desc ring */	if (tx_desc_curr == tx_desc_used) {		mp->tx_resource_err = 1;		return ETH_QUEUE_LAST_RESOURCE;	}	return ETH_OK;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b111ceb68ac4c44d1a6fa697c55f267fa09b1058/mv643xx_eth.c/buggy/drivers/net/mv643xx_eth.c