diff options
author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2010-10-22 22:00:48 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-10-22 22:12:15 -0700 |
commit | 5715f5d44b93507693feca6c62290e123e5ef688 (patch) | |
tree | 45c739a21a57736c32be1794f321ef9589336dbe /drivers/infiniband/hw/qib/qib_uc.c | |
parent | 0f2f930a67c763a71aacfdbc76de9a76de7d1a9e (diff) | |
download | linux-stable-5715f5d44b93507693feca6c62290e123e5ef688.tar.gz linux-stable-5715f5d44b93507693feca6c62290e123e5ef688.tar.bz2 linux-stable-5715f5d44b93507693feca6c62290e123e5ef688.zip |
IB/qib: Process RDMA WRITE ONLY with IMMEDIATE properly
See table 35 in IBA - the header order for RDMA_WRITE_ONLY_WITH_IMMEDIATE
and SEND_LAST_WITH_IMMEDIATE is different: the RDMA_WRITE_ONLY has
a RETH header before the immediate data, so we need a different code path
to extract the immediate data.
I tested this with a userspace app that does RDMA_WRITE with immediate
on a QLE7140.
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_uc.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_uc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib_uc.c b/drivers/infiniband/hw/qib/qib_uc.c index b9c8b6346c1b..32ccf3c824ca 100644 --- a/drivers/infiniband/hw/qib/qib_uc.c +++ b/drivers/infiniband/hw/qib/qib_uc.c @@ -457,8 +457,10 @@ rdma_first: } if (opcode == OP(RDMA_WRITE_ONLY)) goto rdma_last; - else if (opcode == OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE)) + else if (opcode == OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE)) { + wc.ex.imm_data = ohdr->u.rc.imm_data; goto rdma_last_imm; + } /* FALLTHROUGH */ case OP(RDMA_WRITE_MIDDLE): /* Check for invalid length PMTU or posted rwqe len. */ @@ -471,8 +473,8 @@ rdma_first: break; case OP(RDMA_WRITE_LAST_WITH_IMMEDIATE): -rdma_last_imm: wc.ex.imm_data = ohdr->u.imm_data; +rdma_last_imm: hdrsize += 4; wc.wc_flags = IB_WC_WITH_IMM; |