 /* * Decrement the number of outstanding skbs counter on * the TX queue. */ if (mp->tx_ring_skbs == 0) panic("ERROR - TX outstanding SKBs" " counter is corrupted"); mp->tx_ring_skbs--; 
static int mv643xx_eth_free_tx_queue(struct net_device *dev,					unsigned int eth_int_cause_ext){	struct mv643xx_private *mp = netdev_priv(dev);	struct net_device_stats *stats = &mp->stats;	struct pkt_info pkt_info;	int released = 1;	if (!(eth_int_cause_ext & (BIT0 | BIT8)))		return released;	spin_lock(&mp->lock);	/* Check only queue 0 */	while (eth_tx_return_desc(mp, &pkt_info) == ETH_OK) {		if (pkt_info.cmd_sts & BIT0) {			printk("%s: Error in TX\n", dev->name);			stats->tx_errors++;		}		/*		 * If return_info is different than 0, release the skb.		 * The case where return_info is not 0 is only in case		 * when transmitted a scatter/gather packet, where only		 * last skb releases the whole chain.		 */		if (pkt_info.return_info) {			if (skb_shinfo(pkt_info.return_info)->nr_frags)				dma_unmap_page(NULL, pkt_info.buf_ptr,						pkt_info.byte_cnt,						DMA_TO_DEVICE);			else				dma_unmap_single(NULL, pkt_info.buf_ptr,						pkt_info.byte_cnt,						DMA_TO_DEVICE);			dev_kfree_skb_irq(pkt_info.return_info);			released = 0;			/*			 * Decrement the number of outstanding skbs counter on			 * the TX queue.			 */			if (mp->tx_ring_skbs == 0)				panic("ERROR - TX outstanding SKBs"						" counter is corrupted");			mp->tx_ring_skbs--;		} else			dma_unmap_page(NULL, pkt_info.buf_ptr,					pkt_info.byte_cnt, DMA_TO_DEVICE);	}	spin_unlock(&mp->lock);	return released;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b111ceb68ac4c44d1a6fa697c55f267fa09b1058/mv643xx_eth.c/buggy/drivers/net/mv643xx_eth.c