/* ixgbe_clean_tx_ring - Free Tx Buffers @adapter: board private structure @tx_ring: ring to be cleaned  */
static void ixgbe_clean_tx_ring(struct ixgbe_adapter *adapter, struct ixgbe_ring *tx_ring)
/* ixgbe_clean_tx_ring - Free Tx Buffers @adapter: board private structure @tx_ring: ring to be cleaned  */
static void ixgbe_clean_tx_ring(struct ixgbe_adapter *adapter, struct ixgbe_ring *tx_ring)
{
	struct ixgbe_tx_buffer *tx_buffer_info;
	unsigned long size;
	unsigned int i;
	for (i = 0; i < tx_ring->count; i++) {
		tx_buffer_info = &tx_ring->tx_buffer_info[i];
		ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info);
	}
	size = sizeof(struct ixgbe_tx_buffer) * tx_ring->count;
	memset(tx_ring->tx_buffer_info, 0, size);
	memset(tx_ring->desc, 0, tx_ring->size);
	tx_ring->next_to_use = 0;
	tx_ring->next_to_clean = 0;
	if (tx_ring->head)
		writel(0, adapter->hw.hw_addr + tx_ring->head);
	if (tx_ring->tail)
		writel(0, adapter->hw.hw_addr + tx_ring->tail);
}