RDMA/bnxt_re: Fix query SRQ failure
authorSelvin Xavier <selvin.xavier@broadcom.com>
Wed, 15 Sep 2021 12:32:38 +0000 (05:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:47 +0000 (19:16 +0100)
[ Upstream commit 598d16fa1bf93431ad35bbab3ed1affe4fb7b562 ]

Fill the missing parameters for the FW command while querying SRQ.

Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Link: https://lore.kernel.org/r/1631709163-2287-8-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/bnxt_re/qplib_fp.c

index d4d4959c2434ce47e2416c3eb859a6c3b867be16..bd153aa7e9ab3e4fbab961c8cfe4c74812ebb04e 100644 (file)
@@ -707,12 +707,13 @@ int bnxt_qplib_query_srq(struct bnxt_qplib_res *res,
        int rc = 0;
 
        RCFW_CMD_PREP(req, QUERY_SRQ, cmd_flags);
-       req.srq_cid = cpu_to_le32(srq->id);
 
        /* Configure the request */
        sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb));
        if (!sbuf)
                return -ENOMEM;
+       req.resp_size = sizeof(*sb) / BNXT_QPLIB_CMDQE_UNITS;
+       req.srq_cid = cpu_to_le32(srq->id);
        sb = sbuf->sb;
        rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp,
                                          (void *)sbuf, 0);