]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf10bfe23d658b4d1a5122d3fe4e80debb27fef84
treea8f5c88b3bf65ddf64ffd82e1cfa78fd15b7252e
parent6e88b7b7b0dbb86d326d3a80a745f14b7a175aaa
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: 954528313bc6 ("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