[openib-general] [PATCH] GSI: Replace VD_xxx calls and use KERN_ levels in printk calls

Hal Rosenstock halr at voltaire.com
Tue Aug 3 15:04:26 PDT 2004


Replace VD_xxx calls with printk calls
Add KERN_xxx levels to printk calls
Also, eliminated need for debug_support.h 

Index: gsi_main.c
===================================================================
--- gsi_main.c	(revision 561)
+++ gsi_main.c	(working copy)
@@ -65,7 +65,6 @@
 
 #include "mad.h"
 #define VD_MAIN_MODULE
-#include "debug_support.h"
 #include "gsi.h"
 #include "gsi_priv.h"
 #if 0				/* GSI_REDIRECT */
@@ -238,10 +237,8 @@
 	int attr_mask;
 	struct ib_qp_cap qp_cap;
 
-	VD_ENTERFUNC();
-
 	if (!(attr = kmalloc(sizeof (*attr), GFP_KERNEL))) {
-		VD_TRACE(VD_ERROR, "Could not alloc mem for ib_qp_attr\n");
+		printk(KERN_ERR "Could not alloc mem for ib_qp_attr\n");
 		return -ENOMEM;
 	}
 
@@ -254,7 +251,7 @@
 	ret = ib_modify_qp(qp, attr, attr_mask, &qp_cap);
 	kfree(attr);
 
-	VD_LEAVEFUNC("ret = %d\n", ret);
+	printk(KERN_DEBUG "ret = %d\n", ret);
 	return ret;
 }
 
@@ -269,10 +266,8 @@
 	int attr_mask;
 	struct ib_qp_cap qp_cap;
 
-	VD_ENTERFUNC();
-
 	if (!(attr = kmalloc(sizeof (*attr), GFP_KERNEL))) {
-		VD_TRACE(VD_ERROR, "Could not alloc mem for ib_qp_attr\n");
+		printk(KERN_ERR "Could not alloc mem for ib_qp_attr\n");
 		return -ENOMEM;
 	}
 
@@ -282,7 +277,7 @@
 	ret = ib_modify_qp(qp, attr, attr_mask, &qp_cap);
 	kfree(attr);
 
-	VD_LEAVEFUNC("ret = %d\n", ret);
+	printk(KERN_DEBUG "ret = %d\n", ret);
 	return ret;
 }
 
@@ -297,10 +292,8 @@
 	int attr_mask;
 	struct ib_qp_cap qp_cap;
 
-	VD_ENTERFUNC();
-
 	if (!(attr = kmalloc(sizeof (*attr), GFP_KERNEL))) {
-		VD_TRACE(VD_ERROR, "Could not alloc mem for ib_qp_attr\n");
+		printk(KERN_ERR "Could not alloc mem for ib_qp_attr\n");
 		return -ENOMEM;
 	}
 
@@ -311,7 +304,7 @@
 	ret = ib_modify_qp(qp, attr, attr_mask, &qp_cap);
 	kfree(attr);
 
-	VD_LEAVEFUNC("ret = %d\n", ret);
+	printk(KERN_DEBUG "ret = %d\n", ret);
 	return ret;
 }
 
@@ -326,10 +319,8 @@
 	int attr_mask;
 	struct ib_qp_cap qp_cap;
 
-	VD_ENTERFUNC();
-
 	if (!(attr = kmalloc(sizeof (*attr), GFP_KERNEL))) {
-		VD_TRACE(VD_ERROR, "Could not alloc mem for ib_qp_attr\n");
+		printk(KERN_ERR "Could not alloc mem for ib_qp_attr\n");
 		return -ENOMEM;
 	}
 
@@ -339,7 +330,7 @@
 	ret = ib_modify_qp(qp, attr, attr_mask, &qp_cap);
 	kfree(attr);
 
-	VD_LEAVEFUNC("ret = %d\n", ret);
+	printk(KERN_DEBUG "ret = %d\n", ret);
 	return ret;
 }
 
@@ -351,8 +342,6 @@
 {
 	struct gsi_dtgrm_priv_st *dtgrm;
 
-	VD_ENTERFUNC();
-
 	/*
 	 * Get the posted datagrams
 	 * and return it to pool.
@@ -368,7 +357,6 @@
 	}
 	INIT_LIST_HEAD(&hca->rcv_posted_dtgrm_list);
 	hca->stat.rcv_posted_cnt = 0;
-	VD_LEAVEFUNC();
 }
 
 static void
@@ -378,7 +366,6 @@
 	struct mad_t *mad;
 	GSI_SND_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
 	GSI_SND_LIST_LOCK(class_info->hca);
 	while (!list_empty(&class_info->snd_posted_dtgrm_list)) {
 		dtgrm_priv =
@@ -406,14 +393,13 @@
 						  (struct gsi_dtgrm_t *)
 						  dtgrm_priv);
 		else {
-			VD_TRACE(VD_ERROR, "No callback registered\n");
+			printk(KERN_ERR "No callback registered\n");
 			gsi_dtgrm_pool_put((struct gsi_dtgrm_t *) dtgrm_priv);
 		}
 		GSI_SND_LIST_LOCK(class_info->hca);
 	}
 	INIT_LIST_HEAD(&class_info->snd_posted_dtgrm_list);
 	GSI_SND_LIST_UNLOCK(class_info->hca);
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -425,7 +411,6 @@
 {
 	struct gsi_redirect_info_st *redirect_info = NULL;
 
-	VD_ENTERFUNC();
 	while (!list_empty(&class_info->redirect_class_port_info_list)) {
 		redirect_info =
 		    (struct gsi_redirect_info_st *) class_info->
@@ -439,7 +424,6 @@
 
 		kfree(redirect_info);
 	}
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -452,8 +436,6 @@
 	struct gsi_serv_class_info_st *class_info, *head =
 	    (struct gsi_serv_class_info_st *) &gsi_class_list;
 
-	VD_ENTERFUNC();
-
 	gsi_get_all_classes();
 
 	list_for_each(class_info, head) {
@@ -465,7 +447,6 @@
 
 	gsi_put_all_classes();
 
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -481,8 +462,6 @@
 	struct gsi_dtgrm_priv_st *dtgrm_priv;
 	GSI_RCV_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	/*
 	 * Get all datagrams from the pool and
 	 * submit receive work requests
@@ -495,7 +474,7 @@
 						IB_MR_LOCAL_WRITE,
 						&dtgrm_priv->sg.lkey, &rkey);
 		if (IS_ERR(dtgrm_priv->v_mem_h)) {
-			VD_TRACE(VD_ERROR,
+			printk(KERN_ERR \
 				 "Could not get general memory region\n");
 			ret = PTR_ERR(dtgrm_priv->v_mem_h);
 			goto error1;
@@ -518,14 +497,12 @@
 		GSI_RCV_LIST_UNLOCK(hca);
 
 		if (!(ret = ib_post_recv(hca->qp, &wr, &bad_wr))) {
-			VD_TRACE(VD_ERROR, "Could not post receive request\n");
+			printk(KERN_ERR "Could not post receive request\n");
 			goto error2;
 		}
 		hca->stat.rcv_posted_cnt++;
 	}
 
-	VD_LEAVEFUNC();
-
 	return 0;
 
 error2:
@@ -535,7 +512,7 @@
 error1:
 	gsi_dtgrm_pool_put((struct gsi_dtgrm_t *) dtgrm_priv);
 
-	VD_LEAVEFUNC("ret = %d\n", ret);
+	printk(KERN_DEBUG "ret = %d\n", ret);
 
 	return ret;
 }
@@ -560,39 +537,35 @@
 {
 	int ret = 0;
 
-	VD_ENTERFUNC();
-
 	if ((ret = gsi_change_qp_state_to_init(hca->handle,
 					       hca->qp, hca->port))) {
-		VD_TRACE(VD_ERROR, "Could not change QP state to INIT\n");
+		printk(KERN_ERR "Could not change QP state to INIT\n");
 		return (ret);
 	}
 
 	if ((ret = gsi_post_receive_dtgrms(hca))) {
-		VD_TRACE(VD_ERROR, "Could not post receive requests\n");
+		printk(KERN_ERR "Could not post receive requests\n");
 		goto error;
 	}
 
 	if ((ret = ib_req_notify_cq(hca->cq, IB_CQ_NEXT_COMP))) {
-		VD_TRACE(VD_ERROR,
+		printk(KERN_ERR \
 			 "Failed to request completion notification\n");
 		goto error;
 	}
 
 	if ((ret = gsi_change_qp_state_to_rtr(hca->handle, hca->qp))) {
-		VD_TRACE(VD_ERROR, "Could not change QP state to RTR\n");
+		printk(KERN_ERR "Could not change QP state to RTR\n");
 		goto error;
 	}
 
 	if ((ret = gsi_change_qp_state_to_rts(hca->handle, hca->qp))) {
-		VD_TRACE(VD_ERROR, "Could not change QP state to RTS\n");
+		printk(KERN_ERR "Could not change QP state to RTS\n");
 		goto error;
 	}
 
 	GSI_HCA_SET_UP(hca);
 
-	VD_LEAVEFUNC();
-
 	return 0;
 
 error:
@@ -608,8 +581,6 @@
 static int
 gsi_hca_stop(struct gsi_hca_info_st *hca)
 {
-	VD_ENTERFUNC();
-
 	GSI_HCA_SET_DOWN(hca);
 
 	gsi_change_qp_state_to_reset(hca->handle, hca->qp);
@@ -617,8 +588,6 @@
 	gsi_return_posted_rcv_dtgrms(hca);
 	gsi_return_posted_snd_dtgrms(hca);
 
-	VD_LEAVEFUNC();
-
 	return 0;
 }
 
@@ -627,19 +596,16 @@
 {
 	int ret;
 
-	VD_ENTERFUNC();
-
 	if ((ret = gsi_hca_stop(hca)))
-		VD_TRACE(VD_ERROR, "Could not stop %s/%d\n", hca->handle->name,
+		printk(KERN_ERR "Could not stop %s/%d\n", hca->handle->name,
 			 hca->port);
 	else {
 		if ((ret = gsi_hca_start(hca)))
-			VD_TRACE(VD_ERROR, "Could not start %s/%d\n",
+			printk(KERN_ERR "Could not start %s/%d\n",
 				 hca->handle->name, hca->port);
 	}
 
 	hca->stat.restart_cnt++;
-	VD_LEAVEFUNC();
 
 	return ret;
 }
@@ -654,17 +620,14 @@
 {
 	GSI_HCA_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	if (hca == NULL) {
-		VD_TRACE(VD_ERROR, "hca == NULL\n");
-		VD_LEAVEFUNC();
+		printk(KERN_ERR "hca == NULL\n");
 		return -ENODEV;
 	}
 
 	GSI_HCA_LIST_LOCK();
 	if (--hca->ref_cnt > 0) {
-		VD_LEAVEFUNC("cnt - %d\n", hca->ref_cnt);
+		printk(KERN_DEBUG "cnt - %d\n", hca->ref_cnt);
 		GSI_HCA_LIST_UNLOCK();
 		return 0;
 	}
@@ -679,8 +642,6 @@
 	ib_destroy_cq(hca->cq);
 	kfree(hca);
 
-	VD_LEAVEFUNC();
-
 	return 0;
 }
 
@@ -699,8 +660,6 @@
 	struct ib_qp_cap qp_cap;
 	GSI_HCA_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	/*
 	 * First check if HCA already open for GSI
 	 */
@@ -719,12 +678,11 @@
 	if (hca) {
 		hca->ref_cnt++;
 		*hca_info = hca;
-		VD_TRACE(VD_DEBUG, "Already open\n");
+		printk(KERN_DEBUG "Already open\n");
 	}
 	GSI_HCA_LIST_UNLOCK();
 
 	if (hca) {
-		VD_LEAVEFUNC();
 		return 0;
 	}
 
@@ -732,8 +690,7 @@
 	 * Create new HCA info
 	 */
 	if ((hca = kmalloc(sizeof (*hca), GFP_KERNEL)) == NULL) {
-		VD_TRACE(VD_ERROR, "Memory allocation error\n");
-		VD_LEAVEFUNC();
+		printk(KERN_ERR "Memory allocation error\n");
 		return -ENOMEM;
 	}
 
@@ -751,14 +708,14 @@
 			       (ib_comp_handler) gsi_thread_compl_cb,
 			       (void *) hca, &cq_size);
 	if (IS_ERR(hca->cq)) {
-		VD_TRACE(VD_ERROR, "Could not create receive CQ.\n");
+		printk(KERN_ERR "Could not create receive CQ.\n");
 		ret = PTR_ERR(hca->cq);
 		goto error3;
 	}
 
 	hca->pd = ib_alloc_pd(device);
 	if (IS_ERR(hca->pd)) {
-		VD_TRACE(VD_ERROR, "Could not allocate protection domain.\n");
+		printk(KERN_ERR "Could not allocate protection domain.\n");
 		ret = PTR_ERR(hca->pd);
 		goto error4;
 	}
@@ -783,16 +740,16 @@
 			      &qp_cap);
 #endif
 	if (IS_ERR(hca->qp)) {
-		VD_TRACE(VD_ERROR, "Could not create QP.\n");
+		printk(KERN_ERR "Could not create QP.\n");
 		ret = PTR_ERR(hca->qp);
 		goto error5;
 	}
 
-	VD_TRACE(VD_DEBUG, "Created QP - %d\n", qp_attr.create_return.qp_num);
+	printk(KERN_DEBUG "Created QP - %d\n", hca->qp->qp_num);
 
 	if ((ret = gsi_dtgrm_pool_create(GSI_QP_RCV_SIZE,
 					 &hca->rcv_dtgrm_pool)) < 0) {
-		VD_TRACE(VD_ERROR, "Could not create datagram pool\n");
+		printk(KERN_ERR "Could not create datagram pool\n");
 		goto error6;
 	}
 
@@ -804,7 +761,7 @@
 	gsi_thread_init(hca);
 
 	if ((ret = gsi_hca_start(hca))) {
-		VD_TRACE(VD_ERROR, "Could not start device\n");
+		printk(KERN_ERR "Could not start device\n");
 		goto error7;
 	}
 
@@ -812,8 +769,6 @@
 	list_add_tail((struct list_head *) hca, &gsi_hca_list);
 	GSI_HCA_LIST_UNLOCK();
 
-	VD_LEAVEFUNC();
-
 	return 0;
 
 error7:
@@ -829,8 +784,6 @@
 error3:
 	kfree(hca);
 
-	VD_LEAVEFUNC();
-
 	return ret;
 }
 
@@ -852,15 +805,13 @@
 #endif
 	GSI_CLASS_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	if (rmpp) {
-		VD_TRACE(VD_ERROR, "RMPP not supported yet");
+		printk(KERN_ERR "RMPP not supported yet");
 		return -EPERM;
 	}
 
 	if ((ret = gsi_hca_open(device, &hca, port))) {
-		VD_TRACE(VD_ERROR, "Cannot open HCA\n");
+		printk(KERN_ERR "Cannot open HCA\n");
 		goto error1;
 	}
 
@@ -871,7 +822,7 @@
 		if ((server_info =
 		     gsi_get_class_info(class, hca, GSI_SERVER_ID)) != NULL) {
 			gsi_put_class_info(server_info);
-			VD_TRACE(VD_ERROR,
+			printk(KERN_ERR \
 				 "Agent already registered for this class -(0x%x)!\n",
 				 class);
 			ret = -EBUSY;
@@ -888,7 +839,7 @@
 		if ((ret = gsi_register_redirection(hca_name,
 						    hca->port,
 						    class, &class_port_info))) {
-			VD_TRACE(VD_ERROR,
+			printk(KERN_ERR \
 				 "Could not register redirection for class (0x%x)!\n",
 				 class);
 			goto error2;
@@ -897,7 +848,7 @@
 	}
 
 	if (!(newinfo = kmalloc(sizeof (*newinfo), GFP_KERNEL))) {
-		VD_TRACE(VD_ERROR, "Memory allocation error\n");
+		printk(KERN_ERR "Memory allocation error\n");
 		ret = -ENOMEM;
 		goto error2;
 	}
@@ -924,7 +875,7 @@
 	if (rmpp) {
 		if (gsi_dtgrm_pool_create(GSI_RMPP_RCV_POOL_SIZE,
 					  &newinfo->rmpp_rcv_dtgrm_pool) < 0) {
-			VD_TRACE(VD_ERROR,
+			printk(KERN_ERR \
 				 "Could not create RMPP receive pool\n");
 			ret = -ENOMEM;
 			goto error3;
@@ -933,7 +884,7 @@
 		if (gsi_dtgrm_pool_create
 		    (GSI_RMPP_SND_POOL_SIZE,
 		     &newinfo->rmpp_snd_dtgrm_pool) < 0) {
-			VD_TRACE(VD_ERROR, "Could not create RMPP send pool\n");
+			printk(KERN_ERR "Could not create RMPP send pool\n");
 			ret = -ENOMEM;
 			goto error4;
 		}
@@ -942,14 +893,14 @@
 						     gsi_rmpp_receive_cb,
 						     gsi_rmpp_send_compl_cb)) ==
 		    NULL) {
-			VD_TRACE(VD_ERROR,
+			printk(KERN_ERR \
 				 "Could not register RMPP service for class (0x%x)!\n",
 				 class);
 			ret = -EPERM;
 			goto error5;
 		}
 
-		VD_TRACE(VD_DEBUG, "Registered RMPP service for class (0x%x)\n",
+		printk(KERN_DEBUG "Registered RMPP service for class (0x%x)\n",
 			 class);
 	}
 
@@ -957,10 +908,9 @@
 	list_add_tail((struct list_head *) newinfo, &gsi_class_list);
 	GSI_CLASS_UNLOCK();
 
-	VD_TRACE(VD_DEBUG, "Registered class-%d, client id-%d\n",
+	printk(KERN_DEBUG "Registered class-%d, client id-%d\n",
 		 newinfo->class, newinfo->client_id);
 
-	VD_LEAVEFUNC();
 	return 0;
 
 error5:
@@ -974,7 +924,6 @@
 error2:
 	gsi_hca_close(hca);
 error1:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
@@ -988,11 +937,9 @@
 	    (struct gsi_serv_class_info_st *) handle;
 	GSI_CLASS_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	GSI_CLASS_LOCK();
 	if (class_info->ref_cnt) {
-		VD_TRACE(VD_ERROR,
+		printk(KERN_ERR \
 			 "Class in use! Cannot deregister class. Try later.\n");
 		GSI_CLASS_UNLOCK();
 		return -EPERM;
@@ -1003,7 +950,7 @@
 
 	if (class_info->rmpp) {
 		if (rmpp_deregister(class_info->rmpp_h) != RMPP_IB_SUCCESS) {
-			VD_TRACE(VD_ERROR,
+			printk(KERN_ERR \
 				 "Could not deregister RMPP service.\n");
 			GSI_CLASS_LOCK();
 			list_add_tail((struct list_head *) class_info,
@@ -1021,8 +968,6 @@
 	gsi_hca_close(class_info->hca);
 	kfree(class_info);
 
-	VD_LEAVEFUNC();
-
 	return 0;
 }
 
@@ -1041,8 +986,6 @@
 	    (struct gsi_serv_class_info_st *) &gsi_class_list, *ret_info = NULL;
 	GSI_CLASS_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	GSI_CLASS_LOCK();
 	list_for_each(info, head) {
 		if (info->class == class &&
@@ -1054,7 +997,6 @@
 	}
 	GSI_CLASS_UNLOCK();
 
-	VD_LEAVEFUNC();
 	return ret_info;
 }
 
@@ -1094,14 +1036,11 @@
 	    (struct gsi_serv_class_info_st *) &gsi_class_list;
 	GSI_CLASS_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	GSI_CLASS_LOCK();
 	list_for_each(class_info, head) {
 		class_info->ref_cnt++;
 	}
 	GSI_CLASS_UNLOCK();
-	VD_LEAVEFUNC();
 }
 
 /* 
@@ -1114,14 +1053,11 @@
 	    (struct gsi_serv_class_info_st *) &gsi_class_list;
 	GSI_CLASS_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	GSI_CLASS_LOCK();
 	list_for_each(class_info, head) {
 		class_info->ref_cnt--;
 	}
 	GSI_CLASS_UNLOCK();
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -1138,8 +1074,6 @@
 	    NULL;
 	GSI_HCA_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	gsi_get_all_classes();
 
 	GSI_HCA_LIST_LOCK();
@@ -1155,16 +1089,13 @@
 	if (!ret_hca_info)
 		gsi_put_all_classes();
 
-	VD_LEAVEFUNC();
 	return ret_hca_info;
 }
 
 static void
 gsi_put_hca_info(struct gsi_hca_info_st *hca_info)
 {
-	VD_ENTERFUNC();
 	gsi_put_all_classes();
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -1197,27 +1128,25 @@
 	static struct ib_wc wc;
 	int err_status = 0;
 
-	VD_ENTERFUNC();
-
 	while (!ib_poll_cq(hca->cq, 1, &wc)) {
-		VD_TRACE(VD_DEBUG, "Completion - WR ID = 0x%Lx\n", wc.wr_id);
+		printk(KERN_DEBUG "Completion - WR ID = 0x%Lx\n", wc.wr_id);
 
 		if (wc.status != IB_WC_SUCCESS) {
 			switch (wc.opcode) {
 			case IB_WC_SEND:
-				VD_TRACE(VD_ERROR, "Send compl error: %d\n",
-					 wc.status)
+				printk(KERN_ERR "Send compl error: %d\n",
+					 wc.status);
 				    hca->stat.snd_err_cnt++;
 				break;
 			case IB_WC_RECV:
-				VD_TRACE(VD_ERROR, "Rcv compl error: %d\n",
+				printk(KERN_ERR "Rcv compl error: %d\n",
 					 wc.status);
 				hca->stat.rcv_err_cnt++;
 				break;
 			default:
-				VD_TRACE(VD_ERROR, "Wrong OPcode: %d\n",
+				printk(KERN_ERR "Wrong OPcode: %d\n",
 					 wc.opcode);
-				VD_TRACE(VD_ERROR, "Compl error: %d\n",
+				printk(KERN_ERR "Compl error: %d\n",
 					 wc.status);
 				break;
 			}
@@ -1228,7 +1157,7 @@
 		dtgrm_priv =
 		    (struct gsi_dtgrm_priv_st *) (unsigned long) wc.wr_id;
 
-		VD_TRACE(VD_DEBUG, "Completion - dgrm ptr = 0x%p\n",
+		printk(KERN_DEBUG "Completion - dgrm ptr = 0x%p\n",
 			 dtgrm_priv);
 		switch (wc.opcode) {
 		case IB_WC_SEND:
@@ -1238,7 +1167,7 @@
 			gsi_receive_cb(hca, dtgrm_priv, &wc);
 			break;
 		default:
-			VD_TRACE(VD_ERROR, "Wrong OPcode: %d\n", wc.opcode);
+			printk(KERN_DEBUG "Wrong Opcode: %d\n", wc.opcode);
 			break;
 		}
 	}
@@ -1250,7 +1179,6 @@
 		ib_req_notify_cq(hca->cq, IB_CQ_NEXT_COMP);
 	}
 
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -1264,8 +1192,6 @@
 	struct mad_t *mad = (struct mad_t *) &dtgrm_priv->mad;
 	GSI_SND_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 #if 0				/* GSI_ADDRESS_HNDL_POOL_SUPPORT */
 	ib_put_ah(dtgrm_priv->addr_hndl);
 #else
@@ -1288,7 +1214,7 @@
 	 * Exception:
 	 * If GSI_DONT_KEEP_SEND_MADS defined, 
 	 * MADs with Send() method are not kept.
-	 * Communication Manager version 1 uses only Send() methods and
+	 * Communication Manager (CM) uses only Send() methods and
 	 * never sets the response bit.
 	 * Every datagram will be in use for long time in this case.
 	 * Datagrams may finish during intensive communication.
@@ -1305,7 +1231,7 @@
 	    && mad->hdr.m.ms.method != MAD_MTHD_SEND
 #endif
 	    ) {
-		VD_TRACE(VD_DEBUG, "Request packet. Free resources later\n");
+		printk(KERN_DEBUG "Request packet. Free resources later\n");
 		mad_swap_header(mad);
 		GSI_SND_LIST_UNLOCK(hca);
 		return;
@@ -1328,10 +1254,9 @@
 	GSI_SND_LIST_UNLOCK(hca);
 
 	class_info = (struct gsi_serv_class_info_st *) dtgrm_priv->context;
-
 	if (class_info == NULL) {
 		/* This may happen for PLM (process local mad) */
-		VD_TRACE(VD_DEBUG,
+		printk(KERN_DEBUG \
 			 "No management class -%x associated with a sent MAD\n",
 			 mad->hdr.class);
 		gsi_dtgrm_pool_put((struct gsi_dtgrm_t *) dtgrm_priv);
@@ -1341,12 +1266,9 @@
 	/* Increase class use counter */
 	gsi_use_class_info(class_info);
 
-	/*
-	 * If the sent MAD is for RMPP -
-	 * handle it properly.
-	 */
+	/* If the sent MAD is for RMPP, handle it properly. */
 	if (gsi_is_rmpp_mad(class_info, (struct gsi_dtgrm_t *) dtgrm_priv)) {
-		VD_TRACE(VD_DEBUG, "RMPP segment send done\n");
+		printk(KERN_DEBUG "RMPP segment send done\n");
 		rmpp_mad_send_done(class_info->rmpp_h,
 				   dtgrm_priv->rmpp_context);
 		gsi_dtgrm_pool_put((struct gsi_dtgrm_t *) dtgrm_priv);
@@ -1355,13 +1277,12 @@
 					  class_info->context,
 					  (struct gsi_dtgrm_t *) dtgrm_priv);
 	} else {
-		VD_TRACE(VD_ERROR, "No callback registered\n");
+		printk(KERN_ERR "No callback registered\n");
 		gsi_dtgrm_pool_put((struct gsi_dtgrm_t *) dtgrm_priv);
 	}
 
 	gsi_put_class_info(class_info);
 
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -1371,10 +1292,8 @@
 static inline void
 gsi_sent_dtgrm_timer_run()
 {
-	VD_ENTERFUNC();
 	if (!atomic_dec_and_test(&gsi_sent_dtgrm_timer_running)) {
-		VD_TRACE(VD_DEBUG, "Timer already running\n");
-		VD_LEAVEFUNC();
+		printk(KERN_DEBUG "Timer already running\n");
 		return;
 	}
 
@@ -1384,7 +1303,6 @@
 	gsi_sent_dtgrm_timer.expires = jiffies + GSI_DGRM_LIFE_TIME;
 
 	add_timer(&gsi_sent_dtgrm_timer);
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -1393,16 +1311,13 @@
 static inline void
 gsi_sent_dtgrm_timer_stop()
 {
-	VD_ENTERFUNC();
 	if (atomic_dec_and_test(&gsi_sent_dtgrm_timer_running)) {
-		VD_TRACE(VD_DEBUG, "Timer not running\n");
+		printk(KERN_DEBUG "Timer not running\n");
 		atomic_inc(&gsi_sent_dtgrm_timer_running);
-		VD_LEAVEFUNC();
 		return;
 	}
 	del_timer_sync(&gsi_sent_dtgrm_timer);
 	atomic_set(&gsi_sent_dtgrm_timer_running, 1);
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -1419,7 +1334,6 @@
 	int run_timer_again = FALSE;
 	GSI_SND_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
 	gsi_get_all_classes();
 
 	INIT_LIST_HEAD(&sent_dtgrm_list);
@@ -1437,13 +1351,13 @@
 		     dtgrm !=
 		     (struct gsi_dtgrm_priv_st *) &class_info->
 		     snd_posted_dtgrm_list; dtgrm = dtgrm->next) {
-			VD_TRACE(VD_DEBUG, "Posted counter: %d \n",
+			printk(KERN_DEBUG "Posted counter: %d \n",
 				 dtgrm->posted);
 			if (!dtgrm->posted
 			    && dtgrm->time + GSI_DGRM_LIFE_TIME < jiffies) {
 				struct gsi_dtgrm_priv_st *dtgrm_tmp;
 
-				VD_TRACE(VD_DEBUG, "Remove the datagram\n");
+				printk(KERN_DEBUG "Remove the datagram\n");
 
 				dtgrm_tmp = dtgrm->prev;
 				v_list_del((struct list_head *) dtgrm);
@@ -1455,10 +1369,7 @@
 		}
 		GSI_SND_LIST_UNLOCK(class_info->hca);
 
-		/*
-		 * If there are datagrams in lists,
-		 * run the timer again.
-		 */
+		/* If there are datagrams in the lists, run the timer again. */
 		if (run_timer_again)
 			gsi_sent_dtgrm_timer_run();
 
@@ -1475,13 +1386,13 @@
 			mad_swap_header((struct mad_t *) &dtgrm->mad);
 
 			if (class_info->send_compl_cb) {
-				VD_TRACE(VD_DEBUG, "Call the callback\n");
+				printk(KERN_DEBUG "Calling the callback\n");
 				class_info->send_compl_cb(class_info,
 							  class_info->context,
 							  (struct gsi_dtgrm_t *)
 							  dtgrm);
 			} else {
-				VD_TRACE(VD_ERROR, "No callback registered\n");
+				printk(KERN_ERR "No callback registered\n");
 				gsi_dtgrm_pool_put((struct gsi_dtgrm_t *)
 						   dtgrm);
 			}
@@ -1489,14 +1400,13 @@
 	}
 
 	gsi_put_all_classes();
-	VD_LEAVEFUNC();
 }
 
 /*
  * Handle received response datagram.
  *
  * Look for corresponding request datagram waiting in the send datagram list.
- * If the received response datagram is a redirection request - resent the wating datagram.
+ * If the received response datagram is a redirection request - resend the waiting datagram.
  * For regular response - release the request datagram.
  */
 static void
@@ -1512,12 +1422,10 @@
 	GSI_SND_LIST_LOCK_VAR;
 	GSI_REDIR_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	*redirect = (int) mad->hdr.u.ns.status.s.redir_rqrd;
 
 	/*
-	 * Search if there are any request datagrams wating for this response.
+	 * Search if there are any request datagrams waiting for this response.
 	 */
 	GSI_SND_LIST_LOCK(class_info->hca);
 	list_for_each((struct list_head *) req_dtgrm,
@@ -1537,7 +1445,7 @@
 	 */
 	if ((struct list_head *) req_dtgrm ==
 	    &class_info->snd_posted_dtgrm_list) {
-		VD_TRACE(VD_DEBUG, "No corresponding request datagram.\n");
+		printk(KERN_DEBUG "No corresponding request datagram.\n");
 		goto out;
 	}
 
@@ -1553,14 +1461,14 @@
 
 	if (attrib_id != MAD_CLASS_ATTRIB_ID_CLASS_PORT_INFO
 	    || attrib_modifier != 0) {
-		VD_TRACE(VD_ERROR, "Illegal attrib ID on redirection MAD\n");
+		printk(KERN_ERR "Illegal attrib ID on redirection MAD\n");
 		goto out1;
 	}
 
 	/*
 	 * Redirect
 	 */
-	VD_TRACE(VD_DEBUG, "Handle redirect packet\n");
+	printk(KERN_DEBUG "Handle redirect packet\n");
 
 	redir_mad = (struct gsi_redirect_mad_t *) mad;
 
@@ -1572,7 +1480,7 @@
 	list_for_each((struct list_head *) redirect_info,
 		      &class_info->redirect_class_port_info_list) {
 		if (resp_dtgrm->rlid == redirect_info->rlid) {
-			VD_TRACE(VD_DEBUG, "Redirect info already exists\n");
+			printk(KERN_DEBUG "Redirect info already exists\n");
 			v_list_del((struct list_head *) redirect_info);
 			break;
 		}
@@ -1583,7 +1491,7 @@
 	    &class_info->redirect_class_port_info_list) {
 		if ((redirect_info =
 		     kmalloc(sizeof (*redirect_info), GFP_KERNEL)) == NULL) {
-			VD_TRACE(VD_DEBUG, "Memory allocation error.\n");
+			printk(KERN_DEBUG "Memory allocation error.\n");
 			goto out1;
 		}
 	}
@@ -1601,7 +1509,7 @@
 		      &class_info->redirect_class_port_info_list);
 	GSI_REDIR_LIST_UNLOCK(class_info);
 
-	VD_TRACE(VD_DEBUG, "Redirect LID: %d, QP: %d QK: 0x%x\n",
+	printk(KERN_DEBUG "Redirect LID: %d, QP: %d QK: 0x%x\n",
 		 redirect_info->class_port_info.redirect_lid,
 		 redirect_info->class_port_info.redirect_qp,
 		 redirect_info->class_port_info.redirect_q_key);
@@ -1610,12 +1518,11 @@
 	 * Retransmit the request datagram.
 	 */
 	if (gsi_post_send_mad(class_info, (struct gsi_dtgrm_t *) req_dtgrm)) {
-		VD_TRACE(VD_DEBUG,
+		printk(KERN_DEBUG \
 			 "Could not retransmit redirected datagram.\n");
 		goto out1;
 	}
 
-	VD_LEAVEFUNC();
 	return;
 
 out1:
@@ -1623,17 +1530,16 @@
 	 * Release the request datagram (call the send completion callback)
 	 */
 	if (class_info->send_compl_cb) {
-		VD_TRACE(VD_DEBUG, "Call  the callback\n");
+		printk(KERN_DEBUG "Calling the callback\n");
 		class_info->send_compl_cb(class_info,
 					  class_info->context,
 					  (struct gsi_dtgrm_t *) req_dtgrm);
 	} else {
-		VD_TRACE(VD_ERROR, "No callback registered\n");
+		printk(KERN_ERR "No callback registered\n");
 		gsi_dtgrm_pool_put((struct gsi_dtgrm_t *) req_dtgrm);
 	}
 
 out:
-	VD_LEAVEFUNC();
 	return;
 }
 
@@ -1643,10 +1549,8 @@
 {
 	struct rmpp_ib_mad_element_t *rmpp_mad;
 
-	VD_ENTERFUNC();
-
 	if (rmpp_get_mad(MAD_RMPP_DATA_SIZE, &rmpp_mad) != RMPP_IB_SUCCESS) {
-		VD_TRACE(VD_ERROR, "Could not get RMPP mad element\n");
+		printk(KERN_ERR "Could not get RMPP mad element\n");
 		goto get_mad_err;
 	}
 
@@ -1663,7 +1567,7 @@
 	rmpp_rcv(class_info->rmpp_h, rmpp_mad);
 
 get_mad_err:
-	VD_LEAVEFUNC();
+	return;
 }
 
 static inline int
@@ -1696,8 +1600,6 @@
 	char mad_out[256] = { 0 };
 	GSI_RCV_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	mad = &dtgrm_priv->mad;
 
 	hca->stat.rcv_cnt++;
@@ -1714,7 +1616,7 @@
 
 	mad_swap_header(mad);
 
-	VD_TRACE(VD_DEBUG, "MAD status: 0x%x, TID: 0x%Lx\n",
+	printk(KERN_DEBUG "MAD status: 0x%x, TID: 0x%Lx\n",
 		 mad->hdr.u.ns.status.raw16, mad->hdr.transact_id);
 
 	/*
@@ -1724,21 +1626,21 @@
 		client_id =
 		    ((struct gsi_tid_st *) &mad->hdr.transact_id)->client_id;
 
-		VD_TRACE(VD_DEBUG,
+		printk(KERN_DEBUG \
 			 "Received response packet for class-%d, client id - %d\n",
 			 mad->hdr.class, client_id);
 	} else {
-		VD_TRACE(VD_DEBUG, "Received request packet for class-%d\n",
+		printk(KERN_DEBUG "Received request packet for class-%d\n",
 			 mad->hdr.class);
 	}
 
 	if ((class_info = gsi_get_class_info(mad->hdr.class,
 					     hca, client_id)) == NULL) {
-		VD_TRACE(VD_DEBUG,
+		printk(KERN_DEBUG \
 			 "Management class not registered - %x, client id %d - injecting back to FW\n",
 			 mad->hdr.class, client_id);
-		VD_TRACE(VD_DEBUG, "Source QP %d, LID %d \n",
-			 wc->addres_info.source_qp, wc->addres_info.slid);
+		printk(KERN_DEBUG "Source QP %d, LID %d \n",
+			 wc->src_qp, wc->slid);
 
 		if (!mad->hdr.m.ms.r) {
 
@@ -1750,14 +1652,14 @@
 						  0,
 						  mad,
 						  (struct mad_t *) mad_out)) {
-				VD_TRACE(VD_DEBUG,
+				printk(KERN_DEBUG \
 					 "process_local_mad() failed.\n");
 				goto out;
 			}
 
 			memcpy(mad, mad_out, 256);
 
-			VD_TRACE(VD_DEBUG, "Posting PLM reply.\n");
+			printk(KERN_DEBUG "Posting PLM reply.\n");
 			dtgrm_priv->rqp = wc->src_qp;
 			dtgrm_priv->rlid = wc->slid;
 			dtgrm_priv->path_bits = wc->dlid_path_bits;
@@ -1782,7 +1684,7 @@
 	dtgrm_priv->path_bits = wc->dlid_path_bits;
 	dtgrm_priv->sl = wc->sl;
 
-	VD_TRACE(VD_DEBUG,
+	printk(KERN_DEBUG \
 		 "Received datagram - remote QP num-%d, LID-%d, path bits- %d, SL - %d\n",
 		 dtgrm_priv->rqp,
 		 dtgrm_priv->rlid, dtgrm_priv->path_bits, dtgrm_priv->sl);
@@ -1791,7 +1693,7 @@
 		gsi_handle_response_mad(class_info, dtgrm_priv, &redirect);
 
 	if (redirect) {
-		VD_TRACE(VD_DEBUG, "Redirect mad was handled\n");
+		printk(KERN_DEBUG "Redirect mad was handled\n");
 		goto out1;
 	}
 
@@ -1808,20 +1710,19 @@
 				       class_info->context,
 				       (struct gsi_dtgrm_t *) dtgrm_priv);
 	} else {
-		VD_TRACE(VD_ERROR, "No receive callback registered\n");
+		printk(KERN_DEBUG "No receive callback registered\n");
 		goto out1;
 	}
 	gsi_put_class_info(class_info);
 
-	VD_LEAVEFUNC();
-	return;
+	goto out_plm;
 
 out1:
 	gsi_put_class_info(class_info);
 out:
 	gsi_dtgrm_pool_put((struct gsi_dtgrm_t *) dtgrm_priv);
 out_plm:
-	VD_LEAVEFUNC();
+	return;
 }
 
 static void
@@ -1833,14 +1734,13 @@
 	int redirect = FALSE;
 	struct gsi_redirect_info_st *redirect_info;
 	GSI_REDIR_LIST_LOCK_VAR;
-	VD_ENTERFUNC();
 
 	if (!dtgrm_priv->mad.hdr.m.ms.r) {
 		GSI_REDIR_LIST_LOCK(class_info);
 		list_for_each((struct list_head *) redirect_info,
 			      &class_info->redirect_class_port_info_list) {
 			if (dtgrm_priv->rlid == redirect_info->rlid) {
-				VD_TRACE(VD_DEBUG,
+				printk(KERN_DEBUG \
 					 "The packet will be redirected\n");
 				memcpy(&class_port_info,
 				       &redirect_info->class_port_info,
@@ -1861,7 +1761,7 @@
 	addr_vec->port = class_info->hca->port;
 
 	if (redirect) {
-		VD_TRACE(VD_DEBUG, "Redirect LID: %d, QP: %d QK: 0x%x\n",
+		printk(KERN_DEBUG "Redirect LID: %d, QP: %d QK: 0x%x\n",
 			 class_port_info.redirect_lid,
 			 class_port_info.redirect_qp,
 			 class_port_info.redirect_q_key);
@@ -1881,7 +1781,6 @@
 		dtgrm_priv->r_q_key = GSI_QP1_WELL_KNOWN_Q_KEY;
 	}
 
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -1897,9 +1796,8 @@
 	int ret;
 	struct mad_t *mad = (struct mad_t *) dtgrm->mad;
 
-	VD_ENTERFUNC();
 	if (!hca->up) {
-		VD_TRACE(VD_ERROR, "Device is down\n");
+		printk(KERN_ERR "Device is down\n");
 		ret = -EPERM;
 		goto error;
 	}
@@ -1934,14 +1832,13 @@
 	}
 
 	if (gsi_is_rmpp_send_dtgrm(class_info, dtgrm)) {
-		VD_TRACE(VD_DEBUG, "Post RMPP datagram\n");
+		printk(KERN_DEBUG "Post RMPP datagram\n");
 		ret = gsi_post_send_rmpp(class_info, dtgrm);
 	} else {
-		VD_TRACE(VD_DEBUG, "Post regular datagram\n");
+		printk(KERN_DEBUG "Post regular datagram\n");
 		ret = gsi_post_send_mad(class_info, dtgrm);
 	}
 error:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
@@ -1966,19 +1863,17 @@
 	    (struct gsi_dtgrm_priv_st *) dtgrm;
 	GSI_SND_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	gsi_prepare_send_data(class_info, dtgrm_priv, &addr_vec);
 
 #if 0				/* GSI_ADDRESS_HNDL_POOL_SUPPORT */
 	if ((ret = ib_get_ah(hca->handle->pd, &addr_vec, &addr_hndl))) {
-		VD_TRACE(VD_ERROR, "Could not create address handle\n");
+		printk(KERN_ERR "Could not create address handle\n");
 		goto error1;
 	}
 #else
 	addr_hndl = ib_create_ah(hca->pd, &addr_hndl_attr);
 	if (IS_ERR(addr_hndl)) {
-		VD_TRACE(VD_ERROR, "Could not create address handle\n");
+		printk(KERN_ERR "Could not create address handle\n");
 		ret = PTR_ERR(addr_hndl);
 		goto error1;
 	}
@@ -1990,7 +1885,7 @@
 					IB_MR_LOCAL_WRITE,
 					&dtgrm_priv->sg.lkey, &rkey);
 	if (IS_ERR(dtgrm_priv->v_mem_h)) {
-		VD_TRACE(VD_ERROR, "Could not get general memory attr.\n");
+		printk(KERN_ERR "Could not get general memory attr.\n");
 		ret = PTR_ERR(dtgrm_priv->v_mem_h);
 		goto error2;
 	}
@@ -2030,12 +1925,11 @@
 	dtgrm_priv->context = (void *) class_info;
 
 	if ((ret = ib_post_send(hca->qp, &wr, &bad_wr))) {
-		VD_TRACE(VD_ERROR, "Could not post send request\n");
+		printk(KERN_ERR "Could not post send request\n");
 		goto error3;
 	}
 
 	class_info->stat.snd_cnt++;
-	VD_LEAVEFUNC();
 	return 0;
 
 error3:
@@ -2059,13 +1953,11 @@
 {
 	void *rmpp_buf;
 
-	VD_ENTERFUNC();
 	if ((rmpp_buf =
 	     gsi_dtgrm_alloc_rmpp_buf((struct gsi_dtgrm_t *) dtgrm_priv,
 				      rmpp_mad->size - MAD_RMPP_HDR_SIZE)) ==
 	    NULL) {
-		VD_TRACE(VD_ERROR, "Could not allocate RMPP buffer\n");
-		VD_LEAVEFUNC();
+		printk(KERN_ERR "Could not allocate RMPP buffer\n");
 		return;
 	}
 
@@ -2081,7 +1973,6 @@
 
 	dtgrm_priv->rmpp_dir_switch_needed = rmpp_mad->dir_switch_needed;
 
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -2102,8 +1993,6 @@
 	struct gsi_dtgrm_priv_st *dtgrm_priv =
 	    (struct gsi_dtgrm_priv_st *) dtgrm;
 
-	VD_ENTERFUNC();
-
 	addr_vec.grh_flag = 0;
 	memset((char *) &addr_vec.grh.dgid, 0, sizeof (addr_vec.grh.dgid));
 	addr_vec.grh.sgid_index = 0;
@@ -2121,13 +2010,13 @@
 
 #if 0				/* GSI_ADDRESS_HNDL_POOL_SUPPORT */
 	if ((ret = ib_get_ah(hca->handle->pd, &addr_vec, &addr_hndl))) {
-		VD_TRACE(VD_ERROR, "Could not create address handle\n");
+		printk(KERN_ERR "Could not create address handle\n");
 		goto error1;
 	}
 #else
 	addr_hndl = ib_create_ah(hca->pd, &addr_hndl_attr);
 	if (IS_ERR(addr_hndl)) {
-		VD_TRACE(VD_ERROR, "Could not create address handle\n");
+		printk(KERN_ERR "Could not create address handle\n");
 		ret = PTR_ERR(addr_hndl);
 		goto error1;
 	}
@@ -2138,7 +2027,7 @@
 					IB_MR_LOCAL_WRITE,
 					&dtgrm_priv->sg.lkey, &rkey);
 	if (IS_ERR(dtgrm_priv->v_mem_h)) {
-		VD_TRACE(VD_ERROR, "Could not get general memory attr.\n");
+		printk(KERN_ERR "Could not get general memory attr.\n");
 		goto error2;
 	}
 
@@ -2172,11 +2061,10 @@
 	dtgrm_priv->context = NULL;
 
 	if ((ret = ib_post_send(hca->qp, &wr, &bad_wr))) {
-		VD_TRACE(VD_ERROR, "Could not post send request\n");
+		printk(KERN_ERR "Could not post send request\n");
 		goto error2;
 	}
 
-	VD_LEAVEFUNC();
 	return 0;
 
 error2:
@@ -2193,8 +2081,6 @@
 gsi_conv_rcv_dtgm_to_rmpp_mad(struct rmpp_ib_mad_element_t *rmpp_mad,
 			      struct gsi_dtgrm_priv_st *dtgrm_priv)
 {
-	VD_ENTERFUNC();
-
 	memcpy(rmpp_mad->p_mad_buf, &dtgrm_priv->mad, MAD_BLOCK_SIZE);
 
 	/* 
@@ -2213,15 +2099,12 @@
 	rmpp_mad->grh_valid = FALSE;
 
 	rmpp_mad->pkey_index = GSI_P_KEY_INDEX;
-	VD_LEAVEFUNC();
 }
 
 static void
 gsi_conv_send_dtgm_to_rmpp_mad(struct rmpp_ib_mad_element_t *rmpp_mad,
 			       struct gsi_dtgrm_priv_st *dtgrm_priv)
 {
-	VD_ENTERFUNC();
-
 	memcpy(rmpp_mad->p_mad_buf, &dtgrm_priv->mad, MAD_RMPP_HDR_SIZE);
 	memcpy((char *) (rmpp_mad->p_mad_buf) + MAD_RMPP_HDR_SIZE,
 	       dtgrm_priv->rmpp_payload, dtgrm_priv->rmpp_payload_size);
@@ -2239,7 +2122,6 @@
 
 	rmpp_mad->context = dtgrm_priv;
 
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -2252,11 +2134,9 @@
 	struct rmpp_ib_mad_element_t *rmpp_mad;
 	int ret;
 
-	VD_ENTERFUNC();
-
 	if (rmpp_get_mad(dtgrm->rmpp_payload_size, &rmpp_mad) !=
 	    RMPP_IB_SUCCESS) {
-		VD_TRACE(VD_ERROR, "Could not get RMPP mad element\n");
+		printk(KERN_ERR "Could not get RMPP mad element\n");
 		ret = -ENOBUFS;
 		goto get_mad_err;
 	}
@@ -2265,18 +2145,16 @@
 				       (struct gsi_dtgrm_priv_st *) dtgrm);
 
 	if (rmpp_send(class_info->rmpp_h, rmpp_mad) != RMPP_IB_SUCCESS) {
-		VD_TRACE(VD_ERROR, "RMPP send error\n");
+		printk(KERN_ERR "RMPP send error\n");
 		ret = -EPERM;
 		goto send_err;
 	}
 
-	VD_LEAVEFUNC();
 	return 0;
 
 send_err:
 	rmpp_put_mad(rmpp_mad);
 get_mad_err:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
@@ -2287,22 +2165,21 @@
 {
 	struct gsi_serv_class_info_st *class_info;
 
-	VD_ENTERFUNC();
-	VD_TRACE(VD_DEBUG, "RMPP send callback\n");
+	printk(KERN_DEBUG "RMPP send callback\n");
 
 	class_info =
 	    (struct gsi_serv_class_info_st *) rmpp_get_vendal_context(rmpp_h);
 
 	if (status == RMPP_IB_SUCCESS) {
-		VD_TRACE(VD_DEBUG, "RMPP send success\n");
+		printk(KERN_DEBUG "RMPP send success\n");
 	} else if (status == RMPP_IB_ACK_DONE) {
-		VD_TRACE(VD_DEBUG, "RMPP ACK send success\n");
+		printk(KERN_DEBUG "RMPP ACK send success\n");
 		/*
 		 * If this is an ACK or NACK completion,
 		 */
 		goto out;
 	} else {
-		VD_TRACE(VD_ERROR, "RMPP send error %d\n", status);
+		printk(KERN_ERR "RMPP send error %d\n", status);
 	}
 	class_info->send_compl_cb(class_info, class_info->context,
 				  rmpp_mad->context);
@@ -2310,7 +2187,6 @@
 out:
 	rmpp_put_mad(rmpp_mad);
 
-	VD_LEAVEFUNC();
 }
 
 static void
@@ -2319,15 +2195,14 @@
 	struct gsi_serv_class_info_st *class_info;
 	struct gsi_dtgrm_t *dtgrm;
 
-	VD_ENTERFUNC();
-	VD_TRACE(VD_DEBUG, "RMPP receive callback\n");
+	printk(KERN_DEBUG "RMPP receive callback\n");
 
 	class_info =
 	    (struct gsi_serv_class_info_st *) rmpp_get_vendal_context(rmpp_h);
 
 	if (gsi_dtgrm_pool_get(class_info->rmpp_rcv_dtgrm_pool,
 			       (struct gsi_dtgrm_t **) &dtgrm)) {
-		VD_TRACE(VD_ERROR, "Could not get datagram\n");
+		printk(KERN_ERR "Could not get datagram\n");
 		goto err;
 	}
 
@@ -2337,7 +2212,6 @@
 	class_info->receive_cb(class_info, class_info->context, dtgrm);
 err:
 	rmpp_put_mad(rmpp_mad);
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -2381,8 +2255,6 @@
 	GSI_REDIR_LIST_LOCK_VAR;
 	GSI_HCA_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	/*
 	 * Print HCA/port information
 	 */
@@ -2489,8 +2361,6 @@
 	gsi_put_all_classes();
 	*eof = 1;
 
-	VD_LEAVEFUNC();
-
 	return out - page;
 }
 
@@ -2528,8 +2398,6 @@
 	    (struct gsi_hca_info_st *) &gsi_hca_list, *hca_info;
 	GSI_HCA_LIST_LOCK_VAR;
 
-	VD_ENTERFUNC();
-
 	printk("********************************************\n");
 	printk("SA SPEC compliant - %s\n\n",
 	       rmpp_spec_compliant ? "TRUE" : "FALSE");
@@ -2590,7 +2458,6 @@
 	printk("********************************************\n");
 
 	gsi_put_all_classes();
-	VD_LEAVEFUNC();
 }
 
 static int
@@ -2598,12 +2465,11 @@
 {
 	struct gsi_hca_info_st *hca_info;
 	int ret = 0;
-	VD_ENTERFUNC();
 
 	printk("GSI restart command - %s %d \n", name, port);
 
 	if (!(hca_info = gsi_get_hca_info(name, port))) {
-		VD_TRACE(VD_ERROR, "Unknown device to restart\n");
+		printk(KERN_ERR "Unknown device to restart\n");
 		ret = -ENODEV;
 		goto error;
 	}
@@ -2613,7 +2479,6 @@
 	gsi_put_hca_info(hca_info);
 
 error:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
@@ -2628,30 +2493,29 @@
 	int port;
 	int i = count;
 
-	VD_ENTERFUNC();
 	p = (char *) buffer;
 
 #define READ_STR(str, size)\
 	gsi_proc_read_str(str, size, &i, &p)
 
 	if (!READ_STR(cmd, sizeof (cmd))) {
-		VD_TRACE(VD_DEBUG, "Could not read command\n");
+		printk(KERN_DEBUG "Could not read command\n");
 		goto error;
 	}
 
 	if (!strcmp(cmd, "showstat")) {
-		VD_TRACE(VD_DEBUG, "The SHOW STATISTICS command\n");
+		printk(KERN_DEBUG "The SHOW STATISTICS command\n");
 		gsi_proc_show_statistics();
 	} else if (!strcmp(cmd, "restart")) {
-		VD_TRACE(VD_DEBUG, "The  RESTART command\n");
+		printk(KERN_DEBUG "The RESTART command\n");
 
 		if (!READ_STR(name, sizeof (name))) {
-			VD_TRACE(VD_ERROR, "Could not read port number\n");
+			printk(KERN_ERR "Could not read port number\n");
 			goto error;
 		}
 
 		if (!READ_STR(port_str, sizeof (port_str))) {
-			VD_TRACE(VD_ERROR, "Could not read port number\n");
+			printk(KERN_ERR "Could not read port number\n");
 			goto error;
 		}
 
@@ -2665,15 +2529,15 @@
 		}
 
 	} else if (!strcmp(cmd, "rcn")) {
-		VD_TRACE(VD_DEBUG, "The REQUEST COMPL NOTIF command\n");
+		printk(KERN_DEBUG "The REQUEST COMPL NOTIF command\n");
 
 		if (!READ_STR(name, sizeof (name))) {
-			VD_TRACE(VD_ERROR, "Could not read HCA name\n");
+			printk(KERN_ERR "Could not read HCA name\n");
 			goto error;
 		}
 
 		if (!READ_STR(port_str, sizeof (port_str))) {
-			VD_TRACE(VD_ERROR, "Could not read port number\n");
+			printk(KERN_ERR "Could not read port number\n");
 			goto error;
 		}
 
@@ -2689,15 +2553,15 @@
 		}
 
 	} else if (!strcmp(cmd, "poll")) {
-		VD_TRACE(VD_DEBUG, "The  POLL command\n");
+		printk(KERN_DEBUG "The POLL command\n");
 
 		if (!READ_STR(name, sizeof (name))) {
-			VD_TRACE(VD_ERROR, "Could not read HCA name\n");
+			printk(KERN_ERR "Could not read HCA name\n");
 			goto error;
 		}
 
 		if (!READ_STR(port_str, sizeof (port_str))) {
-			VD_TRACE(VD_ERROR, "Could not read port number\n");
+			printk(KERN_ERR "Could not read port number\n");
 			goto error;
 		}
 
@@ -2715,7 +2579,6 @@
 
 #undef READ_STR
 
-	VD_LEAVEFUNC();
 	return count;
 error:
 	printk("GSI: wrong /proc/openib/gsi/control input.\n");
@@ -2723,7 +2586,6 @@
     \"showstat\"           show statistics\n\
     \"restart HCA PORT\"   reset QP and restart\n");
 
-	VD_LEAVEFUNC();
 	return count;
 }
 
@@ -2742,7 +2604,6 @@
 	struct gsi_hca_info_st *hca = param;
 	struct gsi_thread_data_t *thread_data = &hca->thread_data;
 
-	VD_ENTERFUNC();
 	lock_kernel();
 
 #if 1				/* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) */
@@ -2758,7 +2619,7 @@
 
 	while (1) {
 		if (down_interruptible(&thread_data->sem)) {
-			VD_TRACE(VD_DEBUG,
+			printk(KERN_DEBUG \
 				 "Waked up - interrupted - exit thread!\n");
 			break;
 		}
@@ -2766,10 +2627,9 @@
 		if (!thread_data->run)
 			break;
 
-		VD_TRACE(VD_DEBUG, "Waked up!\n");
+		printk(KERN_DEBUG "Waked up!\n");
 		gsi_compl_cb(hca);
 	}
-	VD_LEAVEFUNC();
 
 	return 0;
 }
@@ -2782,9 +2642,7 @@
 {
 	struct gsi_thread_data_t *thread_data = &hca->thread_data;
 
-	VD_ENTERFUNC();
 	up(&thread_data->sem);
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -2795,10 +2653,8 @@
 {
 	struct gsi_thread_data_t *thread_data = &hca->thread_data;
 
-	VD_ENTERFUNC();
 	thread_data->run = 1;
 	kernel_thread(gsi_thread, hca, 0);
-	VD_LEAVEFUNC();
 }
 
 /* 
@@ -2809,11 +2665,9 @@
 {
 	struct gsi_thread_data_t *thread_data = &hca->thread_data;
 
-	VD_ENTERFUNC();
 	thread_data->run = 0;
 	gsi_thread_signal(hca);
 	schedule();
-	VD_LEAVEFUNC();
 }
 
 static int
@@ -2824,12 +2678,12 @@
 	int i = 0;
 
 	if ((ret = ib_query_hca_cap(device, &hca_attrib))) {
-		VD_TRACE(VD_ERROR, "Could not query HCA\n");
+		printk(KERN_ERR "Could not query HCA\n");
 		goto error_hca_query;
 	}
 
 	if (hca_attrib.phys_port_cnt > GSI_MAX_SUPPORTED_PORTS) {
-		VD_TRACE(VD_ERROR, "Too many ports - %d (support up to %d)\n",
+		printk(KERN_ERR "Too many ports - %d (support up to %d)\n",
 			 hca_attrib.phys_port_cnt, GSI_MAX_SUPPORTED_PORTS);
 		ret = -EMFILE;
 		goto error_too_many_ports;
@@ -2838,19 +2692,18 @@
 	for (i = 0; i < hca_attrib.phys_port_cnt; i++) {
 		if ((ret = gsi_hca_open(device,
 					&(gsi_hca_h_array[i]), (i + 1)))) {
-			VD_TRACE(VD_ERROR, "Cannot open HCA\n");
+			printk(KERN_ERR "Cannot open HCA\n");
 			goto error_gsi_hca_open;
 		}
 		gsi_hca_h_array_num_ports++;
 	}
 
-	VD_LEAVEFUNC();
 	return 0;
 
 error_gsi_hca_open:
 	while (i > 0) {
 		if ((ret = gsi_hca_close((gsi_hca_h_array[i - 1])))) {
-			VD_TRACE(VD_ERROR,
+			printk(KERN_ERR \
 				 "Cannot close gsi HCA (ret: %d), ix: %d\n",
 				 ret, i - 1);
 		}
@@ -2861,7 +2714,6 @@
 
 error_too_many_ports:
 error_hca_query:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
@@ -2873,13 +2725,13 @@
 	int i = 0;
 
 	if ((ret = ib_query_hca_cap(device, &hca_attrib))) {
-		VD_TRACE(VD_ERROR, "Could not query HCA\n");
+		printk(KERN_ERR "Could not query HCA\n");
 		goto error_hca_query;
 	}
 
 	if (hca_attrib.phys_port_cnt > GSI_MAX_SUPPORTED_PORTS) {
-		VD_TRACE(VD_ERROR, "Too many ports - %d (support up to %d)\n",
-			 hca_attrib.port_num, GSI_MAX_SUPPORTED_PORTS);
+		printk(KERN_ERR "Too many ports - %d (support up to %d)\n",
+			 hca_attrib.phys_port_cnt, GSI_MAX_SUPPORTED_PORTS);
 		ret = -EMFILE;
 		goto error_too_many_ports;
 	}
@@ -2887,27 +2739,25 @@
 	for (i = 0; i < hca_attrib.phys_port_cnt; i++) {
 		if (gsi_hca_h_array[i] != NULL) {
 			if ((ret = gsi_hca_close((gsi_hca_h_array[i])))) {
-				VD_TRACE(VD_ERROR,
+				printk(KERN_ERR \
 					 "Cannot close gsi HCA (ret: %d), ix: %d\n",
 					 ret, i);
 			}
 			gsi_hca_h_array_num_ports--;
 		} else {
-			VD_TRACE(VD_ERROR, "gsi_hca_h_array[%d] == NULL\n", i);
+			printk(KERN_ERR "gsi_hca_h_array[%d] == NULL\n", i);
 		}
 	}
 
 	if (gsi_hca_h_array_num_ports != 0) {
-		VD_TRACE(VD_ERROR, "gsi_hca_h_array_num_ports: %d != 0\n",
+		printk(KERN_ERR "gsi_hca_h_array_num_ports: %d != 0\n",
 			 gsi_hca_h_array_num_ports);
 	}
 
-	VD_LEAVEFUNC();
 	return 0;
 
 error_too_many_ports:
 error_hca_query:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
@@ -2918,7 +2768,7 @@
 	switch (event) {
 	case IB_DEVICE_NOTIFIER_ADD:
 		if (gsi_create_ports(device))
-			VD_TRACE(VD_ERROR, "Failed to initialize device.");
+			printk(KERN_ERR "Failed to initialize device.");
 		break;
 
 	case IB_DEVICE_NOTIFIER_REMOVE:
@@ -2926,7 +2776,7 @@
 		break;
 
 	default:
-		VD_TRACE(VD_ERROR, "Unknown device notifier event %d.", event);
+		printk(KERN_ERR "Unknown device notifier event %d.", event);
 		break;
 	}
 }
@@ -2941,14 +2791,12 @@
 	int result = 0;
 	struct proc_dir_entry *ent;
 
-	VD_TRACE(VD_DEBUG, "GSI_PRIV_DTGRM_PRIV_HDR_SIZE = %ld\n",
+	printk(KERN_DEBUG "GSI_PRIV_DTGRM_PRIV_HDR_SIZE = %ld\n",
 		 (long) GSI_PRIV_DTGRM_PRIV_HDR_SIZE);
-	VD_TRACE(VD_DEBUG, "GSI_DTGRM_PRIV_HDR_SIZE = %d\n",
+	printk(KERN_DEBUG "GSI_DTGRM_PRIV_HDR_SIZE = %d\n",
 		 GSI_DTGRM_PRIV_HDR_SIZE);
-	VD_TRACE(VD_DEBUG, "MAD size= %ld\n", (long) sizeof (struct mad_t));
+	printk(KERN_DEBUG "MAD size= %ld\n", (long) sizeof (struct mad_t));
 
-	VD_LOGGER_INIT("openib/modules/gsi/");
-
 	/* 
 	 * validation check on the structure's size
 	 * the structure in gsi.h is a copy of gsi_priv.h. the size of the structures is defined with #define. in
@@ -2967,7 +2815,7 @@
 	if ((result =
 	     module_version_init(MODNAME, GSI_VERSION,
 				 "$Name: NVIGOR_2_6_GPL_BR_040614 $")) != 0) {
-		VD_TRACE(VD_ERROR, "Could not init module version!\n");
+		printk(KERN_ERR "Could not init module version!\n");
 		result = -ENOMEM;
 		goto error1;
 	}
@@ -2980,13 +2828,13 @@
 		ent->read_proc = gsi_read_proc;
 		ent->write_proc = gsi_write_proc;
 	} else {
-		VD_TRACE(VD_ERROR, "Could not create proc entry!\n");
+		printk(KERN_ERR "Could not create proc entry!\n");
 		result = -ENOMEM;
 		goto error2;
 	}
 
 	if (rmpp_init() != RMPP_SUCCESS) {
-		VD_TRACE(VD_ERROR, "Could init RMPP!\n");
+		printk(KERN_ERR "Could init RMPP!\n");
 		result = -ENXIO;
 		goto error3;
 	}
@@ -3003,14 +2851,13 @@
 error2:
 	module_version_exit(MODNAME);
 error1:
-	VD_LOGGER_EXIT();
 	return result;
 }
 
 static void
 gsi_cleanup_module(void)
 {
-	VD_TRACE(VD_DEBUG, "Bye!\n");
+	printk(KERN_DEBUG "Bye GSI!\n");
 	rmpp_cleanup();
 
 	ib_device_notifier_deregister(&gsi_notifier);
@@ -3018,7 +2865,6 @@
 	gsi_sent_dtgrm_timer_stop();
 	remove_proc_entry("openib/gsi/control", NULL);
 	module_version_exit(MODNAME);
-	VD_LOGGER_EXIT();
 }
 
 struct gsi_dtgrm_pool_info_st {
@@ -3033,12 +2879,10 @@
 	struct gsi_hca_info_st *hca_info;
 	int ret = 0;
 
-	VD_ENTERFUNC();
-
 	printk("GSI POLL command - %s %d \n", name, port);
 
 	if ((hca_info = gsi_get_hca_info(name, port)) == NULL) {
-		VD_TRACE(VD_ERROR, "Unknown device to test\n");
+		printk(KERN_ERR "Unknown device to test\n");
 		ret = -ENODEV;
 		goto error;
 	}
@@ -3047,7 +2891,6 @@
 	gsi_put_hca_info(hca_info);
 
 error:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
@@ -3057,26 +2900,23 @@
 	struct gsi_hca_info_st *hca_info;
 	int ret;
 
-	VD_ENTERFUNC();
-
 	printk("GSI REQUEST COMPLETION NOTIFICATION command - %s %d \n", name,
 	       port);
 
 	if ((hca_info = gsi_get_hca_info(name, port)) == NULL) {
-		VD_TRACE(VD_ERROR, "Unknown device to test\n");
+		printk(KERN_ERR "Unknown device to test\n");
 		ret = -ENODEV;
 		goto error;
 	}
 
 	if ((ret = ib_req_notify_cq(hca_info->cq, IB_CQ_NEXT_COMP))) {
-		VD_TRACE(VD_ERROR,
+		printk(KERN_ERR \
 			 "Failed to request competion notification\n");
 	}
 
 	gsi_put_hca_info(hca_info);
 
 error:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
@@ -3089,18 +2929,16 @@
 	struct gsi_dtgrm_pool_info_st *pool;
 	char name[GSI_POOL_MAX_NAME_LEN];
 
-	VD_ENTERFUNC();
-
 	/*
 	 * Sanity check
 	 */
 	if (!modname || (strlen(modname) > (GSI_POOL_MAX_NAME_LEN - 8))) {
-		VD_LEAVEFUNC("Invalid pool name\n");
+		printk(KERN_ERR "Invalid pool name\n");
 		return -ENOENT;
 	}
 
 	if ((pool = kmalloc(sizeof (*pool), GFP_KERNEL)) == NULL) {
-		VD_LEAVEFUNC("Memory allocation error\n");
+		printk(KERN_ERR "Memory allocation error\n");
 		return -ENOMEM;
 	}
 
@@ -3111,7 +2949,7 @@
 					     0,
 					     SLAB_HWCACHE_ALIGN,
 					     NULL, NULL)) == NULL) {
-		VD_LEAVEFUNC("kmem_cache_create failed\n");
+		printk(KERN_ERR "kmem_cache_create failed\n");
 		goto nomem;
 	}
 
@@ -3120,23 +2958,18 @@
 
 	*handle = pool;
 
-	VD_LEAVEFUNC();
 	return 0;
 
 nomem:
 	kfree(pool);
-
-	VD_LEAVEFUNC();
 	return -ENOMEM;
 }
 
 static void
 gsi_dtgrm_pool_do_destroy(struct gsi_dtgrm_pool_info_st *pool)
 {
-	VD_ENTERFUNC();
 	kmem_cache_destroy(pool->cache);
 	kfree(pool);
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -3148,8 +2981,6 @@
 	struct gsi_dtgrm_pool_info_st *pool =
 	    (struct gsi_dtgrm_pool_info_st *) handle;
 
-	VD_ENTERFUNC();
-
 	/*
 	 * If atomic_sub_and_test() detects negative value (non-zero),
 	 * there are posted datagrames which
@@ -3162,7 +2993,6 @@
 		gsi_dtgrm_pool_do_destroy(pool);
 	}
 
-	VD_LEAVEFUNC();
 }
 
 /*
@@ -3174,8 +3004,6 @@
 	struct gsi_dtgrm_pool_info_st *pool =
 	    (struct gsi_dtgrm_pool_info_st *) handle;
 
-	VD_ENTERFUNC();
-
 	atomic_dec(&pool->cnt);
 
 	if (atomic_read(&pool->cnt) < 0) {
@@ -3183,7 +3011,7 @@
 		 * pool->cnt may ne negative if the pool is empty, or
 		 * gsi_dtgrm_pool_delete() was called before.
 		 */
-		VD_TRACE(VD_DEBUG, "Empty pool \n");
+		printk(KERN_DEBUG "Empty pool \n");
 		goto empty_pool;
 	}
 
@@ -3191,7 +3019,7 @@
 							 GFP_KERNEL);
 
 	if (!(*dtgrm)) {
-		VD_TRACE(VD_ERROR, "Cannot allocate a datagram\n");
+		printk(KERN_ERR "Cannot allocate a datagram\n");
 		goto alloc_error;
 	}
 
@@ -3203,13 +3031,11 @@
 	((struct gsi_dtgrm_priv_st *) (*dtgrm))->posted = 0;
 	((struct gsi_dtgrm_priv_st *) (*dtgrm))->pool = pool;
 
-	VD_LEAVEFUNC();
 	return 0;
 
 empty_pool:
 alloc_error:
 	atomic_inc(&pool->cnt);
-	VD_LEAVEFUNC();
 	return -ENOBUFS;
 }
 
@@ -3222,8 +3048,6 @@
 	struct gsi_dtgrm_pool_info_st *pool = NULL;
 	struct gsi_dtgrm_priv_st *dtgrm_priv = NULL;
 
-	VD_ENTERFUNC();
-
 	dtgrm_priv = ((struct gsi_dtgrm_priv_st *) dtgrm);
 	pool = (struct gsi_dtgrm_pool_info_st *) dtgrm_priv->pool;
 
@@ -3237,11 +3061,10 @@
 	 * destroy it now.
 	 */
 	if (atomic_inc_and_test(&pool->cnt)) {
-		VD_TRACE(VD_DEBUG, "Deleting marked for deletion pool!\n");
+		printk(KERN_DEBUG "Deleting marked for deletion pool!\n");
 		gsi_dtgrm_pool_do_destroy(pool);
 	}
 
-	VD_LEAVEFUNC();
 	return 0;
 }
 
@@ -3251,8 +3074,6 @@
 static int
 gsi_dtgrm_pool_size(void *handle)
 {
-	VD_ENTERFUNC();
-	VD_LEAVEFUNC();
 	return ((struct gsi_dtgrm_pool_info_st *) handle)->size;
 }
 
@@ -3266,24 +3087,18 @@
 	    (struct gsi_dtgrm_pool_info_st *) handle;
 	int cnt;
 
-	VD_ENTERFUNC();
-
 	cnt = atomic_read(&pool->cnt);
-
-	VD_LEAVEFUNC();
 	return cnt;
 }
 
 void *
 gsi_dtgrm_alloc_rmpp_buf(struct gsi_dtgrm_t *dtgrm, int size)
 {
-	VD_ENTERFUNC();
 	if ((dtgrm->rmpp_payload = kmalloc(size, GFP_KERNEL)) == NULL)
 		goto alloc_error;
 
 	dtgrm->rmpp_payload_size = size;
 
-	VD_LEAVEFUNC();
 alloc_error:
 	return dtgrm->rmpp_payload;
 }
@@ -3291,22 +3106,16 @@
 void
 gsi_dtgrm_free_rmpp_buf(struct gsi_dtgrm_t *dtgrm)
 {
-	VD_ENTERFUNC();
-
 	kfree(dtgrm->rmpp_payload);
 
 	dtgrm->rmpp_payload = NULL;
 	dtgrm->rmpp_payload_size = 0;
-
-	VD_LEAVEFUNC();
 }
 
 void *
 gsi_dtgrm_get_rmpp_buf(struct gsi_dtgrm_t *dtgrm, int *size)
 {
-	VD_ENTERFUNC();
 	*size = dtgrm->rmpp_payload_size;
-	VD_LEAVEFUNC();
 	return dtgrm->rmpp_payload;
 }
 
Index: gsi_rmpp_vendal.c
===================================================================
--- gsi_rmpp_vendal.c	(revision 561)
+++ gsi_rmpp_vendal.c	(working copy)
@@ -60,7 +60,6 @@
 #include <linux/slab.h>
 #include <asm/io.h>
 
-#include "debug_support.h"
 #include "ib_verbs.h"
 #include "mad.h"
 #include "gsi.h"
@@ -73,8 +72,6 @@
 enum rmpp_ib_api_status_t
 rmpp_vendal_register(void *vendal_p, void *rmpp_h)
 {
-	VD_ENTERFUNC();
-	VD_LEAVEFUNC();
 	return RMPP_IB_SUCCESS;
 }
 
@@ -82,16 +79,12 @@
 gsi_conv_snd_rmpp_mad_to_dtgrm(struct gsi_dtgrm_t *dtgrm,
 			       struct rmpp_ib_mad_element_t *rmpp_mad)
 {
-	VD_ENTERFUNC();
-
 	memcpy(&dtgrm->mad, &rmpp_mad->mad_seg, MAD_BLOCK_SIZE);
 
 	dtgrm->rlid = rmpp_mad->remote_lid;
 	dtgrm->sl = rmpp_mad->remote_sl;
 	dtgrm->rqp = rmpp_mad->remote_qp;
 	dtgrm->path_bits = rmpp_mad->path_bits;
-
-	VD_LEAVEFUNC();
 }
 
 enum rmpp_ib_api_status_t
@@ -103,10 +96,9 @@
 	struct gsi_serv_class_info_st *class_info =
 	    (struct gsi_serv_class_info_st *) rmpp_get_vendal_context(rmpp_h);
 
-	VD_ENTERFUNC();
 	if (gsi_dtgrm_pool_get(class_info->rmpp_rcv_dtgrm_pool,
 			       (struct gsi_dtgrm_t **) &dtgrm)) {
-		VD_TRACE(VD_ERROR, "Could not get datagram\n");
+		printk(KERN_ERR "Could not get datagram\n");
 		ret = RMPP_IB_INSUFFICIENT_MEMORY;
 		goto pool_get_err;
 	}
@@ -116,36 +108,32 @@
 	dtgrm->rmpp_context = rmpp_mad;
 
 #ifdef DUMP
-	VD_TRACE(VD_DEBUG, "Posting RMPP MAD - TID: 0x%Lx \n",
+	printk(KERN_DEBUG "Posting RMPP MAD - TID: 0x%Lx \n",
 		 ((struct mad_t *) &dtgrm->mad)->hdr.transact_id);
 	dump_block_with_ascii(__FUNCTION__ ":  Posting MAD",
 			      (void *) &dtgrm->mad, MAD_BLOCK_SIZE, 0);
 
-	VD_TRACE(VD_DEBUG, "Remote LID=%d\n", dtgrm->rlid);
+	printk(KERN_DEBUG "Remote LID=%d\n", dtgrm->rlid);
 #endif
 
 	if (gsi_post_send_mad(class_info, dtgrm)) {
-		VD_TRACE(VD_ERROR, "Could not post send datagram\n");
+		printk(KERN_ERR "Could not post send datagram\n");
 		ret = RMPP_IB_ERROR;
 		goto send_err;
 	}
 
-	VD_LEAVEFUNC();
 	return RMPP_IB_SUCCESS;
 
 send_err:
 	gsi_dtgrm_pool_put(dtgrm);
 
 pool_get_err:
-	VD_LEAVEFUNC();
 	return ret;
 }
 
 enum rmpp_ib_api_status_t
 rmpp_vendal_deregister(void *rmpp_h)
 {
-	VD_ENTERFUNC();
-	VD_LEAVEFUNC();
 	return RMPP_IB_SUCCESS;
 }
 
@@ -158,7 +146,7 @@
 	char buf[1024];
 	va_list args;
 #if defined(VDBG) || defined(VD_LOGGER_ON)
-	int vd_debug_level;
+	char vd_debug_level[12];
 #endif
 
 	if (level == RMPP_LOG_NONE) {
@@ -166,16 +154,16 @@
 	}
 #if defined(VDBG) || defined(VD_LOGGER_ON)
 	else if (level == RMPP_LOG_ERROR) {
-		vd_debug_level = VD_ERROR;
+		strcpy(vd_debug_level, "KERN_ERR");
 	} else {
-		vd_debug_level = VD_DEBUG;
+		strcpy(vd_debug_level, "KERN_DEBUG");
 	}
 #endif
 	va_start(args, fmt);
 	vsnprintf(buf, sizeof (buf) - 1, fmt, args);
 	va_end(args);
 #if defined(VDBG) || defined(VD_LOGGER_ON)
-	VD_TRACE(vd_debug_level, "RMPP:%s (%s:%d) %s", function, file, line,
+	printk(%s "RMPP:%s (%s:%d) %s", vd_debug_level, function, file, line,
 		 buf);
 #endif
 }




More information about the general mailing list