forked from luck/tmp_suning_uos_patched
RDMA/bnxt_re: Scan the whole bitmap when checking if "disabling RCFW with pending cmd-bit"
[ Upstream commit a917dfb66c0a1fa1caacf3d71edcafcab48e6ff0 ]
The 'cmdq->cmdq_bitmap' bitmap is 'rcfw->cmdq_depth' bits long. The size
stored in 'cmdq->bmap_size' is the size of the bitmap in bytes.
Remove this erroneous 'bmap_size' and use 'rcfw->cmdq_depth' directly in
'bnxt_qplib_disable_rcfw_channel()'. Otherwise some error messages may be
missing.
Other uses of 'cmdq_bitmap' already take into account 'rcfw->cmdq_depth'
directly.
Fixes: 1ac5a40479
("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Link: https://lore.kernel.org/r/47ed717c3070a1d0f53e7b4c768a4fd11caf365d.1636707421.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
84cd5c029d
commit
04a032ea24
|
@ -614,8 +614,6 @@ int bnxt_qplib_alloc_rcfw_channel(struct bnxt_qplib_res *res,
|
||||||
if (!cmdq->cmdq_bitmap)
|
if (!cmdq->cmdq_bitmap)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
cmdq->bmap_size = bmap_size;
|
|
||||||
|
|
||||||
/* Allocate one extra to hold the QP1 entries */
|
/* Allocate one extra to hold the QP1 entries */
|
||||||
rcfw->qp_tbl_size = qp_tbl_sz + 1;
|
rcfw->qp_tbl_size = qp_tbl_sz + 1;
|
||||||
rcfw->qp_tbl = kcalloc(rcfw->qp_tbl_size, sizeof(struct bnxt_qplib_qp_node),
|
rcfw->qp_tbl = kcalloc(rcfw->qp_tbl_size, sizeof(struct bnxt_qplib_qp_node),
|
||||||
|
@ -663,8 +661,8 @@ void bnxt_qplib_disable_rcfw_channel(struct bnxt_qplib_rcfw *rcfw)
|
||||||
iounmap(cmdq->cmdq_mbox.reg.bar_reg);
|
iounmap(cmdq->cmdq_mbox.reg.bar_reg);
|
||||||
iounmap(creq->creq_db.reg.bar_reg);
|
iounmap(creq->creq_db.reg.bar_reg);
|
||||||
|
|
||||||
indx = find_first_bit(cmdq->cmdq_bitmap, cmdq->bmap_size);
|
indx = find_first_bit(cmdq->cmdq_bitmap, rcfw->cmdq_depth);
|
||||||
if (indx != cmdq->bmap_size)
|
if (indx != rcfw->cmdq_depth)
|
||||||
dev_err(&rcfw->pdev->dev,
|
dev_err(&rcfw->pdev->dev,
|
||||||
"disabling RCFW with pending cmd-bit %lx\n", indx);
|
"disabling RCFW with pending cmd-bit %lx\n", indx);
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,6 @@ struct bnxt_qplib_cmdq_ctx {
|
||||||
wait_queue_head_t waitq;
|
wait_queue_head_t waitq;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned long *cmdq_bitmap;
|
unsigned long *cmdq_bitmap;
|
||||||
u32 bmap_size;
|
|
||||||
u32 seq_num;
|
u32 seq_num;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user