Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy...
[pandora-kernel.git] / drivers / infiniband / hw / mlx4 / cq.c
index 660b27a..9d32c49 100644 (file)
@@ -389,7 +389,7 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq,
                        wc->opcode    = IB_WC_SEND;
                        break;
                case MLX4_OPCODE_RDMA_READ:
-                       wc->opcode    = IB_WC_SEND;
+                       wc->opcode    = IB_WC_RDMA_READ;
                        wc->byte_len  = be32_to_cpu(cqe->byte_cnt);
                        break;
                case MLX4_OPCODE_ATOMIC_CS:
@@ -430,7 +430,7 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq,
                wc->dlid_path_bits = (be32_to_cpu(cqe->g_mlpath_rqpn) >> 24) & 0x7f;
                wc->wc_flags      |= be32_to_cpu(cqe->g_mlpath_rqpn) & 0x80000000 ?
                        IB_WC_GRH : 0;
-               wc->pkey_index     = be32_to_cpu(cqe->immed_rss_invalid) >> 16;
+               wc->pkey_index     = be32_to_cpu(cqe->immed_rss_invalid) & 0x7f;
        }
 
        return 0;