Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[cascardo/linux.git] / drivers / net / ethernet / mellanox / mlx4 / en_tx.c
index 1f571d0..2b799f4 100644 (file)
@@ -315,12 +315,13 @@ static void mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq)
        struct mlx4_cqe *buf = cq->buf;
        u32 packets = 0;
        u32 bytes = 0;
+       int factor = priv->cqe_factor;
 
        if (!priv->port_up)
                return;
 
        index = cons_index & size_mask;
-       cqe = &buf[index];
+       cqe = &buf[(index << factor) + factor];
        ring_index = ring->cons & size_mask;
 
        /* Process all completed CQEs */
@@ -349,7 +350,7 @@ static void mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq)
 
                ++cons_index;
                index = cons_index & size_mask;
-               cqe = &buf[index];
+               cqe = &buf[(index << factor) + factor];
        }