/* Reclaim all the submitted descriptors which have completed its work.  */
static void reclaim_free_desc(struct q_inval *qi)
/* Reclaim all the submitted descriptors which have completed its work.  */
static void reclaim_free_desc(struct q_inval *qi)
{
	while (qi->desc_status[qi->free_tail] == QI_DONE ||
	       qi->desc_status[qi->free_tail] == QI_ABORT) {
		qi->desc_status[qi->free_tail] = QI_FREE;
		qi->free_tail = (qi->free_tail + 1) % QI_LENGTH;
		qi->free_cnt++;
	}
}