| 
				
			 | 
			
			
				
				@@ -107,7 +107,7 @@ ib_create_cq ( struct ib_device *ibdev, unsigned int num_cqes, 
			 | 
		
		
	
		
			
			| 
				107
			 | 
			
				107
			 | 
			
			
				
				 	if ( ! cq ) 
			 | 
		
		
	
		
			
			| 
				108
			 | 
			
				108
			 | 
			
			
				
				 		goto err_alloc_cq; 
			 | 
		
		
	
		
			
			| 
				109
			 | 
			
				109
			 | 
			
			
				
				 	cq->ibdev = ibdev; 
			 | 
		
		
	
		
			
			| 
				110
			 | 
			
				
			 | 
			
			
				
				-	list_add ( &cq->list, &ibdev->cqs ); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				110
			 | 
			
			
				
				+	list_add_tail ( &cq->list, &ibdev->cqs ); 
			 | 
		
		
	
		
			
			| 
				111
			 | 
			
				111
			 | 
			
			
				
				 	cq->num_cqes = num_cqes; 
			 | 
		
		
	
		
			
			| 
				112
			 | 
			
				112
			 | 
			
			
				
				 	INIT_LIST_HEAD ( &cq->work_queues ); 
			 | 
		
		
	
		
			
			| 
				113
			 | 
			
				113
			 | 
			
			
				
				 	cq->op = op; 
			 | 
		
		
	
	
		
			
			| 
				
			 | 
			
			
				
				@@ -185,6 +185,7 @@ void ib_poll_cq ( struct ib_device *ibdev, 
			 | 
		
		
	
		
			
			| 
				185
			 | 
			
				185
			 | 
			
			
				
				  * @v num_recv_wqes	Number of receive work queue entries 
			 | 
		
		
	
		
			
			| 
				186
			 | 
			
				186
			 | 
			
			
				
				  * @v recv_cq		Receive completion queue 
			 | 
		
		
	
		
			
			| 
				187
			 | 
			
				187
			 | 
			
			
				
				  * @v op		Queue pair operations 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				188
			 | 
			
			
				
				+ * @v name		Queue pair name 
			 | 
		
		
	
		
			
			| 
				188
			 | 
			
				189
			 | 
			
			
				
				  * @ret qp		Queue pair 
			 | 
		
		
	
		
			
			| 
				189
			 | 
			
				190
			 | 
			
			
				
				  * 
			 | 
		
		
	
		
			
			| 
				190
			 | 
			
				191
			 | 
			
			
				
				  * The queue pair will be left in the INIT state; you must call 
			 | 
		
		
	
	
		
			
			| 
				
			 | 
			
			
				
				@@ -196,7 +197,8 @@ struct ib_queue_pair * ib_create_qp ( struct ib_device *ibdev, 
			 | 
		
		
	
		
			
			| 
				196
			 | 
			
				197
			 | 
			
			
				
				 				      struct ib_completion_queue *send_cq, 
			 | 
		
		
	
		
			
			| 
				197
			 | 
			
				198
			 | 
			
			
				
				 				      unsigned int num_recv_wqes, 
			 | 
		
		
	
		
			
			| 
				198
			 | 
			
				199
			 | 
			
			
				
				 				      struct ib_completion_queue *recv_cq, 
			 | 
		
		
	
		
			
			| 
				199
			 | 
			
				
			 | 
			
			
				
				-				      struct ib_queue_pair_operations *op ) { 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				200
			 | 
			
			
				
				+				      struct ib_queue_pair_operations *op, 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				201
			 | 
			
			
				
				+				      const char *name ) { 
			 | 
		
		
	
		
			
			| 
				200
			 | 
			
				202
			 | 
			
			
				
				 	struct ib_queue_pair *qp; 
			 | 
		
		
	
		
			
			| 
				201
			 | 
			
				203
			 | 
			
			
				
				 	size_t total_size; 
			 | 
		
		
	
		
			
			| 
				202
			 | 
			
				204
			 | 
			
			
				
				 	int rc; 
			 | 
		
		
	
	
		
			
			| 
				
			 | 
			
			
				
				@@ -211,24 +213,25 @@ struct ib_queue_pair * ib_create_qp ( struct ib_device *ibdev, 
			 | 
		
		
	
		
			
			| 
				211
			 | 
			
				213
			 | 
			
			
				
				 	if ( ! qp ) 
			 | 
		
		
	
		
			
			| 
				212
			 | 
			
				214
			 | 
			
			
				
				 		goto err_alloc_qp; 
			 | 
		
		
	
		
			
			| 
				213
			 | 
			
				215
			 | 
			
			
				
				 	qp->ibdev = ibdev; 
			 | 
		
		
	
		
			
			| 
				214
			 | 
			
				
			 | 
			
			
				
				-	list_add ( &qp->list, &ibdev->qps ); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				216
			 | 
			
			
				
				+	list_add_tail ( &qp->list, &ibdev->qps ); 
			 | 
		
		
	
		
			
			| 
				215
			 | 
			
				217
			 | 
			
			
				
				 	qp->type = type; 
			 | 
		
		
	
		
			
			| 
				216
			 | 
			
				218
			 | 
			
			
				
				 	qp->send.qp = qp; 
			 | 
		
		
	
		
			
			| 
				217
			 | 
			
				219
			 | 
			
			
				
				 	qp->send.is_send = 1; 
			 | 
		
		
	
		
			
			| 
				218
			 | 
			
				220
			 | 
			
			
				
				 	qp->send.cq = send_cq; 
			 | 
		
		
	
		
			
			| 
				219
			 | 
			
				
			 | 
			
			
				
				-	list_add ( &qp->send.list, &send_cq->work_queues ); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				221
			 | 
			
			
				
				+	list_add_tail ( &qp->send.list, &send_cq->work_queues ); 
			 | 
		
		
	
		
			
			| 
				220
			 | 
			
				222
			 | 
			
			
				
				 	qp->send.psn = ( random() & 0xffffffUL ); 
			 | 
		
		
	
		
			
			| 
				221
			 | 
			
				223
			 | 
			
			
				
				 	qp->send.num_wqes = num_send_wqes; 
			 | 
		
		
	
		
			
			| 
				222
			 | 
			
				224
			 | 
			
			
				
				 	qp->send.iobufs = ( ( ( void * ) qp ) + sizeof ( *qp ) ); 
			 | 
		
		
	
		
			
			| 
				223
			 | 
			
				225
			 | 
			
			
				
				 	qp->recv.qp = qp; 
			 | 
		
		
	
		
			
			| 
				224
			 | 
			
				226
			 | 
			
			
				
				 	qp->recv.cq = recv_cq; 
			 | 
		
		
	
		
			
			| 
				225
			 | 
			
				
			 | 
			
			
				
				-	list_add ( &qp->recv.list, &recv_cq->work_queues ); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				227
			 | 
			
			
				
				+	list_add_tail ( &qp->recv.list, &recv_cq->work_queues ); 
			 | 
		
		
	
		
			
			| 
				226
			 | 
			
				228
			 | 
			
			
				
				 	qp->recv.psn = ( random() & 0xffffffUL ); 
			 | 
		
		
	
		
			
			| 
				227
			 | 
			
				229
			 | 
			
			
				
				 	qp->recv.num_wqes = num_recv_wqes; 
			 | 
		
		
	
		
			
			| 
				228
			 | 
			
				230
			 | 
			
			
				
				 	qp->recv.iobufs = ( ( ( void * ) qp ) + sizeof ( *qp ) + 
			 | 
		
		
	
		
			
			| 
				229
			 | 
			
				231
			 | 
			
			
				
				 			    ( num_send_wqes * sizeof ( qp->send.iobufs[0] ) )); 
			 | 
		
		
	
		
			
			| 
				230
			 | 
			
				232
			 | 
			
			
				
				 	INIT_LIST_HEAD ( &qp->mgids ); 
			 | 
		
		
	
		
			
			| 
				231
			 | 
			
				233
			 | 
			
			
				
				 	qp->op = op; 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				234
			 | 
			
			
				
				+	qp->name = name; 
			 | 
		
		
	
		
			
			| 
				232
			 | 
			
				235
			 | 
			
			
				
				  
			 | 
		
		
	
		
			
			| 
				233
			 | 
			
				236
			 | 
			
			
				
				 	/* Perform device-specific initialisation and get QPN */ 
			 | 
		
		
	
		
			
			| 
				234
			 | 
			
				237
			 | 
			
			
				
				 	if ( ( rc = ibdev->op->create_qp ( ibdev, qp ) ) != 0 ) { 
			 | 
		
		
	
	
		
			
			| 
				
			 | 
			
			
				
				@@ -756,7 +759,7 @@ int ib_mcast_attach ( struct ib_device *ibdev, struct ib_queue_pair *qp, 
			 | 
		
		
	
		
			
			| 
				756
			 | 
			
				759
			 | 
			
			
				
				 		goto err_alloc_mgid; 
			 | 
		
		
	
		
			
			| 
				757
			 | 
			
				760
			 | 
			
			
				
				 	} 
			 | 
		
		
	
		
			
			| 
				758
			 | 
			
				761
			 | 
			
			
				
				 	memcpy ( &mgid->gid, gid, sizeof ( mgid->gid ) ); 
			 | 
		
		
	
		
			
			| 
				759
			 | 
			
				
			 | 
			
			
				
				-	list_add ( &mgid->list, &qp->mgids ); 
			 | 
		
		
	
		
			
			| 
				
			 | 
			
				762
			 | 
			
			
				
				+	list_add_tail ( &mgid->list, &qp->mgids ); 
			 | 
		
		
	
		
			
			| 
				760
			 | 
			
				763
			 | 
			
			
				
				  
			 | 
		
		
	
		
			
			| 
				761
			 | 
			
				764
			 | 
			
			
				
				 	/* Add to hardware multicast GID list */ 
			 | 
		
		
	
		
			
			| 
				762
			 | 
			
				765
			 | 
			
			
				
				 	if ( ( rc = ibdev->op->mcast_attach ( ibdev, qp, gid ) ) != 0 ) 
			 |