X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fenic%2Fbase%2Fvnic_wq.c;h=7c4119c34a26ddf09a7513503db121fd9bdf380a;hb=4e7367d831ca738af0cfdd20cf39b849e97e8c18;hp=ab81c7e0b202f29f690dd2da7e4bb07a130f72b5;hpb=a3b1e9551c26085e80322d0507394fe5496ae3ba;p=dpdk.git diff --git a/drivers/net/enic/base/vnic_wq.c b/drivers/net/enic/base/vnic_wq.c index ab81c7e0b2..7c4119c34a 100644 --- a/drivers/net/enic/base/vnic_wq.c +++ b/drivers/net/enic/base/vnic_wq.c @@ -142,6 +142,7 @@ void vnic_wq_init(struct vnic_wq *wq, unsigned int cq_index, vnic_wq_init_start(wq, cq_index, 0, 0, error_interrupt_enable, error_interrupt_offset); + wq->last_completed_index = 0; } void vnic_wq_error_out(struct vnic_wq *wq, unsigned int error) @@ -178,7 +179,7 @@ int vnic_wq_disable(struct vnic_wq *wq) } void vnic_wq_clean(struct vnic_wq *wq, - void (*buf_clean)(struct vnic_wq *wq, struct vnic_wq_buf *buf)) + void (*buf_clean)(struct vnic_wq_buf *buf)) { struct vnic_wq_buf *buf; unsigned int to_clean = wq->tail_idx; @@ -187,7 +188,7 @@ void vnic_wq_clean(struct vnic_wq *wq, while (vnic_wq_desc_used(wq) > 0) { - (*buf_clean)(wq, buf); + (*buf_clean)(buf); to_clean = buf_idx_incr(wq->ring.desc_count, to_clean); buf = &wq->bufs[to_clean]; @@ -196,6 +197,8 @@ void vnic_wq_clean(struct vnic_wq *wq, wq->head_idx = 0; wq->tail_idx = 0; + wq->last_completed_index = 0; + *((uint32_t *)wq->cqmsg_rz->addr) = 0; iowrite32(0, &wq->ctrl->fetch_index); iowrite32(0, &wq->ctrl->posted_index);