diff options
author | Artemy Kovalyov <artemyko@mellanox.com> | 2017-08-17 15:52:04 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-29 08:30:16 -0400 |
commit | 1a56ff6daab1e062aadec582eb10e7090f0b370a (patch) | |
tree | a5e7a7eeb312c918be624fc61e572f5b5d535f76 /drivers/infiniband/hw/mlx4/srq.c | |
parent | 6938fc1ee07e54c057430005f8dcaccabce027c3 (diff) | |
download | op-kernel-dev-1a56ff6daab1e062aadec582eb10e7090f0b370a.zip op-kernel-dev-1a56ff6daab1e062aadec582eb10e7090f0b370a.tar.gz |
IB/core: Separate CQ handle in SRQ context
Before this change CQ attached to SRQ was part of XRC specific extension.
Moving CQ handle out makes it available to other types extending SRQ
functionality.
Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Reviewed-by: Yossi Itigin <yosefe@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/srq.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/srq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c index dd7a2fc..ebee56c 100644 --- a/drivers/infiniband/hw/mlx4/srq.c +++ b/drivers/infiniband/hw/mlx4/srq.c @@ -178,8 +178,8 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, } } - cqn = (init_attr->srq_type == IB_SRQT_XRC) ? - to_mcq(init_attr->ext.xrc.cq)->mcq.cqn : 0; + cqn = ib_srq_has_cq(init_attr->srq_type) ? + to_mcq(init_attr->ext.cq)->mcq.cqn : 0; xrcdn = (init_attr->srq_type == IB_SRQT_XRC) ? to_mxrcd(init_attr->ext.xrc.xrcd)->xrcdn : (u16) dev->dev->caps.reserved_xrcds; |