RDMA/qedr: Fix srqs xarray initialization

This change “RDMA/qedr: Fix srqs xarray initialization” (commit 73ab512) in Linux kernel is authored by Michal Kalderon <michal.kalderon [at] marvell.com> on Sun Oct 27 22:04:48 2019 +0200.

Description of "RDMA/qedr: Fix srqs xarray initialization"

The change “RDMA/qedr: Fix srqs xarray initialization” introduces changes as follows.

RDMA/qedr: Fix srqs xarray initialization

There was a missing initialization for the srqs xarray.
SRQs xarray can also be called from irq context when searching
for an element and uses the xa_XXX_irq apis, therefore should
be initialized with IRQ flags.

Fixes: 9fd15987ed27 ("qedr: Convert srqidr to XArray")
Link: https://lore.kernel.org/r/20191027200451.28187-2-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>

Linux kernel releases containing commit 73ab512

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "RDMA/qedr: Fix srqs xarray initialization"

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/infiniband/hw/qedr/main.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c
index 5136b835e1ba..aa0bda428690 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -357,6 +357,7 @@ static int qedr_alloc_resources(struct qedr_dev *dev)
 		return -ENOMEM;
+	xa_init_flags(&dev->srqs, XA_FLAGS_LOCK_IRQ);
 	if (IS_IWARP(dev)) {
 		xa_init_flags(&dev->qps, XA_FLAGS_LOCK_IRQ);

The commit for this change in Linux stable tree is 73ab512 (patch).

Last modified: 2020/02/08