]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RDMA/hns: Set the unsupported wr opcode
authorLijun Ou <oulijun@huawei.com>
Thu, 17 Sep 2020 13:50:15 +0000 (21:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:58 +0000 (10:07 +0100)
[ Upstream commit 22d3e1ed2cc837af87f76c3c8a4ccf4455e225c5 ]

hip06 does not support IB_WR_LOCAL_INV, so the ps_opcode should be set to
an invalid value instead of being left uninitialized.

Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
Fixes: a2f3d4479fe9 ("RDMA/hns: Avoid unncessary initialization")
Link: https://lore.kernel.org/r/1600350615-115217-1-git-send-email-oulijun@huawei.com
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hw_v1.c

index 87c93f303b9a831d48c127e6ad2aeac7b9d124cf..5a0c90e0b367be52c115ffd75f455522c1c3f849 100644 (file)
@@ -271,7 +271,6 @@ static int hns_roce_v1_post_send(struct ib_qp *ibqp,
                                ps_opcode = HNS_ROCE_WQE_OPCODE_SEND;
                                break;
                        case IB_WR_LOCAL_INV:
-                               break;
                        case IB_WR_ATOMIC_CMP_AND_SWP:
                        case IB_WR_ATOMIC_FETCH_AND_ADD:
                        case IB_WR_LSO: