diff options
author | 2020-03-13 10:34:02 -0700 | |
---|---|---|
committer | 2020-03-24 20:15:36 -0300 | |
commit | b1d56fdcb66ebe6604166d71a26744d3cd03fecb (patch) | |
tree | 70276e8461ba051f3a2d78f0e4a6753e1c31956e /drivers/infiniband/hw/bnxt_re/qplib_fp.h | |
parent | IB/mlx5: Fix a NULL vs IS_ERR() check (diff) | |
download | wireguard-linux-b1d56fdcb66ebe6604166d71a26744d3cd03fecb.tar.xz wireguard-linux-b1d56fdcb66ebe6604166d71a26744d3cd03fecb.zip |
RDMA/bnxt_re: Wait for all the CQ events before freeing CQ data structures
Destroy CQ command to firmware returns the num_cnq_events as a
response. This indicates the driver about the number of CQ events
generated for this CQ. Driver should wait for all these events before
freeing the CQ host structures. Also, add routine to clean all the
pending notification for the CQs getting destroyed. This avoids the
possibility of accessing the CQ data structures after its freed.
Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Link: https://lore.kernel.org/r/1584120842-3200-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/qplib_fp.h')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/qplib_fp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.h b/drivers/infiniband/hw/bnxt_re/qplib_fp.h index 9e8d1c5c3f4a..7edb70b6bb16 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.h +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.h @@ -402,6 +402,7 @@ struct bnxt_qplib_cq { * of the same QP while manipulating the flush list. */ spinlock_t flush_lock; /* QP flush management */ + u16 cnq_events; }; #define BNXT_QPLIB_MAX_IRRQE_ENTRY_SIZE sizeof(struct xrrq_irrq) |