net/enic: update format string to match arg types
[dpdk.git] / drivers / net / enic / base / vnic_rq.c
index cb62c5e..776a6f7 100644 (file)
@@ -58,13 +58,13 @@ int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index,
 
        rq->ctrl = vnic_dev_get_res(vdev, RES_TYPE_RQ, index);
        if (!rq->ctrl) {
-               pr_err("Failed to hook RQ[%d] resource\n", index);
+               pr_err("Failed to hook RQ[%u] resource\n", index);
                return -EINVAL;
        }
 
        vnic_rq_disable(rq);
 
-       snprintf(res_name, sizeof(res_name), "%d-rq-%d", instance++, index);
+       snprintf(res_name, sizeof(res_name), "%d-rq-%u", instance++, index);
        rc = vnic_dev_alloc_desc_ring(vdev, &rq->ring, desc_count, desc_size,
                rq->socket_id, res_name);
        return rc;
@@ -84,11 +84,14 @@ void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index,
        iowrite32(cq_index, &rq->ctrl->cq_index);
        iowrite32(error_interrupt_enable, &rq->ctrl->error_interrupt_enable);
        iowrite32(error_interrupt_offset, &rq->ctrl->error_interrupt_offset);
-       iowrite32(0, &rq->ctrl->dropped_packet_count);
        iowrite32(0, &rq->ctrl->error_status);
        iowrite32(fetch_index, &rq->ctrl->fetch_index);
        iowrite32(posted_index, &rq->ctrl->posted_index);
-
+       if (rq->data_queue_enable)
+               iowrite32(((1 << 10) | rq->data_queue_idx),
+                         &rq->ctrl->data_ring);
+       else
+               iowrite32(0, &rq->ctrl->data_ring);
 }
 
 void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index,
@@ -96,6 +99,7 @@ void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index,
        unsigned int error_interrupt_offset)
 {
        u32 fetch_index = 0;
+
        /* Use current fetch_index as the ring starting point */
        fetch_index = ioread32(&rq->ctrl->fetch_index);
 
@@ -110,6 +114,8 @@ void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index,
                error_interrupt_offset);
        rq->rxst_idx = 0;
        rq->tot_pkts = 0;
+       rq->pkt_first_seg = NULL;
+       rq->pkt_last_seg = NULL;
 }
 
 void vnic_rq_error_out(struct vnic_rq *rq, unsigned int error)