/* __vxge_hw_ring_abort - Returns the RxD This function terminates the RxDs of ring  */
enum vxge_hw_status __vxge_hw_ring_abort(struct __vxge_hw_ring *ring)
/* __vxge_hw_ring_abort - Returns the RxD This function terminates the RxDs of ring  */
enum vxge_hw_status __vxge_hw_ring_abort(struct __vxge_hw_ring *ring)
{
	void *rxdh;
	struct __vxge_hw_channel *channel;
	channel = &ring->channel;
	for (;;) {
		vxge_hw_channel_dtr_try_complete(channel, &rxdh);
		if (rxdh == NULL)
			break;
		vxge_hw_channel_dtr_complete(channel);
		if (ring->rxd_term)
			ring->rxd_term(rxdh, VXGE_HW_RXD_STATE_POSTED,
				channel->userdata);
		vxge_hw_channel_dtr_free(channel, rxdh);
	}
	return VXGE_HW_OK;
}