diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_cq.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cq.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index 8b3ffd23e505..0ad954e18bd7 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c | |||
@@ -473,7 +473,41 @@ static inline int mthca_poll_one(struct mthca_dev *dev, | |||
473 | } | 473 | } |
474 | 474 | ||
475 | if (is_send) { | 475 | if (is_send) { |
476 | entry->opcode = IB_WC_SEND; /* XXX */ | 476 | entry->wc_flags = 0; |
477 | switch (cqe->opcode) { | ||
478 | case MTHCA_OPCODE_RDMA_WRITE: | ||
479 | entry->opcode = IB_WC_RDMA_WRITE; | ||
480 | break; | ||
481 | case MTHCA_OPCODE_RDMA_WRITE_IMM: | ||
482 | entry->opcode = IB_WC_RDMA_WRITE; | ||
483 | entry->wc_flags |= IB_WC_WITH_IMM; | ||
484 | break; | ||
485 | case MTHCA_OPCODE_SEND: | ||
486 | entry->opcode = IB_WC_SEND; | ||
487 | break; | ||
488 | case MTHCA_OPCODE_SEND_IMM: | ||
489 | entry->opcode = IB_WC_SEND; | ||
490 | entry->wc_flags |= IB_WC_WITH_IMM; | ||
491 | break; | ||
492 | case MTHCA_OPCODE_RDMA_READ: | ||
493 | entry->opcode = IB_WC_RDMA_READ; | ||
494 | entry->byte_len = be32_to_cpu(cqe->byte_cnt); | ||
495 | break; | ||
496 | case MTHCA_OPCODE_ATOMIC_CS: | ||
497 | entry->opcode = IB_WC_COMP_SWAP; | ||
498 | entry->byte_len = be32_to_cpu(cqe->byte_cnt); | ||
499 | break; | ||
500 | case MTHCA_OPCODE_ATOMIC_FA: | ||
501 | entry->opcode = IB_WC_FETCH_ADD; | ||
502 | entry->byte_len = be32_to_cpu(cqe->byte_cnt); | ||
503 | break; | ||
504 | case MTHCA_OPCODE_BIND_MW: | ||
505 | entry->opcode = IB_WC_BIND_MW; | ||
506 | break; | ||
507 | default: | ||
508 | entry->opcode = MTHCA_OPCODE_INVALID; | ||
509 | break; | ||
510 | } | ||
477 | } else { | 511 | } else { |
478 | entry->byte_len = be32_to_cpu(cqe->byte_cnt); | 512 | entry->byte_len = be32_to_cpu(cqe->byte_cnt); |
479 | switch (cqe->opcode & 0x1f) { | 513 | switch (cqe->opcode & 0x1f) { |