/* fills all descriptors in the rx chain: allocates skbs and iommu-maps them. returns 0 on success, < 0 on failure  */
static int gelic_card_fill_rx_chain(struct gelic_card *card)
/* fills all descriptors in the rx chain: allocates skbs and iommu-maps them. returns 0 on success, < 0 on failure  */
static int gelic_card_fill_rx_chain(struct gelic_card *card)
{
	struct gelic_descr *descr = card->rx_chain.head;
	int ret;
	do {
		if (!descr->skb) {
			ret = gelic_descr_prepare_rx(card, descr);
			if (ret)
				goto rewind;
		}
		descr = descr->next;
	} while (descr != card->rx_chain.head);
	return 0;
rewind:
	gelic_card_release_rx_chain(card);
	return ret;
}