]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Bugfix for mapping user db
authorLijun Ou <oulijun@huawei.com>
Tue, 23 Apr 2019 09:30:26 +0000 (17:30 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 25 Apr 2019 13:40:04 +0000 (10:40 -0300)
commita23edfb5a2d44c147a0aaffe3042e891ec3efe77
treed24a5600944458223a3ba2b50a8c2371322a53eb
parentca830103527fe2ff32edceb4e7f58339c319ef9b
RDMA/hns: Bugfix for mapping user db

When the maximum send wr delivered by the user is zero, the qp does not
have a sq.

When allocating the sq db buffer to store the user sq pi pointer and map
it to the kernel mode, max_send_wr is used as the trigger condition, while
the kernel does not consider the max_send_wr trigger condition when
mapmping db. It will cause sq record doorbell map fail and create qp fail.

The failed print information as follows:

 hns3 0000:7d:00.1: Send cmd: tail - 418, opcode - 0x8504, flag - 0x0011, retval - 0x0000
 hns3 0000:7d:00.1: Send cmd: 0xe59dc000 0x00000000 0x00000000 0x00000000 0x00000116 0x0000ffff
 hns3 0000:7d:00.1: sq record doorbell map failed!
 hns3 0000:7d:00.1: Create RC QP failed

Fixes: fe3c0f88cb1d ("RDMA/hns: Support flush cqe for hip08 in kernel space")
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_qp.c