diff options
author | Matan Barak <matanb@mellanox.com> | 2015-06-11 15:35:21 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-06-12 20:49:10 +0200 |
commit | 8e37210b38fb7d6aa06aebde763316ee955d44c0 (patch) | |
tree | 2ef8854af886906e1901e7c6f0b93a28ae515c6e /drivers/infiniband/core/mad.c | |
parent | IB/core: Change provider's API of create_cq to be extendible (diff) | |
download | linux-8e37210b38fb7d6aa06aebde763316ee955d44c0.tar.xz linux-8e37210b38fb7d6aa06aebde763316ee955d44c0.zip |
IB/core: Change ib_create_cq to use struct ib_cq_init_attr
Currently, ib_create_cq uses cqe and comp_vecotr instead
of the extendible ib_cq_init_attr struct.
Earlier patches already changed the vendors to work with
ib_cq_init_attr. This patch changes the consumers too.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/mad.c')
-rw-r--r-- | drivers/infiniband/core/mad.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 600af266838c..533c0b2e7a63 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -2923,6 +2923,7 @@ static int ib_mad_port_open(struct ib_device *device, unsigned long flags; char name[sizeof "ib_mad123"]; int has_smi; + struct ib_cq_init_attr cq_attr = {}; /* Create new device info */ port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL); @@ -2943,9 +2944,10 @@ static int ib_mad_port_open(struct ib_device *device, if (has_smi) cq_size *= 2; + cq_attr.cqe = cq_size; port_priv->cq = ib_create_cq(port_priv->device, ib_mad_thread_completion_handler, - NULL, port_priv, cq_size, 0); + NULL, port_priv, &cq_attr); if (IS_ERR(port_priv->cq)) { dev_err(&device->dev, "Couldn't create ib_mad CQ\n"); ret = PTR_ERR(port_priv->cq); |