Skip to content

Commit b5e81bf

Browse files
Roland DreierLinus Torvalds
authored andcommitted
[PATCH] IB uverbs: update kernel midlayer for new API
Update kernel InfiniBand midlayer to compile against the updated API for low-level drivers. This just amounts to passing NULL for all userspace-related parameters, and setting userspace-related structure members to NULL. Signed-off-by: Roland Dreier <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent e2773c0 commit b5e81bf

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

drivers/infiniband/core/verbs.c

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (c) 2004 Intel Corporation. All rights reserved.
55
* Copyright (c) 2004 Topspin Corporation. All rights reserved.
66
* Copyright (c) 2004 Voltaire Corporation. All rights reserved.
7+
* Copyright (c) 2005 Cisco Systems. All rights reserved.
78
*
89
* This software is available to you under a choice of one of two
910
* licenses. You may choose to be licensed under the terms of the GNU
@@ -47,10 +48,11 @@ struct ib_pd *ib_alloc_pd(struct ib_device *device)
4748
{
4849
struct ib_pd *pd;
4950

50-
pd = device->alloc_pd(device);
51+
pd = device->alloc_pd(device, NULL, NULL);
5152

5253
if (!IS_ERR(pd)) {
53-
pd->device = device;
54+
pd->device = device;
55+
pd->uobject = NULL;
5456
atomic_set(&pd->usecnt, 0);
5557
}
5658

@@ -76,8 +78,9 @@ struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr)
7678
ah = pd->device->create_ah(pd, ah_attr);
7779

7880
if (!IS_ERR(ah)) {
79-
ah->device = pd->device;
80-
ah->pd = pd;
81+
ah->device = pd->device;
82+
ah->pd = pd;
83+
ah->uobject = NULL;
8184
atomic_inc(&pd->usecnt);
8285
}
8386

@@ -122,14 +125,15 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
122125
{
123126
struct ib_qp *qp;
124127

125-
qp = pd->device->create_qp(pd, qp_init_attr);
128+
qp = pd->device->create_qp(pd, qp_init_attr, NULL);
126129

127130
if (!IS_ERR(qp)) {
128131
qp->device = pd->device;
129132
qp->pd = pd;
130133
qp->send_cq = qp_init_attr->send_cq;
131134
qp->recv_cq = qp_init_attr->recv_cq;
132135
qp->srq = qp_init_attr->srq;
136+
qp->uobject = NULL;
133137
qp->event_handler = qp_init_attr->event_handler;
134138
qp->qp_context = qp_init_attr->qp_context;
135139
qp->qp_type = qp_init_attr->qp_type;
@@ -197,10 +201,11 @@ struct ib_cq *ib_create_cq(struct ib_device *device,
197201
{
198202
struct ib_cq *cq;
199203

200-
cq = device->create_cq(device, cqe);
204+
cq = device->create_cq(device, cqe, NULL, NULL);
201205

202206
if (!IS_ERR(cq)) {
203207
cq->device = device;
208+
cq->uobject = NULL;
204209
cq->comp_handler = comp_handler;
205210
cq->event_handler = event_handler;
206211
cq->cq_context = cq_context;
@@ -245,8 +250,9 @@ struct ib_mr *ib_get_dma_mr(struct ib_pd *pd, int mr_access_flags)
245250
mr = pd->device->get_dma_mr(pd, mr_access_flags);
246251

247252
if (!IS_ERR(mr)) {
248-
mr->device = pd->device;
249-
mr->pd = pd;
253+
mr->device = pd->device;
254+
mr->pd = pd;
255+
mr->uobject = NULL;
250256
atomic_inc(&pd->usecnt);
251257
atomic_set(&mr->usecnt, 0);
252258
}
@@ -267,8 +273,9 @@ struct ib_mr *ib_reg_phys_mr(struct ib_pd *pd,
267273
mr_access_flags, iova_start);
268274

269275
if (!IS_ERR(mr)) {
270-
mr->device = pd->device;
271-
mr->pd = pd;
276+
mr->device = pd->device;
277+
mr->pd = pd;
278+
mr->uobject = NULL;
272279
atomic_inc(&pd->usecnt);
273280
atomic_set(&mr->usecnt, 0);
274281
}
@@ -344,8 +351,9 @@ struct ib_mw *ib_alloc_mw(struct ib_pd *pd)
344351

345352
mw = pd->device->alloc_mw(pd);
346353
if (!IS_ERR(mw)) {
347-
mw->device = pd->device;
348-
mw->pd = pd;
354+
mw->device = pd->device;
355+
mw->pd = pd;
356+
mw->uobject = NULL;
349357
atomic_inc(&pd->usecnt);
350358
}
351359

0 commit comments

Comments
 (0)