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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:45:19 +0000 (09:45 +0100)
commit623b8f8e90f0bb73e9566a6744b5c0577284977e
treeeb5f317dbd67eaa921fd317bdee1c0876d5e7e88
parent5042bde3ccbbd2326ac349a01109c8e56fc7bc4b
iw_cxgb4: reflect the original WR opcode in drain cqes

commit 96a236ed286776554fbd227c6d2876fd3b5dc65d upstream.

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")
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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