/* Release the buffers on an SGE free-buffer Rx queue. HW fetching from this queue should be stopped before calling this function.  */
static void free_rx_bufs(struct pci_dev *pdev, struct sge_fl *q)
/* Release the buffers on an SGE free-buffer Rx queue. HW fetching from this queue should be stopped before calling this function.  */
static void free_rx_bufs(struct pci_dev *pdev, struct sge_fl *q)
{
	unsigned int cidx = q->cidx;
	while (q->credits--) {
		struct rx_sw_desc *d = &q->sdesc[cidx];
		clear_rx_desc(pdev, q, d);
		if (++cidx == q->size)
			cidx = 0;
	}
	if (q->pg_chunk.page) {
		__free_pages(q->pg_chunk.page, q->order);
		q->pg_chunk.page = NULL;
	}
}