/* Reset the status of dma descriptors to ready state and re-initialize the hardware chain for later use  */
static void gelic_card_reset_chain(struct gelic_card *card, struct gelic_descr_chain *chain, struct gelic_descr *start_descr)
/* Reset the status of dma descriptors to ready state and re-initialize the hardware chain for later use  */
static void gelic_card_reset_chain(struct gelic_card *card, struct gelic_descr_chain *chain, struct gelic_descr *start_descr)
{
	struct gelic_descr *descr;
	for (descr = start_descr; start_descr != descr->next; descr++) {
		gelic_descr_set_status(descr, GELIC_DESCR_DMA_CARDOWNED);
		descr->next_descr_addr = cpu_to_be32(descr->next->bus_addr);
	}
	chain->head = start_descr;
	chain->tail = (descr - 1);
	(descr - 1)->next_descr_addr = 0;
}