iw_cxgb4: reflect the original WR opcode in drain cqes
authorSteve Wise <swise@opengridcomputing.com>
Tue, 19 Dec 2017 18:29:25 +0000 (10:29 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 21 Dec 2017 23:06:06 +0000 (16:06 -0700)
commit96a236ed286776554fbd227c6d2876fd3b5dc65d
treea8f5c88b3bf65ddf64ffd82e1cfa78fd15b7252e
parentf55688c45442bc863f40ad678c638785b26cdce6
iw_cxgb4: reflect the original WR opcode in drain cqes

The flush/drain logic was not retaining the original wr opcode in
its completion.  This can cause problems if the application uses
the completion opcode to make decisions.

Use bit 10 of the CQE header word to indicate the CQE is a special
drain completion, and save the original WR opcode in the cqe header
opcode field.

Fixes: 4fe7c2962e11 ("iw_cxgb4: refactor sq/rq drain logic")
Cc: stable@vger.kernel.org
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/cxgb4/cq.c
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/cxgb4/qp.c
drivers/infiniband/hw/cxgb4/t4.h