/* __vxge_hw_channel_reset - Resets a channel This function resets a channel by properly setting the various references  */
enum vxge_hw_status __vxge_hw_channel_reset(struct __vxge_hw_channel *channel)
/* __vxge_hw_channel_reset - Resets a channel This function resets a channel by properly setting the various references  */
enum vxge_hw_status __vxge_hw_channel_reset(struct __vxge_hw_channel *channel)
{
	u32 i;
	for (i = 0; i < channel->length; i++) {
		if (channel->reserve_arr != NULL)
			channel->reserve_arr[i] = channel->orig_arr[i];
		if (channel->free_arr != NULL)
			channel->free_arr[i] = NULL;
		if (channel->work_arr != NULL)
			channel->work_arr[i] = NULL;
	}
	channel->free_ptr = channel->length;
	channel->reserve_ptr = channel->length;
	channel->reserve_top = 0;
	channel->post_index = 0;
	channel->compl_index = 0;
	return VXGE_HW_OK;
}