We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19b596b commit 8b13b4eCopy full SHA for 8b13b4e
drivers/net/ethernet/cisco/enic/vnic_rq.c
@@ -188,16 +188,15 @@ void vnic_rq_clean(struct vnic_rq *rq,
188
struct vnic_rq_buf *buf;
189
u32 fetch_index;
190
unsigned int count = rq->ring.desc_count;
191
+ int i;
192
193
buf = rq->to_clean;
194
- while (vnic_rq_desc_used(rq) > 0) {
195
-
+ for (i = 0; i < rq->ring.desc_count; i++) {
196
(*buf_clean)(rq, buf);
197
198
- buf = rq->to_clean = buf->next;
199
- rq->ring.desc_avail++;
+ buf = buf->next;
200
}
+ rq->ring.desc_avail = rq->ring.desc_count - 1;
201
202
/* Use current fetch_index as the ring starting point */
203
fetch_index = ioread32(&rq->ctrl->fetch_index);
0 commit comments