<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Roland Dreier &lt;rolandd@cisco.com&gt;

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 &lt;rolandd@cisco.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 drivers/infiniband/core/verbs.c |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff -puN drivers/infiniband/core/verbs.c~ib-uverbs-update-kernel-midlayer-for-new-api drivers/infiniband/core/verbs.c
--- 25/drivers/infiniband/core/verbs.c~ib-uverbs-update-kernel-midlayer-for-new-api	Tue Jun 28 16:51:23 2005
+++ 25-akpm/drivers/infiniband/core/verbs.c	Tue Jun 28 16:51:23 2005
@@ -4,6 +4,7 @@
  * Copyright (c) 2004 Intel Corporation.  All rights reserved.
  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
  * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
+ * Copyright (c) 2005 Cisco Systems.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * 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_devi
 {
 	struct ib_pd *pd;
 
-	pd = device-&gt;alloc_pd(device);
+	pd = device-&gt;alloc_pd(device, NULL, NULL);
 
 	if (!IS_ERR(pd)) {
-		pd-&gt;device = device;
+		pd-&gt;device  = device;
+		pd-&gt;uobject = NULL;
 		atomic_set(&amp;pd-&gt;usecnt, 0);
 	}
 
@@ -76,8 +78,9 @@ struct ib_ah *ib_create_ah(struct ib_pd 
 	ah = pd-&gt;device-&gt;create_ah(pd, ah_attr);
 
 	if (!IS_ERR(ah)) {
-		ah-&gt;device = pd-&gt;device;
-		ah-&gt;pd     = pd;
+		ah-&gt;device  = pd-&gt;device;
+		ah-&gt;pd      = pd;
+		ah-&gt;uobject = NULL;
 		atomic_inc(&amp;pd-&gt;usecnt);
 	}
 
@@ -122,7 +125,7 @@ struct ib_qp *ib_create_qp(struct ib_pd 
 {
 	struct ib_qp *qp;
 
-	qp = pd-&gt;device-&gt;create_qp(pd, qp_init_attr);
+	qp = pd-&gt;device-&gt;create_qp(pd, qp_init_attr, NULL);
 
 	if (!IS_ERR(qp)) {
 		qp-&gt;device     	  = pd-&gt;device;
@@ -130,6 +133,7 @@ struct ib_qp *ib_create_qp(struct ib_pd 
 		qp-&gt;send_cq    	  = qp_init_attr-&gt;send_cq;
 		qp-&gt;recv_cq    	  = qp_init_attr-&gt;recv_cq;
 		qp-&gt;srq	       	  = qp_init_attr-&gt;srq;
+		qp-&gt;uobject       = NULL;
 		qp-&gt;event_handler = qp_init_attr-&gt;event_handler;
 		qp-&gt;qp_context    = qp_init_attr-&gt;qp_context;
 		qp-&gt;qp_type	  = qp_init_attr-&gt;qp_type;
@@ -197,10 +201,11 @@ struct ib_cq *ib_create_cq(struct ib_dev
 {
 	struct ib_cq *cq;
 
-	cq = device-&gt;create_cq(device, cqe);
+	cq = device-&gt;create_cq(device, cqe, NULL, NULL);
 
 	if (!IS_ERR(cq)) {
 		cq-&gt;device        = device;
+		cq-&gt;uobject       = NULL;
 		cq-&gt;comp_handler  = comp_handler;
 		cq-&gt;event_handler = event_handler;
 		cq-&gt;cq_context    = cq_context;
@@ -245,8 +250,9 @@ struct ib_mr *ib_get_dma_mr(struct ib_pd
 	mr = pd-&gt;device-&gt;get_dma_mr(pd, mr_access_flags);
 
 	if (!IS_ERR(mr)) {
-		mr-&gt;device = pd-&gt;device;
-		mr-&gt;pd     = pd;
+		mr-&gt;device  = pd-&gt;device;
+		mr-&gt;pd      = pd;
+		mr-&gt;uobject = NULL;
 		atomic_inc(&amp;pd-&gt;usecnt);
 		atomic_set(&amp;mr-&gt;usecnt, 0);
 	}
@@ -267,8 +273,9 @@ struct ib_mr *ib_reg_phys_mr(struct ib_p
 				     mr_access_flags, iova_start);
 
 	if (!IS_ERR(mr)) {
-		mr-&gt;device = pd-&gt;device;
-		mr-&gt;pd     = pd;
+		mr-&gt;device  = pd-&gt;device;
+		mr-&gt;pd      = pd;
+		mr-&gt;uobject = NULL;
 		atomic_inc(&amp;pd-&gt;usecnt);
 		atomic_set(&amp;mr-&gt;usecnt, 0);
 	}
@@ -344,8 +351,9 @@ struct ib_mw *ib_alloc_mw(struct ib_pd *
 
 	mw = pd-&gt;device-&gt;alloc_mw(pd);
 	if (!IS_ERR(mw)) {
-		mw-&gt;device = pd-&gt;device;
-		mw-&gt;pd     = pd;
+		mw-&gt;device  = pd-&gt;device;
+		mw-&gt;pd      = pd;
+		mw-&gt;uobject = NULL;
 		atomic_inc(&amp;pd-&gt;usecnt);
 	}
 
_
</pre></body></html>