cm_id_priv        309 drivers/infiniband/core/cm.c static inline void cm_deref_id(struct cm_id_private *cm_id_priv)
cm_id_priv        311 drivers/infiniband/core/cm.c 	if (atomic_dec_and_test(&cm_id_priv->refcount))
cm_id_priv        312 drivers/infiniband/core/cm.c 		complete(&cm_id_priv->comp);
cm_id_priv        315 drivers/infiniband/core/cm.c static int cm_alloc_msg(struct cm_id_private *cm_id_priv,
cm_id_priv        328 drivers/infiniband/core/cm.c 	if (!cm_id_priv->prim_send_port_not_ready)
cm_id_priv        329 drivers/infiniband/core/cm.c 		av = &cm_id_priv->av;
cm_id_priv        330 drivers/infiniband/core/cm.c 	else if (!cm_id_priv->altr_send_port_not_ready &&
cm_id_priv        331 drivers/infiniband/core/cm.c 		 (cm_id_priv->alt_av.port))
cm_id_priv        332 drivers/infiniband/core/cm.c 		av = &cm_id_priv->alt_av;
cm_id_priv        341 drivers/infiniband/core/cm.c 	mad_agent = cm_id_priv->av.port->mad_agent;
cm_id_priv        353 drivers/infiniband/core/cm.c 	m = ib_create_send_mad(mad_agent, cm_id_priv->id.remote_cm_qpn,
cm_id_priv        366 drivers/infiniband/core/cm.c 	m->retries = cm_id_priv->max_cm_retries;
cm_id_priv        368 drivers/infiniband/core/cm.c 	atomic_inc(&cm_id_priv->refcount);
cm_id_priv        369 drivers/infiniband/core/cm.c 	m->context[0] = cm_id_priv;
cm_id_priv        446 drivers/infiniband/core/cm.c static void cm_set_private_data(struct cm_id_private *cm_id_priv,
cm_id_priv        449 drivers/infiniband/core/cm.c 	if (cm_id_priv->private_data && cm_id_priv->private_data_len)
cm_id_priv        450 drivers/infiniband/core/cm.c 		kfree(cm_id_priv->private_data);
cm_id_priv        452 drivers/infiniband/core/cm.c 	cm_id_priv->private_data = private_data;
cm_id_priv        453 drivers/infiniband/core/cm.c 	cm_id_priv->private_data_len = private_data_len;
cm_id_priv        492 drivers/infiniband/core/cm.c static int add_cm_id_to_port_list(struct cm_id_private *cm_id_priv,
cm_id_priv        501 drivers/infiniband/core/cm.c 	if (&cm_id_priv->av == av)
cm_id_priv        502 drivers/infiniband/core/cm.c 		list_add_tail(&cm_id_priv->prim_list, &port->cm_priv_prim_list);
cm_id_priv        503 drivers/infiniband/core/cm.c 	else if (&cm_id_priv->alt_av == av)
cm_id_priv        504 drivers/infiniband/core/cm.c 		list_add_tail(&cm_id_priv->altr_list, &port->cm_priv_altr_list);
cm_id_priv        556 drivers/infiniband/core/cm.c 			      struct cm_id_private *cm_id_priv)
cm_id_priv        591 drivers/infiniband/core/cm.c 	ret = add_cm_id_to_port_list(cm_id_priv, av, port);
cm_id_priv        612 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv        614 drivers/infiniband/core/cm.c 	cm_id_priv = xa_load(&cm.local_id_table, cm_local_id(local_id));
cm_id_priv        615 drivers/infiniband/core/cm.c 	if (cm_id_priv) {
cm_id_priv        616 drivers/infiniband/core/cm.c 		if (cm_id_priv->id.remote_id == remote_id)
cm_id_priv        617 drivers/infiniband/core/cm.c 			atomic_inc(&cm_id_priv->refcount);
cm_id_priv        619 drivers/infiniband/core/cm.c 			cm_id_priv = NULL;
cm_id_priv        622 drivers/infiniband/core/cm.c 	return cm_id_priv;
cm_id_priv        627 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv        630 drivers/infiniband/core/cm.c 	cm_id_priv = cm_get_id(local_id, remote_id);
cm_id_priv        633 drivers/infiniband/core/cm.c 	return cm_id_priv;
cm_id_priv        661 drivers/infiniband/core/cm.c static struct cm_id_private * cm_insert_listen(struct cm_id_private *cm_id_priv)
cm_id_priv        666 drivers/infiniband/core/cm.c 	__be64 service_id = cm_id_priv->id.service_id;
cm_id_priv        667 drivers/infiniband/core/cm.c 	__be64 service_mask = cm_id_priv->id.service_mask;
cm_id_priv        675 drivers/infiniband/core/cm.c 		    (cm_id_priv->id.device == cur_cm_id_priv->id.device))
cm_id_priv        678 drivers/infiniband/core/cm.c 		if (cm_id_priv->id.device < cur_cm_id_priv->id.device)
cm_id_priv        680 drivers/infiniband/core/cm.c 		else if (cm_id_priv->id.device > cur_cm_id_priv->id.device)
cm_id_priv        689 drivers/infiniband/core/cm.c 	rb_link_node(&cm_id_priv->service_node, parent, link);
cm_id_priv        690 drivers/infiniband/core/cm.c 	rb_insert_color(&cm_id_priv->service_node, &cm.listen_service_table);
cm_id_priv        698 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv        701 drivers/infiniband/core/cm.c 		cm_id_priv = rb_entry(node, struct cm_id_private, service_node);
cm_id_priv        702 drivers/infiniband/core/cm.c 		if ((cm_id_priv->id.service_mask & service_id) ==
cm_id_priv        703 drivers/infiniband/core/cm.c 		     cm_id_priv->id.service_id &&
cm_id_priv        704 drivers/infiniband/core/cm.c 		    (cm_id_priv->id.device == device))
cm_id_priv        705 drivers/infiniband/core/cm.c 			return cm_id_priv;
cm_id_priv        707 drivers/infiniband/core/cm.c 		if (device < cm_id_priv->id.device)
cm_id_priv        709 drivers/infiniband/core/cm.c 		else if (device > cm_id_priv->id.device)
cm_id_priv        711 drivers/infiniband/core/cm.c 		else if (be64_lt(service_id, cm_id_priv->id.service_id))
cm_id_priv        713 drivers/infiniband/core/cm.c 		else if (be64_gt(service_id, cm_id_priv->id.service_id))
cm_id_priv        805 drivers/infiniband/core/cm.c 						    *cm_id_priv)
cm_id_priv        810 drivers/infiniband/core/cm.c 	union ib_gid *port_gid = &cm_id_priv->av.dgid;
cm_id_priv        811 drivers/infiniband/core/cm.c 	__be32 remote_id = cm_id_priv->id.remote_id;
cm_id_priv        833 drivers/infiniband/core/cm.c 	rb_link_node(&cm_id_priv->sidr_id_node, parent, link);
cm_id_priv        834 drivers/infiniband/core/cm.c 	rb_insert_color(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
cm_id_priv        838 drivers/infiniband/core/cm.c static void cm_reject_sidr_req(struct cm_id_private *cm_id_priv,
cm_id_priv        845 drivers/infiniband/core/cm.c 	ib_send_cm_sidr_rep(&cm_id_priv->id, &param);
cm_id_priv        852 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv        856 drivers/infiniband/core/cm.c 	cm_id_priv = kzalloc(sizeof *cm_id_priv, GFP_KERNEL);
cm_id_priv        857 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv        860 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_IDLE;
cm_id_priv        861 drivers/infiniband/core/cm.c 	cm_id_priv->id.device = device;
cm_id_priv        862 drivers/infiniband/core/cm.c 	cm_id_priv->id.cm_handler = cm_handler;
cm_id_priv        863 drivers/infiniband/core/cm.c 	cm_id_priv->id.context = context;
cm_id_priv        864 drivers/infiniband/core/cm.c 	cm_id_priv->id.remote_cm_qpn = 1;
cm_id_priv        866 drivers/infiniband/core/cm.c 	spin_lock_init(&cm_id_priv->lock);
cm_id_priv        867 drivers/infiniband/core/cm.c 	init_completion(&cm_id_priv->comp);
cm_id_priv        868 drivers/infiniband/core/cm.c 	INIT_LIST_HEAD(&cm_id_priv->work_list);
cm_id_priv        869 drivers/infiniband/core/cm.c 	INIT_LIST_HEAD(&cm_id_priv->prim_list);
cm_id_priv        870 drivers/infiniband/core/cm.c 	INIT_LIST_HEAD(&cm_id_priv->altr_list);
cm_id_priv        871 drivers/infiniband/core/cm.c 	atomic_set(&cm_id_priv->work_count, -1);
cm_id_priv        872 drivers/infiniband/core/cm.c 	atomic_set(&cm_id_priv->refcount, 1);
cm_id_priv        878 drivers/infiniband/core/cm.c 	cm_id_priv->id.local_id = (__force __be32)id ^ cm.random_id_operand;
cm_id_priv        879 drivers/infiniband/core/cm.c 	xa_store_irq(&cm.local_id_table, cm_local_id(cm_id_priv->id.local_id),
cm_id_priv        880 drivers/infiniband/core/cm.c 		     cm_id_priv, GFP_KERNEL);
cm_id_priv        882 drivers/infiniband/core/cm.c 	return &cm_id_priv->id;
cm_id_priv        885 drivers/infiniband/core/cm.c 	kfree(cm_id_priv);
cm_id_priv        890 drivers/infiniband/core/cm.c static struct cm_work * cm_dequeue_work(struct cm_id_private *cm_id_priv)
cm_id_priv        894 drivers/infiniband/core/cm.c 	if (list_empty(&cm_id_priv->work_list))
cm_id_priv        897 drivers/infiniband/core/cm.c 	work = list_entry(cm_id_priv->work_list.next, struct cm_work, list);
cm_id_priv        961 drivers/infiniband/core/cm.c static void cm_enter_timewait(struct cm_id_private *cm_id_priv)
cm_id_priv        967 drivers/infiniband/core/cm.c 	cm_dev = ib_get_client_data(cm_id_priv->id.device, &cm_client);
cm_id_priv        972 drivers/infiniband/core/cm.c 	cm_cleanup_timewait(cm_id_priv->timewait_info);
cm_id_priv        973 drivers/infiniband/core/cm.c 	list_add_tail(&cm_id_priv->timewait_info->list, &cm.timewait_list);
cm_id_priv        981 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_TIMEWAIT;
cm_id_priv        982 drivers/infiniband/core/cm.c 	wait_time = cm_convert_to_ms(cm_id_priv->av.timeout);
cm_id_priv        987 drivers/infiniband/core/cm.c 		queue_delayed_work(cm.wq, &cm_id_priv->timewait_info->work.work,
cm_id_priv        991 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info = NULL;
cm_id_priv        994 drivers/infiniband/core/cm.c static void cm_reset_to_idle(struct cm_id_private *cm_id_priv)
cm_id_priv        998 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_IDLE;
cm_id_priv        999 drivers/infiniband/core/cm.c 	if (cm_id_priv->timewait_info) {
cm_id_priv       1001 drivers/infiniband/core/cm.c 		cm_cleanup_timewait(cm_id_priv->timewait_info);
cm_id_priv       1003 drivers/infiniband/core/cm.c 		kfree(cm_id_priv->timewait_info);
cm_id_priv       1004 drivers/infiniband/core/cm.c 		cm_id_priv->timewait_info = NULL;
cm_id_priv       1010 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       1013 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       1015 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       1018 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1021 drivers/infiniband/core/cm.c 		if (--cm_id_priv->listen_sharecount > 0) {
cm_id_priv       1023 drivers/infiniband/core/cm.c 			cm_deref_id(cm_id_priv);
cm_id_priv       1027 drivers/infiniband/core/cm.c 		rb_erase(&cm_id_priv->service_node, &cm.listen_service_table);
cm_id_priv       1032 drivers/infiniband/core/cm.c 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       1033 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1036 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1037 drivers/infiniband/core/cm.c 		cm_reject_sidr_req(cm_id_priv, IB_SIDR_REJECT);
cm_id_priv       1039 drivers/infiniband/core/cm.c 		if (!RB_EMPTY_NODE(&cm_id_priv->sidr_id_node))
cm_id_priv       1040 drivers/infiniband/core/cm.c 			rb_erase(&cm_id_priv->sidr_id_node,
cm_id_priv       1046 drivers/infiniband/core/cm.c 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       1047 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1049 drivers/infiniband/core/cm.c 			       &cm_id_priv->id.device->node_guid,
cm_id_priv       1050 drivers/infiniband/core/cm.c 			       sizeof cm_id_priv->id.device->node_guid,
cm_id_priv       1056 drivers/infiniband/core/cm.c 			cm_reset_to_idle(cm_id_priv);
cm_id_priv       1057 drivers/infiniband/core/cm.c 			spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1059 drivers/infiniband/core/cm.c 			spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1066 drivers/infiniband/core/cm.c 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       1071 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1076 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1077 drivers/infiniband/core/cm.c 		if (cm_id_priv->qp_type == IB_QPT_XRC_TGT)
cm_id_priv       1082 drivers/infiniband/core/cm.c 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       1083 drivers/infiniband/core/cm.c 		cm_enter_timewait(cm_id_priv);
cm_id_priv       1084 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1087 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1091 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1096 drivers/infiniband/core/cm.c 	if (!list_empty(&cm_id_priv->altr_list) &&
cm_id_priv       1097 drivers/infiniband/core/cm.c 	    (!cm_id_priv->altr_send_port_not_ready))
cm_id_priv       1098 drivers/infiniband/core/cm.c 		list_del(&cm_id_priv->altr_list);
cm_id_priv       1099 drivers/infiniband/core/cm.c 	if (!list_empty(&cm_id_priv->prim_list) &&
cm_id_priv       1100 drivers/infiniband/core/cm.c 	    (!cm_id_priv->prim_send_port_not_ready))
cm_id_priv       1101 drivers/infiniband/core/cm.c 		list_del(&cm_id_priv->prim_list);
cm_id_priv       1105 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       1106 drivers/infiniband/core/cm.c 	wait_for_completion(&cm_id_priv->comp);
cm_id_priv       1107 drivers/infiniband/core/cm.c 	while ((work = cm_dequeue_work(cm_id_priv)) != NULL)
cm_id_priv       1110 drivers/infiniband/core/cm.c 	rdma_destroy_ah_attr(&cm_id_priv->av.ah_attr);
cm_id_priv       1111 drivers/infiniband/core/cm.c 	rdma_destroy_ah_attr(&cm_id_priv->alt_av.ah_attr);
cm_id_priv       1112 drivers/infiniband/core/cm.c 	kfree(cm_id_priv->private_data);
cm_id_priv       1113 drivers/infiniband/core/cm.c 	kfree(cm_id_priv);
cm_id_priv       1138 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv, *cur_cm_id_priv;
cm_id_priv       1147 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       1152 drivers/infiniband/core/cm.c 	++cm_id_priv->listen_sharecount;
cm_id_priv       1161 drivers/infiniband/core/cm.c 	cur_cm_id_priv = cm_insert_listen(cm_id_priv);
cm_id_priv       1165 drivers/infiniband/core/cm.c 		--cm_id_priv->listen_sharecount;
cm_id_priv       1204 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       1220 drivers/infiniband/core/cm.c 	cm_id_priv = cm_find_listen(device, service_id);
cm_id_priv       1221 drivers/infiniband/core/cm.c 	if (cm_id_priv) {
cm_id_priv       1229 drivers/infiniband/core/cm.c 		atomic_inc(&cm_id_priv->refcount);
cm_id_priv       1230 drivers/infiniband/core/cm.c 		++cm_id_priv->listen_sharecount;
cm_id_priv       1234 drivers/infiniband/core/cm.c 		cm_id = &cm_id_priv->id;
cm_id_priv       1252 drivers/infiniband/core/cm.c static __be64 cm_form_tid(struct cm_id_private *cm_id_priv)
cm_id_priv       1256 drivers/infiniband/core/cm.c 	hi_tid   = ((u64) cm_id_priv->av.port->mad_agent->hi_tid) << 32;
cm_id_priv       1257 drivers/infiniband/core/cm.c 	low_tid  = (u64)cm_id_priv->id.local_id;
cm_id_priv       1273 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       1285 drivers/infiniband/core/cm.c 			  cm_form_tid(cm_id_priv));
cm_id_priv       1287 drivers/infiniband/core/cm.c 	req_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       1289 drivers/infiniband/core/cm.c 	req_msg->local_ca_guid = cm_id_priv->id.device->node_guid;
cm_id_priv       1335 drivers/infiniband/core/cm.c 		cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay,
cm_id_priv       1370 drivers/infiniband/core/cm.c 			cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay,
cm_id_priv       1407 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       1417 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       1418 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       1420 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1424 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1426 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv->
cm_id_priv       1428 drivers/infiniband/core/cm.c 	if (IS_ERR(cm_id_priv->timewait_info)) {
cm_id_priv       1429 drivers/infiniband/core/cm.c 		ret = PTR_ERR(cm_id_priv->timewait_info);
cm_id_priv       1434 drivers/infiniband/core/cm.c 				 param->ppath_sgid_attr, &cm_id_priv->av,
cm_id_priv       1435 drivers/infiniband/core/cm.c 				 cm_id_priv);
cm_id_priv       1440 drivers/infiniband/core/cm.c 					 &cm_id_priv->alt_av, cm_id_priv);
cm_id_priv       1446 drivers/infiniband/core/cm.c 	cm_id_priv->timeout_ms = cm_convert_to_ms(
cm_id_priv       1450 drivers/infiniband/core/cm.c 	cm_id_priv->max_cm_retries = param->max_cm_retries;
cm_id_priv       1451 drivers/infiniband/core/cm.c 	cm_id_priv->initiator_depth = param->initiator_depth;
cm_id_priv       1452 drivers/infiniband/core/cm.c 	cm_id_priv->responder_resources = param->responder_resources;
cm_id_priv       1453 drivers/infiniband/core/cm.c 	cm_id_priv->retry_count = param->retry_count;
cm_id_priv       1454 drivers/infiniband/core/cm.c 	cm_id_priv->path_mtu = param->primary_path->mtu;
cm_id_priv       1455 drivers/infiniband/core/cm.c 	cm_id_priv->pkey = param->primary_path->pkey;
cm_id_priv       1456 drivers/infiniband/core/cm.c 	cm_id_priv->qp_type = param->qp_type;
cm_id_priv       1458 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &cm_id_priv->msg);
cm_id_priv       1462 drivers/infiniband/core/cm.c 	req_msg = (struct cm_req_msg *) cm_id_priv->msg->mad;
cm_id_priv       1463 drivers/infiniband/core/cm.c 	cm_format_req(req_msg, cm_id_priv, param);
cm_id_priv       1464 drivers/infiniband/core/cm.c 	cm_id_priv->tid = req_msg->hdr.tid;
cm_id_priv       1465 drivers/infiniband/core/cm.c 	cm_id_priv->msg->timeout_ms = cm_id_priv->timeout_ms;
cm_id_priv       1466 drivers/infiniband/core/cm.c 	cm_id_priv->msg->context[1] = (void *) (unsigned long) IB_CM_REQ_SENT;
cm_id_priv       1468 drivers/infiniband/core/cm.c 	cm_id_priv->local_qpn = cm_req_get_local_qpn(req_msg);
cm_id_priv       1469 drivers/infiniband/core/cm.c 	cm_id_priv->rq_psn = cm_req_get_starting_psn(req_msg);
cm_id_priv       1471 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       1472 drivers/infiniband/core/cm.c 	ret = ib_post_send_mad(cm_id_priv->msg, NULL);
cm_id_priv       1474 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1479 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1482 drivers/infiniband/core/cm.c error2:	cm_free_msg(cm_id_priv->msg);
cm_id_priv       1483 drivers/infiniband/core/cm.c error1:	kfree(cm_id_priv->timewait_info);
cm_id_priv       1678 drivers/infiniband/core/cm.c 				struct cm_id_private *cm_id_priv,
cm_id_priv       1688 drivers/infiniband/core/cm.c 	param->port = cm_id_priv->av.port->port_num;
cm_id_priv       1712 drivers/infiniband/core/cm.c 	param->ppath_sgid_attr = cm_id_priv->av.ah_attr.grh.sgid_attr;
cm_id_priv       1716 drivers/infiniband/core/cm.c static void cm_process_work(struct cm_id_private *cm_id_priv,
cm_id_priv       1722 drivers/infiniband/core/cm.c 	ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, &work->cm_event);
cm_id_priv       1725 drivers/infiniband/core/cm.c 	while (!ret && !atomic_add_negative(-1, &cm_id_priv->work_count)) {
cm_id_priv       1726 drivers/infiniband/core/cm.c 		spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       1727 drivers/infiniband/core/cm.c 		work = cm_dequeue_work(cm_id_priv);
cm_id_priv       1728 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1732 drivers/infiniband/core/cm.c 		ret = cm_id_priv->id.cm_handler(&cm_id_priv->id,
cm_id_priv       1736 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       1738 drivers/infiniband/core/cm.c 		cm_destroy_id(&cm_id_priv->id, ret);
cm_id_priv       1742 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       1746 drivers/infiniband/core/cm.c 	cm_format_mad_hdr(&mra_msg->hdr, CM_MRA_ATTR_ID, cm_id_priv->tid);
cm_id_priv       1748 drivers/infiniband/core/cm.c 	mra_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       1749 drivers/infiniband/core/cm.c 	mra_msg->remote_comm_id = cm_id_priv->id.remote_id;
cm_id_priv       1757 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       1764 drivers/infiniband/core/cm.c 	cm_format_mad_hdr(&rej_msg->hdr, CM_REJ_ATTR_ID, cm_id_priv->tid);
cm_id_priv       1765 drivers/infiniband/core/cm.c 	rej_msg->remote_comm_id = cm_id_priv->id.remote_id;
cm_id_priv       1767 drivers/infiniband/core/cm.c 	switch(cm_id_priv->id.state) {
cm_id_priv       1773 drivers/infiniband/core/cm.c 		rej_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       1778 drivers/infiniband/core/cm.c 		rej_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       1782 drivers/infiniband/core/cm.c 		rej_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       1798 drivers/infiniband/core/cm.c 			       struct cm_id_private *cm_id_priv)
cm_id_priv       1807 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state == IB_CM_REQ_RCVD)
cm_id_priv       1814 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       1815 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.state) {
cm_id_priv       1817 drivers/infiniband/core/cm.c 		cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv,
cm_id_priv       1818 drivers/infiniband/core/cm.c 			      CM_MSG_RESPONSE_REQ, cm_id_priv->service_timeout,
cm_id_priv       1819 drivers/infiniband/core/cm.c 			      cm_id_priv->private_data,
cm_id_priv       1820 drivers/infiniband/core/cm.c 			      cm_id_priv->private_data_len);
cm_id_priv       1823 drivers/infiniband/core/cm.c 		cm_format_rej((struct cm_rej_msg *) msg->mad, cm_id_priv,
cm_id_priv       1829 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1836 drivers/infiniband/core/cm.c unlock:	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       1841 drivers/infiniband/core/cm.c 					   struct cm_id_private *cm_id_priv)
cm_id_priv       1852 drivers/infiniband/core/cm.c 	timewait_info = cm_insert_remote_id(cm_id_priv->timewait_info);
cm_id_priv       1865 drivers/infiniband/core/cm.c 	timewait_info = cm_insert_remote_qpn(cm_id_priv->timewait_info);
cm_id_priv       1867 drivers/infiniband/core/cm.c 		cm_cleanup_timewait(cm_id_priv->timewait_info);
cm_id_priv       1884 drivers/infiniband/core/cm.c 	listen_cm_id_priv = cm_find_listen(cm_id_priv->id.device,
cm_id_priv       1887 drivers/infiniband/core/cm.c 		cm_cleanup_timewait(cm_id_priv->timewait_info);
cm_id_priv       1895 drivers/infiniband/core/cm.c 	atomic_inc(&cm_id_priv->refcount);
cm_id_priv       1896 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_REQ_RCVD;
cm_id_priv       1897 drivers/infiniband/core/cm.c 	atomic_inc(&cm_id_priv->work_count);
cm_id_priv       1934 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv, *listen_cm_id_priv;
cm_id_priv       1946 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       1947 drivers/infiniband/core/cm.c 	cm_id_priv->id.remote_id = req_msg->local_comm_id;
cm_id_priv       1950 drivers/infiniband/core/cm.c 				      &cm_id_priv->av);
cm_id_priv       1953 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv->
cm_id_priv       1955 drivers/infiniband/core/cm.c 	if (IS_ERR(cm_id_priv->timewait_info)) {
cm_id_priv       1956 drivers/infiniband/core/cm.c 		ret = PTR_ERR(cm_id_priv->timewait_info);
cm_id_priv       1959 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info->work.remote_id = req_msg->local_comm_id;
cm_id_priv       1960 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info->remote_ca_guid = req_msg->local_ca_guid;
cm_id_priv       1961 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info->remote_qpn = cm_req_get_local_qpn(req_msg);
cm_id_priv       1963 drivers/infiniband/core/cm.c 	listen_cm_id_priv = cm_match_req(work, cm_id_priv);
cm_id_priv       1971 drivers/infiniband/core/cm.c 	cm_id_priv->id.cm_handler = listen_cm_id_priv->id.cm_handler;
cm_id_priv       1972 drivers/infiniband/core/cm.c 	cm_id_priv->id.context = listen_cm_id_priv->id.context;
cm_id_priv       1973 drivers/infiniband/core/cm.c 	cm_id_priv->id.service_id = req_msg->service_id;
cm_id_priv       1974 drivers/infiniband/core/cm.c 	cm_id_priv->id.service_mask = ~cpu_to_be64(0);
cm_id_priv       1981 drivers/infiniband/core/cm.c 	grh = rdma_ah_read_grh(&cm_id_priv->av.ah_attr);
cm_id_priv       1999 drivers/infiniband/core/cm.c 	if (cm_id_priv->av.ah_attr.type == RDMA_AH_ATTR_TYPE_ROCE)
cm_id_priv       2001 drivers/infiniband/core/cm.c 				 cm_id_priv->av.ah_attr.roce.dmac);
cm_id_priv       2003 drivers/infiniband/core/cm.c 	ret = cm_init_av_by_path(&work->path[0], gid_attr, &cm_id_priv->av,
cm_id_priv       2004 drivers/infiniband/core/cm.c 				 cm_id_priv);
cm_id_priv       2023 drivers/infiniband/core/cm.c 					 &cm_id_priv->alt_av, cm_id_priv);
cm_id_priv       2031 drivers/infiniband/core/cm.c 	cm_id_priv->tid = req_msg->hdr.tid;
cm_id_priv       2032 drivers/infiniband/core/cm.c 	cm_id_priv->timeout_ms = cm_convert_to_ms(
cm_id_priv       2034 drivers/infiniband/core/cm.c 	cm_id_priv->max_cm_retries = cm_req_get_max_cm_retries(req_msg);
cm_id_priv       2035 drivers/infiniband/core/cm.c 	cm_id_priv->remote_qpn = cm_req_get_local_qpn(req_msg);
cm_id_priv       2036 drivers/infiniband/core/cm.c 	cm_id_priv->initiator_depth = cm_req_get_resp_res(req_msg);
cm_id_priv       2037 drivers/infiniband/core/cm.c 	cm_id_priv->responder_resources = cm_req_get_init_depth(req_msg);
cm_id_priv       2038 drivers/infiniband/core/cm.c 	cm_id_priv->path_mtu = cm_req_get_path_mtu(req_msg);
cm_id_priv       2039 drivers/infiniband/core/cm.c 	cm_id_priv->pkey = req_msg->pkey;
cm_id_priv       2040 drivers/infiniband/core/cm.c 	cm_id_priv->sq_psn = cm_req_get_starting_psn(req_msg);
cm_id_priv       2041 drivers/infiniband/core/cm.c 	cm_id_priv->retry_count = cm_req_get_retry_count(req_msg);
cm_id_priv       2042 drivers/infiniband/core/cm.c 	cm_id_priv->rnr_retry_count = cm_req_get_rnr_retry_count(req_msg);
cm_id_priv       2043 drivers/infiniband/core/cm.c 	cm_id_priv->qp_type = cm_req_get_qp_type(req_msg);
cm_id_priv       2045 drivers/infiniband/core/cm.c 	cm_format_req_event(work, cm_id_priv, &listen_cm_id_priv->id);
cm_id_priv       2046 drivers/infiniband/core/cm.c 	cm_process_work(cm_id_priv, work);
cm_id_priv       2051 drivers/infiniband/core/cm.c 	atomic_dec(&cm_id_priv->refcount);
cm_id_priv       2054 drivers/infiniband/core/cm.c 	kfree(cm_id_priv->timewait_info);
cm_id_priv       2061 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       2064 drivers/infiniband/core/cm.c 	cm_format_mad_hdr(&rep_msg->hdr, CM_REP_ATTR_ID, cm_id_priv->tid);
cm_id_priv       2065 drivers/infiniband/core/cm.c 	rep_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       2066 drivers/infiniband/core/cm.c 	rep_msg->remote_comm_id = cm_id_priv->id.remote_id;
cm_id_priv       2070 drivers/infiniband/core/cm.c 				    cm_id_priv->av.port->cm_dev->ack_delay);
cm_id_priv       2073 drivers/infiniband/core/cm.c 	rep_msg->local_ca_guid = cm_id_priv->id.device->node_guid;
cm_id_priv       2075 drivers/infiniband/core/cm.c 	if (cm_id_priv->qp_type != IB_QPT_XRC_TGT) {
cm_id_priv       2093 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2103 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       2104 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       2108 drivers/infiniband/core/cm.c 			 be32_to_cpu(cm_id_priv->id.local_id), cm_id->state);
cm_id_priv       2113 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       2118 drivers/infiniband/core/cm.c 	cm_format_rep(rep_msg, cm_id_priv, param);
cm_id_priv       2119 drivers/infiniband/core/cm.c 	msg->timeout_ms = cm_id_priv->timeout_ms;
cm_id_priv       2124 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2130 drivers/infiniband/core/cm.c 	cm_id_priv->msg = msg;
cm_id_priv       2131 drivers/infiniband/core/cm.c 	cm_id_priv->initiator_depth = param->initiator_depth;
cm_id_priv       2132 drivers/infiniband/core/cm.c 	cm_id_priv->responder_resources = param->responder_resources;
cm_id_priv       2133 drivers/infiniband/core/cm.c 	cm_id_priv->rq_psn = cm_rep_get_starting_psn(rep_msg);
cm_id_priv       2134 drivers/infiniband/core/cm.c 	cm_id_priv->local_qpn = cpu_to_be32(param->qp_num & 0xFFFFFF);
cm_id_priv       2136 drivers/infiniband/core/cm.c out:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2142 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       2146 drivers/infiniband/core/cm.c 	cm_format_mad_hdr(&rtu_msg->hdr, CM_RTU_ATTR_ID, cm_id_priv->tid);
cm_id_priv       2147 drivers/infiniband/core/cm.c 	rtu_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       2148 drivers/infiniband/core/cm.c 	rtu_msg->remote_comm_id = cm_id_priv->id.remote_id;
cm_id_priv       2158 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2171 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       2172 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       2181 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       2185 drivers/infiniband/core/cm.c 	cm_format_rtu((struct cm_rtu_msg *) msg->mad, cm_id_priv,
cm_id_priv       2190 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2197 drivers/infiniband/core/cm.c 	cm_set_private_data(cm_id_priv, data, private_data_len);
cm_id_priv       2198 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2201 drivers/infiniband/core/cm.c error:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2230 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2236 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(rep_msg->remote_comm_id,
cm_id_priv       2238 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       2247 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       2248 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state == IB_CM_ESTABLISHED)
cm_id_priv       2249 drivers/infiniband/core/cm.c 		cm_format_rtu((struct cm_rtu_msg *) msg->mad, cm_id_priv,
cm_id_priv       2250 drivers/infiniband/core/cm.c 			      cm_id_priv->private_data,
cm_id_priv       2251 drivers/infiniband/core/cm.c 			      cm_id_priv->private_data_len);
cm_id_priv       2252 drivers/infiniband/core/cm.c 	else if (cm_id_priv->id.state == IB_CM_MRA_REP_SENT)
cm_id_priv       2253 drivers/infiniband/core/cm.c 		cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv,
cm_id_priv       2254 drivers/infiniband/core/cm.c 			      CM_MSG_RESPONSE_REP, cm_id_priv->service_timeout,
cm_id_priv       2255 drivers/infiniband/core/cm.c 			      cm_id_priv->private_data,
cm_id_priv       2256 drivers/infiniband/core/cm.c 			      cm_id_priv->private_data_len);
cm_id_priv       2259 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2266 drivers/infiniband/core/cm.c unlock:	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2268 drivers/infiniband/core/cm.c deref:	cm_deref_id(cm_id_priv);
cm_id_priv       2273 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2281 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(rep_msg->remote_comm_id, 0);
cm_id_priv       2282 drivers/infiniband/core/cm.c 	if (!cm_id_priv) {
cm_id_priv       2289 drivers/infiniband/core/cm.c 	cm_format_rep_event(work, cm_id_priv->qp_type);
cm_id_priv       2291 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       2292 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.state) {
cm_id_priv       2297 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2300 drivers/infiniband/core/cm.c 			 __func__, cm_id_priv->id.state,
cm_id_priv       2306 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info->work.remote_id = rep_msg->local_comm_id;
cm_id_priv       2307 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info->remote_ca_guid = rep_msg->local_ca_guid;
cm_id_priv       2308 drivers/infiniband/core/cm.c 	cm_id_priv->timewait_info->remote_qpn = cm_rep_get_qpn(rep_msg, cm_id_priv->qp_type);
cm_id_priv       2312 drivers/infiniband/core/cm.c 	if (cm_insert_remote_id(cm_id_priv->timewait_info)) {
cm_id_priv       2314 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2321 drivers/infiniband/core/cm.c 	timewait_info = cm_insert_remote_qpn(cm_id_priv->timewait_info);
cm_id_priv       2323 drivers/infiniband/core/cm.c 		rb_erase(&cm_id_priv->timewait_info->remote_id_node,
cm_id_priv       2325 drivers/infiniband/core/cm.c 		cm_id_priv->timewait_info->inserted_remote_id = 0;
cm_id_priv       2330 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2349 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_REP_RCVD;
cm_id_priv       2350 drivers/infiniband/core/cm.c 	cm_id_priv->id.remote_id = rep_msg->local_comm_id;
cm_id_priv       2351 drivers/infiniband/core/cm.c 	cm_id_priv->remote_qpn = cm_rep_get_qpn(rep_msg, cm_id_priv->qp_type);
cm_id_priv       2352 drivers/infiniband/core/cm.c 	cm_id_priv->initiator_depth = rep_msg->resp_resources;
cm_id_priv       2353 drivers/infiniband/core/cm.c 	cm_id_priv->responder_resources = rep_msg->initiator_depth;
cm_id_priv       2354 drivers/infiniband/core/cm.c 	cm_id_priv->sq_psn = cm_rep_get_starting_psn(rep_msg);
cm_id_priv       2355 drivers/infiniband/core/cm.c 	cm_id_priv->rnr_retry_count = cm_rep_get_rnr_retry_count(rep_msg);
cm_id_priv       2356 drivers/infiniband/core/cm.c 	cm_id_priv->target_ack_delay = cm_rep_get_target_ack_delay(rep_msg);
cm_id_priv       2357 drivers/infiniband/core/cm.c 	cm_id_priv->av.timeout =
cm_id_priv       2358 drivers/infiniband/core/cm.c 			cm_ack_timeout(cm_id_priv->target_ack_delay,
cm_id_priv       2359 drivers/infiniband/core/cm.c 				       cm_id_priv->av.timeout - 1);
cm_id_priv       2360 drivers/infiniband/core/cm.c 	cm_id_priv->alt_av.timeout =
cm_id_priv       2361 drivers/infiniband/core/cm.c 			cm_ack_timeout(cm_id_priv->target_ack_delay,
cm_id_priv       2362 drivers/infiniband/core/cm.c 				       cm_id_priv->alt_av.timeout - 1);
cm_id_priv       2366 drivers/infiniband/core/cm.c 	ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2367 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       2369 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       2370 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2373 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       2375 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       2379 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       2385 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2389 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(work->local_id, work->remote_id);
cm_id_priv       2390 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       2393 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       2394 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state != IB_CM_ESTABLISHED) {
cm_id_priv       2395 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2399 drivers/infiniband/core/cm.c 	ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2400 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       2402 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       2403 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2406 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       2408 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       2411 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       2417 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2422 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(rtu_msg->remote_comm_id,
cm_id_priv       2424 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       2429 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       2430 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state != IB_CM_REP_SENT &&
cm_id_priv       2431 drivers/infiniband/core/cm.c 	    cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) {
cm_id_priv       2432 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2437 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_ESTABLISHED;
cm_id_priv       2439 drivers/infiniband/core/cm.c 	ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2440 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       2442 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       2443 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2446 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       2448 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       2451 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       2456 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       2461 drivers/infiniband/core/cm.c 			  cm_form_tid(cm_id_priv));
cm_id_priv       2462 drivers/infiniband/core/cm.c 	dreq_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       2463 drivers/infiniband/core/cm.c 	dreq_msg->remote_comm_id = cm_id_priv->id.remote_id;
cm_id_priv       2464 drivers/infiniband/core/cm.c 	cm_dreq_set_remote_qpn(dreq_msg, cm_id_priv->remote_qpn);
cm_id_priv       2474 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2482 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       2483 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       2493 drivers/infiniband/core/cm.c 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2495 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       2497 drivers/infiniband/core/cm.c 		cm_enter_timewait(cm_id_priv);
cm_id_priv       2501 drivers/infiniband/core/cm.c 	cm_format_dreq((struct cm_dreq_msg *) msg->mad, cm_id_priv,
cm_id_priv       2503 drivers/infiniband/core/cm.c 	msg->timeout_ms = cm_id_priv->timeout_ms;
cm_id_priv       2508 drivers/infiniband/core/cm.c 		cm_enter_timewait(cm_id_priv);
cm_id_priv       2509 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2515 drivers/infiniband/core/cm.c 	cm_id_priv->msg = msg;
cm_id_priv       2516 drivers/infiniband/core/cm.c out:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2522 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       2526 drivers/infiniband/core/cm.c 	cm_format_mad_hdr(&drep_msg->hdr, CM_DREP_ATTR_ID, cm_id_priv->tid);
cm_id_priv       2527 drivers/infiniband/core/cm.c 	drep_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       2528 drivers/infiniband/core/cm.c 	drep_msg->remote_comm_id = cm_id_priv->id.remote_id;
cm_id_priv       2538 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2551 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       2552 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       2554 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2561 drivers/infiniband/core/cm.c 	cm_set_private_data(cm_id_priv, data, private_data_len);
cm_id_priv       2562 drivers/infiniband/core/cm.c 	cm_enter_timewait(cm_id_priv);
cm_id_priv       2564 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       2568 drivers/infiniband/core/cm.c 	cm_format_drep((struct cm_drep_msg *) msg->mad, cm_id_priv,
cm_id_priv       2573 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2578 drivers/infiniband/core/cm.c out:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2611 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2617 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(dreq_msg->remote_comm_id,
cm_id_priv       2619 drivers/infiniband/core/cm.c 	if (!cm_id_priv) {
cm_id_priv       2631 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       2632 drivers/infiniband/core/cm.c 	if (cm_id_priv->local_qpn != cm_dreq_get_remote_qpn(dreq_msg))
cm_id_priv       2635 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.state) {
cm_id_priv       2638 drivers/infiniband/core/cm.c 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2641 drivers/infiniband/core/cm.c 		if (cm_id_priv->id.lap_state == IB_CM_LAP_SENT ||
cm_id_priv       2642 drivers/infiniband/core/cm.c 		    cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
cm_id_priv       2643 drivers/infiniband/core/cm.c 			ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2654 drivers/infiniband/core/cm.c 		cm_format_drep((struct cm_drep_msg *) msg->mad, cm_id_priv,
cm_id_priv       2655 drivers/infiniband/core/cm.c 			       cm_id_priv->private_data,
cm_id_priv       2656 drivers/infiniband/core/cm.c 			       cm_id_priv->private_data_len);
cm_id_priv       2657 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2669 drivers/infiniband/core/cm.c 			 __func__, be32_to_cpu(cm_id_priv->id.local_id),
cm_id_priv       2670 drivers/infiniband/core/cm.c 			 cm_id_priv->id.state);
cm_id_priv       2673 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_DREQ_RCVD;
cm_id_priv       2674 drivers/infiniband/core/cm.c 	cm_id_priv->tid = dreq_msg->hdr.tid;
cm_id_priv       2675 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       2677 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       2678 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2681 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       2683 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       2686 drivers/infiniband/core/cm.c unlock:	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2687 drivers/infiniband/core/cm.c deref:	cm_deref_id(cm_id_priv);
cm_id_priv       2693 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2698 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(drep_msg->remote_comm_id,
cm_id_priv       2700 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       2705 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       2706 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state != IB_CM_DREQ_SENT &&
cm_id_priv       2707 drivers/infiniband/core/cm.c 	    cm_id_priv->id.state != IB_CM_DREQ_RCVD) {
cm_id_priv       2708 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2711 drivers/infiniband/core/cm.c 	cm_enter_timewait(cm_id_priv);
cm_id_priv       2713 drivers/infiniband/core/cm.c 	ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2714 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       2716 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       2717 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2720 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       2722 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       2725 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       2736 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2745 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       2747 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       2755 drivers/infiniband/core/cm.c 		ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       2758 drivers/infiniband/core/cm.c 				      cm_id_priv, reason, ari, ari_length,
cm_id_priv       2761 drivers/infiniband/core/cm.c 		cm_reset_to_idle(cm_id_priv);
cm_id_priv       2765 drivers/infiniband/core/cm.c 		ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       2768 drivers/infiniband/core/cm.c 				      cm_id_priv, reason, ari, ari_length,
cm_id_priv       2771 drivers/infiniband/core/cm.c 		cm_enter_timewait(cm_id_priv);
cm_id_priv       2775 drivers/infiniband/core/cm.c 			 be32_to_cpu(cm_id_priv->id.local_id), cm_id->state);
cm_id_priv       2787 drivers/infiniband/core/cm.c out:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2808 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2821 drivers/infiniband/core/cm.c 		cm_id_priv = xa_load(&cm.local_id_table,
cm_id_priv       2823 drivers/infiniband/core/cm.c 		if (cm_id_priv) {
cm_id_priv       2824 drivers/infiniband/core/cm.c 			if (cm_id_priv->id.remote_id == remote_id)
cm_id_priv       2825 drivers/infiniband/core/cm.c 				atomic_inc(&cm_id_priv->refcount);
cm_id_priv       2827 drivers/infiniband/core/cm.c 				cm_id_priv = NULL;
cm_id_priv       2831 drivers/infiniband/core/cm.c 		cm_id_priv = cm_acquire_id(rej_msg->remote_comm_id, 0);
cm_id_priv       2833 drivers/infiniband/core/cm.c 		cm_id_priv = cm_acquire_id(rej_msg->remote_comm_id, remote_id);
cm_id_priv       2835 drivers/infiniband/core/cm.c 	return cm_id_priv;
cm_id_priv       2840 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2845 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_rejected_id(rej_msg);
cm_id_priv       2846 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       2851 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       2852 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.state) {
cm_id_priv       2857 drivers/infiniband/core/cm.c 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2862 drivers/infiniband/core/cm.c 			cm_enter_timewait(cm_id_priv);
cm_id_priv       2864 drivers/infiniband/core/cm.c 			cm_reset_to_idle(cm_id_priv);
cm_id_priv       2867 drivers/infiniband/core/cm.c 		ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       2871 drivers/infiniband/core/cm.c 		cm_enter_timewait(cm_id_priv);
cm_id_priv       2874 drivers/infiniband/core/cm.c 		if (cm_id_priv->id.lap_state == IB_CM_LAP_UNINIT ||
cm_id_priv       2875 drivers/infiniband/core/cm.c 		    cm_id_priv->id.lap_state == IB_CM_LAP_SENT) {
cm_id_priv       2876 drivers/infiniband/core/cm.c 			if (cm_id_priv->id.lap_state == IB_CM_LAP_SENT)
cm_id_priv       2877 drivers/infiniband/core/cm.c 				ib_cancel_mad(cm_id_priv->av.port->mad_agent,
cm_id_priv       2878 drivers/infiniband/core/cm.c 					      cm_id_priv->msg);
cm_id_priv       2879 drivers/infiniband/core/cm.c 			cm_enter_timewait(cm_id_priv);
cm_id_priv       2884 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2886 drivers/infiniband/core/cm.c 			 __func__, be32_to_cpu(cm_id_priv->id.local_id),
cm_id_priv       2887 drivers/infiniband/core/cm.c 			 cm_id_priv->id.state);
cm_id_priv       2892 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       2894 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       2895 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       2898 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       2900 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       2903 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       2912 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       2928 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       2930 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       2931 drivers/infiniband/core/cm.c 	switch(cm_id_priv->id.state) {
cm_id_priv       2952 drivers/infiniband/core/cm.c 			 __func__, be32_to_cpu(cm_id_priv->id.local_id),
cm_id_priv       2953 drivers/infiniband/core/cm.c 			 cm_id_priv->id.state);
cm_id_priv       2959 drivers/infiniband/core/cm.c 		ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       2963 drivers/infiniband/core/cm.c 		cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv,
cm_id_priv       2973 drivers/infiniband/core/cm.c 	cm_id_priv->service_timeout = service_timeout;
cm_id_priv       2974 drivers/infiniband/core/cm.c 	cm_set_private_data(cm_id_priv, data, private_data_len);
cm_id_priv       2975 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2978 drivers/infiniband/core/cm.c error1:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       2982 drivers/infiniband/core/cm.c error2:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3005 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3010 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_mraed_id(mra_msg);
cm_id_priv       3011 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       3018 drivers/infiniband/core/cm.c 		  cm_convert_to_ms(cm_id_priv->av.timeout);
cm_id_priv       3020 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       3021 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.state) {
cm_id_priv       3024 drivers/infiniband/core/cm.c 		    ib_modify_mad(cm_id_priv->av.port->mad_agent,
cm_id_priv       3025 drivers/infiniband/core/cm.c 				  cm_id_priv->msg, timeout))
cm_id_priv       3027 drivers/infiniband/core/cm.c 		cm_id_priv->id.state = IB_CM_MRA_REQ_RCVD;
cm_id_priv       3031 drivers/infiniband/core/cm.c 		    ib_modify_mad(cm_id_priv->av.port->mad_agent,
cm_id_priv       3032 drivers/infiniband/core/cm.c 				  cm_id_priv->msg, timeout))
cm_id_priv       3034 drivers/infiniband/core/cm.c 		cm_id_priv->id.state = IB_CM_MRA_REP_RCVD;
cm_id_priv       3038 drivers/infiniband/core/cm.c 		    cm_id_priv->id.lap_state != IB_CM_LAP_SENT ||
cm_id_priv       3039 drivers/infiniband/core/cm.c 		    ib_modify_mad(cm_id_priv->av.port->mad_agent,
cm_id_priv       3040 drivers/infiniband/core/cm.c 				  cm_id_priv->msg, timeout)) {
cm_id_priv       3041 drivers/infiniband/core/cm.c 			if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
cm_id_priv       3047 drivers/infiniband/core/cm.c 		cm_id_priv->id.lap_state = IB_CM_MRA_LAP_RCVD;
cm_id_priv       3056 drivers/infiniband/core/cm.c 			 __func__, be32_to_cpu(cm_id_priv->id.local_id),
cm_id_priv       3057 drivers/infiniband/core/cm.c 			 cm_id_priv->id.state);
cm_id_priv       3061 drivers/infiniband/core/cm.c 	cm_id_priv->msg->context[1] = (void *) (unsigned long)
cm_id_priv       3062 drivers/infiniband/core/cm.c 				      cm_id_priv->id.state;
cm_id_priv       3063 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       3065 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       3066 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3069 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       3071 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       3074 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3075 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       3080 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       3091 drivers/infiniband/core/cm.c 			  cm_form_tid(cm_id_priv));
cm_id_priv       3092 drivers/infiniband/core/cm.c 	lap_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       3093 drivers/infiniband/core/cm.c 	lap_msg->remote_comm_id = cm_id_priv->id.remote_id;
cm_id_priv       3094 drivers/infiniband/core/cm.c 	cm_lap_set_remote_qpn(lap_msg, cm_id_priv->remote_qpn);
cm_id_priv       3116 drivers/infiniband/core/cm.c 		cm_ack_timeout(cm_id_priv->av.port->cm_dev->ack_delay,
cm_id_priv       3128 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3136 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       3137 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       3145 drivers/infiniband/core/cm.c 	ret = cm_init_av_by_path(alternate_path, NULL, &cm_id_priv->alt_av,
cm_id_priv       3146 drivers/infiniband/core/cm.c 				 cm_id_priv);
cm_id_priv       3149 drivers/infiniband/core/cm.c 	cm_id_priv->alt_av.timeout =
cm_id_priv       3150 drivers/infiniband/core/cm.c 			cm_ack_timeout(cm_id_priv->target_ack_delay,
cm_id_priv       3151 drivers/infiniband/core/cm.c 				       cm_id_priv->alt_av.timeout - 1);
cm_id_priv       3153 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       3157 drivers/infiniband/core/cm.c 	cm_format_lap((struct cm_lap_msg *) msg->mad, cm_id_priv,
cm_id_priv       3159 drivers/infiniband/core/cm.c 	msg->timeout_ms = cm_id_priv->timeout_ms;
cm_id_priv       3164 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3170 drivers/infiniband/core/cm.c 	cm_id_priv->msg = msg;
cm_id_priv       3172 drivers/infiniband/core/cm.c out:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3194 drivers/infiniband/core/cm.c static void cm_format_path_from_lap(struct cm_id_private *cm_id_priv,
cm_id_priv       3204 drivers/infiniband/core/cm.c 	path->pkey = cm_id_priv->pkey;
cm_id_priv       3207 drivers/infiniband/core/cm.c 	path->mtu = cm_id_priv->path_mtu;
cm_id_priv       3218 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3233 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(lap_msg->remote_comm_id,
cm_id_priv       3235 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       3245 drivers/infiniband/core/cm.c 	cm_format_path_from_lap(cm_id_priv, param->alternate_path, lap_msg);
cm_id_priv       3248 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       3249 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state != IB_CM_ESTABLISHED)
cm_id_priv       3252 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.lap_state) {
cm_id_priv       3263 drivers/infiniband/core/cm.c 		cm_format_mra((struct cm_mra_msg *) msg->mad, cm_id_priv,
cm_id_priv       3265 drivers/infiniband/core/cm.c 			      cm_id_priv->service_timeout,
cm_id_priv       3266 drivers/infiniband/core/cm.c 			      cm_id_priv->private_data,
cm_id_priv       3267 drivers/infiniband/core/cm.c 			      cm_id_priv->private_data_len);
cm_id_priv       3268 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3284 drivers/infiniband/core/cm.c 				 &cm_id_priv->av);
cm_id_priv       3289 drivers/infiniband/core/cm.c 				 &cm_id_priv->alt_av, cm_id_priv);
cm_id_priv       3293 drivers/infiniband/core/cm.c 	cm_id_priv->id.lap_state = IB_CM_LAP_RCVD;
cm_id_priv       3294 drivers/infiniband/core/cm.c 	cm_id_priv->tid = lap_msg->hdr.tid;
cm_id_priv       3295 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       3297 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       3298 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3301 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       3303 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       3306 drivers/infiniband/core/cm.c unlock:	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3307 drivers/infiniband/core/cm.c deref:	cm_deref_id(cm_id_priv);
cm_id_priv       3312 drivers/infiniband/core/cm.c 			  struct cm_id_private *cm_id_priv,
cm_id_priv       3319 drivers/infiniband/core/cm.c 	cm_format_mad_hdr(&apr_msg->hdr, CM_APR_ATTR_ID, cm_id_priv->tid);
cm_id_priv       3320 drivers/infiniband/core/cm.c 	apr_msg->local_comm_id = cm_id_priv->id.local_id;
cm_id_priv       3321 drivers/infiniband/core/cm.c 	apr_msg->remote_comm_id = cm_id_priv->id.remote_id;
cm_id_priv       3340 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3349 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       3350 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       3358 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       3362 drivers/infiniband/core/cm.c 	cm_format_apr((struct cm_apr_msg *) msg->mad, cm_id_priv, status,
cm_id_priv       3366 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3372 drivers/infiniband/core/cm.c out:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3379 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3391 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(apr_msg->remote_comm_id,
cm_id_priv       3393 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       3401 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       3402 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state != IB_CM_ESTABLISHED ||
cm_id_priv       3403 drivers/infiniband/core/cm.c 	    (cm_id_priv->id.lap_state != IB_CM_LAP_SENT &&
cm_id_priv       3404 drivers/infiniband/core/cm.c 	     cm_id_priv->id.lap_state != IB_CM_MRA_LAP_RCVD)) {
cm_id_priv       3405 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3408 drivers/infiniband/core/cm.c 	cm_id_priv->id.lap_state = IB_CM_LAP_IDLE;
cm_id_priv       3409 drivers/infiniband/core/cm.c 	ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       3410 drivers/infiniband/core/cm.c 	cm_id_priv->msg = NULL;
cm_id_priv       3412 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       3414 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       3415 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3418 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       3420 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       3423 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       3430 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3438 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(timewait_info->work.local_id,
cm_id_priv       3440 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       3443 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       3444 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state != IB_CM_TIMEWAIT ||
cm_id_priv       3445 drivers/infiniband/core/cm.c 	    cm_id_priv->remote_qpn != timewait_info->remote_qpn) {
cm_id_priv       3446 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3449 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_IDLE;
cm_id_priv       3450 drivers/infiniband/core/cm.c 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
cm_id_priv       3452 drivers/infiniband/core/cm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       3453 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3456 drivers/infiniband/core/cm.c 		cm_process_work(cm_id_priv, work);
cm_id_priv       3458 drivers/infiniband/core/cm.c 		cm_deref_id(cm_id_priv);
cm_id_priv       3461 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       3466 drivers/infiniband/core/cm.c 			       struct cm_id_private *cm_id_priv,
cm_id_priv       3470 drivers/infiniband/core/cm.c 			  cm_form_tid(cm_id_priv));
cm_id_priv       3471 drivers/infiniband/core/cm.c 	sidr_req_msg->request_id = cm_id_priv->id.local_id;
cm_id_priv       3483 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3492 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       3494 drivers/infiniband/core/cm.c 				 &cm_id_priv->av,
cm_id_priv       3495 drivers/infiniband/core/cm.c 				 cm_id_priv);
cm_id_priv       3501 drivers/infiniband/core/cm.c 	cm_id_priv->timeout_ms = param->timeout_ms;
cm_id_priv       3502 drivers/infiniband/core/cm.c 	cm_id_priv->max_cm_retries = param->max_cm_retries;
cm_id_priv       3503 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       3507 drivers/infiniband/core/cm.c 	cm_format_sidr_req((struct cm_sidr_req_msg *) msg->mad, cm_id_priv,
cm_id_priv       3509 drivers/infiniband/core/cm.c 	msg->timeout_ms = cm_id_priv->timeout_ms;
cm_id_priv       3512 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       3519 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3524 drivers/infiniband/core/cm.c 	cm_id_priv->msg = msg;
cm_id_priv       3525 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3553 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv, *cur_cm_id_priv;
cm_id_priv       3561 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       3567 drivers/infiniband/core/cm.c 	cm_id_priv->av.dgid.global.subnet_prefix = cpu_to_be64(wc->slid);
cm_id_priv       3568 drivers/infiniband/core/cm.c 	cm_id_priv->av.dgid.global.interface_id = 0;
cm_id_priv       3571 drivers/infiniband/core/cm.c 				      &cm_id_priv->av);
cm_id_priv       3575 drivers/infiniband/core/cm.c 	cm_id_priv->id.remote_id = sidr_req_msg->request_id;
cm_id_priv       3576 drivers/infiniband/core/cm.c 	cm_id_priv->tid = sidr_req_msg->hdr.tid;
cm_id_priv       3577 drivers/infiniband/core/cm.c 	atomic_inc(&cm_id_priv->work_count);
cm_id_priv       3580 drivers/infiniband/core/cm.c 	cur_cm_id_priv = cm_insert_remote_sidr(cm_id_priv);
cm_id_priv       3587 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_SIDR_REQ_RCVD;
cm_id_priv       3592 drivers/infiniband/core/cm.c 		cm_reject_sidr_req(cm_id_priv, IB_SIDR_UNSUPPORTED);
cm_id_priv       3596 drivers/infiniband/core/cm.c 	atomic_inc(&cm_id_priv->refcount);
cm_id_priv       3599 drivers/infiniband/core/cm.c 	cm_id_priv->id.cm_handler = cur_cm_id_priv->id.cm_handler;
cm_id_priv       3600 drivers/infiniband/core/cm.c 	cm_id_priv->id.context = cur_cm_id_priv->id.context;
cm_id_priv       3601 drivers/infiniband/core/cm.c 	cm_id_priv->id.service_id = sidr_req_msg->service_id;
cm_id_priv       3602 drivers/infiniband/core/cm.c 	cm_id_priv->id.service_mask = ~cpu_to_be64(0);
cm_id_priv       3604 drivers/infiniband/core/cm.c 	cm_format_sidr_req_event(work, cm_id_priv, &cur_cm_id_priv->id);
cm_id_priv       3605 drivers/infiniband/core/cm.c 	cm_process_work(cm_id_priv, work);
cm_id_priv       3609 drivers/infiniband/core/cm.c 	ib_destroy_cm_id(&cm_id_priv->id);
cm_id_priv       3614 drivers/infiniband/core/cm.c 			       struct cm_id_private *cm_id_priv,
cm_id_priv       3618 drivers/infiniband/core/cm.c 			  cm_id_priv->tid);
cm_id_priv       3619 drivers/infiniband/core/cm.c 	sidr_rep_msg->request_id = cm_id_priv->id.remote_id;
cm_id_priv       3622 drivers/infiniband/core/cm.c 	sidr_rep_msg->service_id = cm_id_priv->id.service_id;
cm_id_priv       3636 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3646 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       3647 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       3653 drivers/infiniband/core/cm.c 	ret = cm_alloc_msg(cm_id_priv, &msg);
cm_id_priv       3657 drivers/infiniband/core/cm.c 	cm_format_sidr_rep((struct cm_sidr_rep_msg *) msg->mad, cm_id_priv,
cm_id_priv       3661 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3666 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3669 drivers/infiniband/core/cm.c 	if (!RB_EMPTY_NODE(&cm_id_priv->sidr_id_node)) {
cm_id_priv       3670 drivers/infiniband/core/cm.c 		rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
cm_id_priv       3671 drivers/infiniband/core/cm.c 		RB_CLEAR_NODE(&cm_id_priv->sidr_id_node);
cm_id_priv       3676 drivers/infiniband/core/cm.c error:	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3682 drivers/infiniband/core/cm.c 				     const struct cm_id_private *cm_id_priv)
cm_id_priv       3695 drivers/infiniband/core/cm.c 	param->sgid_attr = cm_id_priv->av.ah_attr.grh.sgid_attr;
cm_id_priv       3702 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3706 drivers/infiniband/core/cm.c 	cm_id_priv = cm_acquire_id(sidr_rep_msg->request_id, 0);
cm_id_priv       3707 drivers/infiniband/core/cm.c 	if (!cm_id_priv)
cm_id_priv       3710 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       3711 drivers/infiniband/core/cm.c 	if (cm_id_priv->id.state != IB_CM_SIDR_REQ_SENT) {
cm_id_priv       3712 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3715 drivers/infiniband/core/cm.c 	cm_id_priv->id.state = IB_CM_IDLE;
cm_id_priv       3716 drivers/infiniband/core/cm.c 	ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
cm_id_priv       3717 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3719 drivers/infiniband/core/cm.c 	cm_format_sidr_rep_event(work, cm_id_priv);
cm_id_priv       3720 drivers/infiniband/core/cm.c 	cm_process_work(cm_id_priv, work);
cm_id_priv       3723 drivers/infiniband/core/cm.c 	cm_deref_id(cm_id_priv);
cm_id_priv       3730 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3736 drivers/infiniband/core/cm.c 	cm_id_priv = msg->context[0];
cm_id_priv       3739 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm_id_priv->lock);
cm_id_priv       3741 drivers/infiniband/core/cm.c 	if (msg != cm_id_priv->msg || state != cm_id_priv->id.state)
cm_id_priv       3749 drivers/infiniband/core/cm.c 		cm_reset_to_idle(cm_id_priv);
cm_id_priv       3754 drivers/infiniband/core/cm.c 		cm_reset_to_idle(cm_id_priv);
cm_id_priv       3758 drivers/infiniband/core/cm.c 		cm_enter_timewait(cm_id_priv);
cm_id_priv       3762 drivers/infiniband/core/cm.c 		cm_id_priv->id.state = IB_CM_IDLE;
cm_id_priv       3768 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3772 drivers/infiniband/core/cm.c 	ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, &cm_event);
cm_id_priv       3775 drivers/infiniband/core/cm.c 		ib_destroy_cm_id(&cm_id_priv->id);
cm_id_priv       3778 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm_id_priv->lock);
cm_id_priv       3878 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3892 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       3893 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       3909 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       3944 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       3950 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       3951 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       3957 drivers/infiniband/core/cm.c 		tmp_av = cm_id_priv->av;
cm_id_priv       3958 drivers/infiniband/core/cm.c 		cm_id_priv->av = cm_id_priv->alt_av;
cm_id_priv       3959 drivers/infiniband/core/cm.c 		cm_id_priv->alt_av = tmp_av;
cm_id_priv       3961 drivers/infiniband/core/cm.c 		tmp_send_port_not_ready = cm_id_priv->prim_send_port_not_ready;
cm_id_priv       3962 drivers/infiniband/core/cm.c 		cm_id_priv->prim_send_port_not_ready = cm_id_priv->altr_send_port_not_ready;
cm_id_priv       3963 drivers/infiniband/core/cm.c 		cm_id_priv->altr_send_port_not_ready = tmp_send_port_not_ready;
cm_id_priv       3966 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       4073 drivers/infiniband/core/cm.c static int cm_init_qp_init_attr(struct cm_id_private *cm_id_priv,
cm_id_priv       4080 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       4081 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.state) {
cm_id_priv       4094 drivers/infiniband/core/cm.c 		if (cm_id_priv->responder_resources)
cm_id_priv       4097 drivers/infiniband/core/cm.c 		qp_attr->pkey_index = cm_id_priv->av.pkey_index;
cm_id_priv       4098 drivers/infiniband/core/cm.c 		qp_attr->port_num = cm_id_priv->av.port->port_num;
cm_id_priv       4103 drivers/infiniband/core/cm.c 			 __func__, be32_to_cpu(cm_id_priv->id.local_id),
cm_id_priv       4104 drivers/infiniband/core/cm.c 			 cm_id_priv->id.state);
cm_id_priv       4108 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       4112 drivers/infiniband/core/cm.c static int cm_init_qp_rtr_attr(struct cm_id_private *cm_id_priv,
cm_id_priv       4119 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       4120 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.state) {
cm_id_priv       4130 drivers/infiniband/core/cm.c 		qp_attr->ah_attr = cm_id_priv->av.ah_attr;
cm_id_priv       4131 drivers/infiniband/core/cm.c 		qp_attr->path_mtu = cm_id_priv->path_mtu;
cm_id_priv       4132 drivers/infiniband/core/cm.c 		qp_attr->dest_qp_num = be32_to_cpu(cm_id_priv->remote_qpn);
cm_id_priv       4133 drivers/infiniband/core/cm.c 		qp_attr->rq_psn = be32_to_cpu(cm_id_priv->rq_psn);
cm_id_priv       4134 drivers/infiniband/core/cm.c 		if (cm_id_priv->qp_type == IB_QPT_RC ||
cm_id_priv       4135 drivers/infiniband/core/cm.c 		    cm_id_priv->qp_type == IB_QPT_XRC_TGT) {
cm_id_priv       4139 drivers/infiniband/core/cm.c 					cm_id_priv->responder_resources;
cm_id_priv       4142 drivers/infiniband/core/cm.c 		if (rdma_ah_get_dlid(&cm_id_priv->alt_av.ah_attr)) {
cm_id_priv       4144 drivers/infiniband/core/cm.c 			qp_attr->alt_port_num = cm_id_priv->alt_av.port->port_num;
cm_id_priv       4145 drivers/infiniband/core/cm.c 			qp_attr->alt_pkey_index = cm_id_priv->alt_av.pkey_index;
cm_id_priv       4146 drivers/infiniband/core/cm.c 			qp_attr->alt_timeout = cm_id_priv->alt_av.timeout;
cm_id_priv       4147 drivers/infiniband/core/cm.c 			qp_attr->alt_ah_attr = cm_id_priv->alt_av.ah_attr;
cm_id_priv       4153 drivers/infiniband/core/cm.c 			 __func__, be32_to_cpu(cm_id_priv->id.local_id),
cm_id_priv       4154 drivers/infiniband/core/cm.c 			 cm_id_priv->id.state);
cm_id_priv       4158 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       4162 drivers/infiniband/core/cm.c static int cm_init_qp_rts_attr(struct cm_id_private *cm_id_priv,
cm_id_priv       4169 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       4170 drivers/infiniband/core/cm.c 	switch (cm_id_priv->id.state) {
cm_id_priv       4180 drivers/infiniband/core/cm.c 		if (cm_id_priv->id.lap_state == IB_CM_LAP_UNINIT) {
cm_id_priv       4182 drivers/infiniband/core/cm.c 			qp_attr->sq_psn = be32_to_cpu(cm_id_priv->sq_psn);
cm_id_priv       4183 drivers/infiniband/core/cm.c 			switch (cm_id_priv->qp_type) {
cm_id_priv       4188 drivers/infiniband/core/cm.c 				qp_attr->retry_cnt = cm_id_priv->retry_count;
cm_id_priv       4189 drivers/infiniband/core/cm.c 				qp_attr->rnr_retry = cm_id_priv->rnr_retry_count;
cm_id_priv       4190 drivers/infiniband/core/cm.c 				qp_attr->max_rd_atomic = cm_id_priv->initiator_depth;
cm_id_priv       4194 drivers/infiniband/core/cm.c 				qp_attr->timeout = cm_id_priv->av.timeout;
cm_id_priv       4199 drivers/infiniband/core/cm.c 			if (rdma_ah_get_dlid(&cm_id_priv->alt_av.ah_attr)) {
cm_id_priv       4205 drivers/infiniband/core/cm.c 			qp_attr->alt_port_num = cm_id_priv->alt_av.port->port_num;
cm_id_priv       4206 drivers/infiniband/core/cm.c 			qp_attr->alt_pkey_index = cm_id_priv->alt_av.pkey_index;
cm_id_priv       4207 drivers/infiniband/core/cm.c 			qp_attr->alt_timeout = cm_id_priv->alt_av.timeout;
cm_id_priv       4208 drivers/infiniband/core/cm.c 			qp_attr->alt_ah_attr = cm_id_priv->alt_av.ah_attr;
cm_id_priv       4215 drivers/infiniband/core/cm.c 			 __func__, be32_to_cpu(cm_id_priv->id.local_id),
cm_id_priv       4216 drivers/infiniband/core/cm.c 			 cm_id_priv->id.state);
cm_id_priv       4220 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       4228 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       4231 drivers/infiniband/core/cm.c 	cm_id_priv = container_of(cm_id, struct cm_id_private, id);
cm_id_priv       4234 drivers/infiniband/core/cm.c 		ret = cm_init_qp_init_attr(cm_id_priv, qp_attr, qp_attr_mask);
cm_id_priv       4237 drivers/infiniband/core/cm.c 		ret = cm_init_qp_rtr_attr(cm_id_priv, qp_attr, qp_attr_mask);
cm_id_priv       4240 drivers/infiniband/core/cm.c 		ret = cm_init_qp_rts_attr(cm_id_priv, qp_attr, qp_attr_mask);
cm_id_priv       4417 drivers/infiniband/core/cm.c 	struct cm_id_private *cm_id_priv;
cm_id_priv       4444 drivers/infiniband/core/cm.c 		list_for_each_entry(cm_id_priv, &port->cm_priv_altr_list, altr_list)
cm_id_priv       4445 drivers/infiniband/core/cm.c 			cm_id_priv->altr_send_port_not_ready = 1;
cm_id_priv       4446 drivers/infiniband/core/cm.c 		list_for_each_entry(cm_id_priv, &port->cm_priv_prim_list, prim_list)
cm_id_priv       4447 drivers/infiniband/core/cm.c 			cm_id_priv->prim_send_port_not_ready = 1;
cm_id_priv        141 drivers/infiniband/core/iwcm.c static struct iwcm_work *get_work(struct iwcm_id_private *cm_id_priv)
cm_id_priv        145 drivers/infiniband/core/iwcm.c 	if (list_empty(&cm_id_priv->work_free_list))
cm_id_priv        147 drivers/infiniband/core/iwcm.c 	work = list_entry(cm_id_priv->work_free_list.next, struct iwcm_work,
cm_id_priv        158 drivers/infiniband/core/iwcm.c static void dealloc_work_entries(struct iwcm_id_private *cm_id_priv)
cm_id_priv        162 drivers/infiniband/core/iwcm.c 	list_for_each_safe(e, tmp, &cm_id_priv->work_free_list) {
cm_id_priv        168 drivers/infiniband/core/iwcm.c static int alloc_work_entries(struct iwcm_id_private *cm_id_priv, int count)
cm_id_priv        172 drivers/infiniband/core/iwcm.c 	BUG_ON(!list_empty(&cm_id_priv->work_free_list));
cm_id_priv        176 drivers/infiniband/core/iwcm.c 			dealloc_work_entries(cm_id_priv);
cm_id_priv        179 drivers/infiniband/core/iwcm.c 		work->cm_id = cm_id_priv;
cm_id_priv        202 drivers/infiniband/core/iwcm.c static void free_cm_id(struct iwcm_id_private *cm_id_priv)
cm_id_priv        204 drivers/infiniband/core/iwcm.c 	dealloc_work_entries(cm_id_priv);
cm_id_priv        205 drivers/infiniband/core/iwcm.c 	kfree(cm_id_priv);
cm_id_priv        212 drivers/infiniband/core/iwcm.c static int iwcm_deref_id(struct iwcm_id_private *cm_id_priv)
cm_id_priv        214 drivers/infiniband/core/iwcm.c 	BUG_ON(atomic_read(&cm_id_priv->refcount)==0);
cm_id_priv        215 drivers/infiniband/core/iwcm.c 	if (atomic_dec_and_test(&cm_id_priv->refcount)) {
cm_id_priv        216 drivers/infiniband/core/iwcm.c 		BUG_ON(!list_empty(&cm_id_priv->work_list));
cm_id_priv        217 drivers/infiniband/core/iwcm.c 		free_cm_id(cm_id_priv);
cm_id_priv        226 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        227 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        228 drivers/infiniband/core/iwcm.c 	atomic_inc(&cm_id_priv->refcount);
cm_id_priv        233 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        235 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        237 drivers/infiniband/core/iwcm.c 	(void)iwcm_deref_id(cm_id_priv);
cm_id_priv        246 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        248 drivers/infiniband/core/iwcm.c 	cm_id_priv = kzalloc(sizeof(*cm_id_priv), GFP_KERNEL);
cm_id_priv        249 drivers/infiniband/core/iwcm.c 	if (!cm_id_priv)
cm_id_priv        252 drivers/infiniband/core/iwcm.c 	cm_id_priv->state = IW_CM_STATE_IDLE;
cm_id_priv        253 drivers/infiniband/core/iwcm.c 	cm_id_priv->id.device = device;
cm_id_priv        254 drivers/infiniband/core/iwcm.c 	cm_id_priv->id.cm_handler = cm_handler;
cm_id_priv        255 drivers/infiniband/core/iwcm.c 	cm_id_priv->id.context = context;
cm_id_priv        256 drivers/infiniband/core/iwcm.c 	cm_id_priv->id.event_handler = cm_event_handler;
cm_id_priv        257 drivers/infiniband/core/iwcm.c 	cm_id_priv->id.add_ref = add_ref;
cm_id_priv        258 drivers/infiniband/core/iwcm.c 	cm_id_priv->id.rem_ref = rem_ref;
cm_id_priv        259 drivers/infiniband/core/iwcm.c 	spin_lock_init(&cm_id_priv->lock);
cm_id_priv        260 drivers/infiniband/core/iwcm.c 	atomic_set(&cm_id_priv->refcount, 1);
cm_id_priv        261 drivers/infiniband/core/iwcm.c 	init_waitqueue_head(&cm_id_priv->connect_wait);
cm_id_priv        262 drivers/infiniband/core/iwcm.c 	init_completion(&cm_id_priv->destroy_comp);
cm_id_priv        263 drivers/infiniband/core/iwcm.c 	INIT_LIST_HEAD(&cm_id_priv->work_list);
cm_id_priv        264 drivers/infiniband/core/iwcm.c 	INIT_LIST_HEAD(&cm_id_priv->work_free_list);
cm_id_priv        266 drivers/infiniband/core/iwcm.c 	return &cm_id_priv->id;
cm_id_priv        309 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        314 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        316 drivers/infiniband/core/iwcm.c 	wait_event(cm_id_priv->connect_wait,
cm_id_priv        317 drivers/infiniband/core/iwcm.c 		   !test_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags));
cm_id_priv        319 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        320 drivers/infiniband/core/iwcm.c 	switch (cm_id_priv->state) {
cm_id_priv        322 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_CLOSING;
cm_id_priv        325 drivers/infiniband/core/iwcm.c 		if (cm_id_priv->qp)
cm_id_priv        326 drivers/infiniband/core/iwcm.c 			qp = cm_id_priv->qp;
cm_id_priv        349 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        376 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        380 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        385 drivers/infiniband/core/iwcm.c 	wait_event(cm_id_priv->connect_wait,
cm_id_priv        386 drivers/infiniband/core/iwcm.c 		   !test_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags));
cm_id_priv        392 drivers/infiniband/core/iwcm.c 	set_bit(IWCM_F_DROP_EVENTS, &cm_id_priv->flags);
cm_id_priv        394 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        395 drivers/infiniband/core/iwcm.c 	qp = cm_id_priv->qp;
cm_id_priv        396 drivers/infiniband/core/iwcm.c 	cm_id_priv->qp = NULL;
cm_id_priv        398 drivers/infiniband/core/iwcm.c 	switch (cm_id_priv->state) {
cm_id_priv        400 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_DESTROYING;
cm_id_priv        401 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        404 drivers/infiniband/core/iwcm.c 		spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        407 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_DESTROYING;
cm_id_priv        408 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        411 drivers/infiniband/core/iwcm.c 		spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        415 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_DESTROYING;
cm_id_priv        424 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_DESTROYING;
cm_id_priv        425 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        427 drivers/infiniband/core/iwcm.c 		spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        435 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        437 drivers/infiniband/core/iwcm.c 		cm_id_priv->id.device->ops.iw_rem_ref(qp);
cm_id_priv        444 drivers/infiniband/core/iwcm.c 	(void)iwcm_deref_id(cm_id_priv);
cm_id_priv        564 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        568 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        573 drivers/infiniband/core/iwcm.c 	ret = alloc_work_entries(cm_id_priv, backlog);
cm_id_priv        577 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        578 drivers/infiniband/core/iwcm.c 	switch (cm_id_priv->state) {
cm_id_priv        580 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_LISTEN;
cm_id_priv        581 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        587 drivers/infiniband/core/iwcm.c 			cm_id_priv->state = IW_CM_STATE_IDLE;
cm_id_priv        588 drivers/infiniband/core/iwcm.c 		spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        593 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        608 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        612 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        613 drivers/infiniband/core/iwcm.c 	set_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        615 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        616 drivers/infiniband/core/iwcm.c 	if (cm_id_priv->state != IW_CM_STATE_CONN_RECV) {
cm_id_priv        617 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        618 drivers/infiniband/core/iwcm.c 		clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        619 drivers/infiniband/core/iwcm.c 		wake_up_all(&cm_id_priv->connect_wait);
cm_id_priv        622 drivers/infiniband/core/iwcm.c 	cm_id_priv->state = IW_CM_STATE_IDLE;
cm_id_priv        623 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        628 drivers/infiniband/core/iwcm.c 	clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        629 drivers/infiniband/core/iwcm.c 	wake_up_all(&cm_id_priv->connect_wait);
cm_id_priv        645 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        650 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        651 drivers/infiniband/core/iwcm.c 	set_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        653 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        654 drivers/infiniband/core/iwcm.c 	if (cm_id_priv->state != IW_CM_STATE_CONN_RECV) {
cm_id_priv        655 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        656 drivers/infiniband/core/iwcm.c 		clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        657 drivers/infiniband/core/iwcm.c 		wake_up_all(&cm_id_priv->connect_wait);
cm_id_priv        663 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        664 drivers/infiniband/core/iwcm.c 		clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        665 drivers/infiniband/core/iwcm.c 		wake_up_all(&cm_id_priv->connect_wait);
cm_id_priv        669 drivers/infiniband/core/iwcm.c 	cm_id_priv->qp = qp;
cm_id_priv        670 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        675 drivers/infiniband/core/iwcm.c 		BUG_ON(cm_id_priv->state != IW_CM_STATE_CONN_RECV);
cm_id_priv        676 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_IDLE;
cm_id_priv        677 drivers/infiniband/core/iwcm.c 		spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        678 drivers/infiniband/core/iwcm.c 		qp = cm_id_priv->qp;
cm_id_priv        679 drivers/infiniband/core/iwcm.c 		cm_id_priv->qp = NULL;
cm_id_priv        680 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        683 drivers/infiniband/core/iwcm.c 		clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        684 drivers/infiniband/core/iwcm.c 		wake_up_all(&cm_id_priv->connect_wait);
cm_id_priv        700 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        705 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        707 drivers/infiniband/core/iwcm.c 	ret = alloc_work_entries(cm_id_priv, 4);
cm_id_priv        711 drivers/infiniband/core/iwcm.c 	set_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        712 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        714 drivers/infiniband/core/iwcm.c 	if (cm_id_priv->state != IW_CM_STATE_IDLE) {
cm_id_priv        726 drivers/infiniband/core/iwcm.c 	cm_id_priv->qp = qp;
cm_id_priv        727 drivers/infiniband/core/iwcm.c 	cm_id_priv->state = IW_CM_STATE_CONN_SENT;
cm_id_priv        728 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        736 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        737 drivers/infiniband/core/iwcm.c 	qp = cm_id_priv->qp;
cm_id_priv        738 drivers/infiniband/core/iwcm.c 	cm_id_priv->qp = NULL;
cm_id_priv        739 drivers/infiniband/core/iwcm.c 	cm_id_priv->state = IW_CM_STATE_IDLE;
cm_id_priv        741 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        744 drivers/infiniband/core/iwcm.c 	clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        745 drivers/infiniband/core/iwcm.c 	wake_up_all(&cm_id_priv->connect_wait);
cm_id_priv        770 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv        805 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv        806 drivers/infiniband/core/iwcm.c 	cm_id_priv->state = IW_CM_STATE_CONN_RECV;
cm_id_priv        821 drivers/infiniband/core/iwcm.c 	ret = alloc_work_entries(cm_id_priv, 3);
cm_id_priv        852 drivers/infiniband/core/iwcm.c static int cm_conn_est_handler(struct iwcm_id_private *cm_id_priv,
cm_id_priv        858 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        865 drivers/infiniband/core/iwcm.c 	clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        866 drivers/infiniband/core/iwcm.c 	BUG_ON(cm_id_priv->state != IW_CM_STATE_CONN_RECV);
cm_id_priv        867 drivers/infiniband/core/iwcm.c 	cm_id_priv->state = IW_CM_STATE_ESTABLISHED;
cm_id_priv        868 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        869 drivers/infiniband/core/iwcm.c 	ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, iw_event);
cm_id_priv        870 drivers/infiniband/core/iwcm.c 	wake_up_all(&cm_id_priv->connect_wait);
cm_id_priv        882 drivers/infiniband/core/iwcm.c static int cm_conn_rep_handler(struct iwcm_id_private *cm_id_priv,
cm_id_priv        889 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        894 drivers/infiniband/core/iwcm.c 	clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags);
cm_id_priv        895 drivers/infiniband/core/iwcm.c 	BUG_ON(cm_id_priv->state != IW_CM_STATE_CONN_SENT);
cm_id_priv        897 drivers/infiniband/core/iwcm.c 		cm_id_priv->id.m_local_addr = iw_event->local_addr;
cm_id_priv        898 drivers/infiniband/core/iwcm.c 		cm_id_priv->id.m_remote_addr = iw_event->remote_addr;
cm_id_priv        899 drivers/infiniband/core/iwcm.c 		iw_event->local_addr = cm_id_priv->id.local_addr;
cm_id_priv        900 drivers/infiniband/core/iwcm.c 		iw_event->remote_addr = cm_id_priv->id.remote_addr;
cm_id_priv        901 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_ESTABLISHED;
cm_id_priv        904 drivers/infiniband/core/iwcm.c 		qp = cm_id_priv->qp;
cm_id_priv        905 drivers/infiniband/core/iwcm.c 		cm_id_priv->qp = NULL;
cm_id_priv        906 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_IDLE;
cm_id_priv        908 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        910 drivers/infiniband/core/iwcm.c 		cm_id_priv->id.device->ops.iw_rem_ref(qp);
cm_id_priv        911 drivers/infiniband/core/iwcm.c 	ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, iw_event);
cm_id_priv        917 drivers/infiniband/core/iwcm.c 	wake_up_all(&cm_id_priv->connect_wait);
cm_id_priv        927 drivers/infiniband/core/iwcm.c static void cm_disconnect_handler(struct iwcm_id_private *cm_id_priv,
cm_id_priv        932 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        933 drivers/infiniband/core/iwcm.c 	if (cm_id_priv->state == IW_CM_STATE_ESTABLISHED)
cm_id_priv        934 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_CLOSING;
cm_id_priv        935 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        949 drivers/infiniband/core/iwcm.c static int cm_close_handler(struct iwcm_id_private *cm_id_priv,
cm_id_priv        955 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv        956 drivers/infiniband/core/iwcm.c 	qp = cm_id_priv->qp;
cm_id_priv        957 drivers/infiniband/core/iwcm.c 	cm_id_priv->qp = NULL;
cm_id_priv        959 drivers/infiniband/core/iwcm.c 	switch (cm_id_priv->state) {
cm_id_priv        962 drivers/infiniband/core/iwcm.c 		cm_id_priv->state = IW_CM_STATE_IDLE;
cm_id_priv        970 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv        973 drivers/infiniband/core/iwcm.c 		cm_id_priv->id.device->ops.iw_rem_ref(qp);
cm_id_priv        975 drivers/infiniband/core/iwcm.c 		ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, iw_event);
cm_id_priv        979 drivers/infiniband/core/iwcm.c static int process_event(struct iwcm_id_private *cm_id_priv,
cm_id_priv        986 drivers/infiniband/core/iwcm.c 		cm_conn_req_handler(cm_id_priv, iw_event);
cm_id_priv        989 drivers/infiniband/core/iwcm.c 		ret = cm_conn_rep_handler(cm_id_priv, iw_event);
cm_id_priv        992 drivers/infiniband/core/iwcm.c 		ret = cm_conn_est_handler(cm_id_priv, iw_event);
cm_id_priv        995 drivers/infiniband/core/iwcm.c 		cm_disconnect_handler(cm_id_priv, iw_event);
cm_id_priv        998 drivers/infiniband/core/iwcm.c 		ret = cm_close_handler(cm_id_priv, iw_event);
cm_id_priv       1020 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv = work->cm_id;
cm_id_priv       1025 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       1026 drivers/infiniband/core/iwcm.c 	empty = list_empty(&cm_id_priv->work_list);
cm_id_priv       1028 drivers/infiniband/core/iwcm.c 		work = list_entry(cm_id_priv->work_list.next,
cm_id_priv       1031 drivers/infiniband/core/iwcm.c 		empty = list_empty(&cm_id_priv->work_list);
cm_id_priv       1034 drivers/infiniband/core/iwcm.c 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1036 drivers/infiniband/core/iwcm.c 		if (!test_bit(IWCM_F_DROP_EVENTS, &cm_id_priv->flags)) {
cm_id_priv       1037 drivers/infiniband/core/iwcm.c 			ret = process_event(cm_id_priv, &levent);
cm_id_priv       1039 drivers/infiniband/core/iwcm.c 				destroy_cm_id(&cm_id_priv->id);
cm_id_priv       1042 drivers/infiniband/core/iwcm.c 		if (iwcm_deref_id(cm_id_priv))
cm_id_priv       1046 drivers/infiniband/core/iwcm.c 		spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       1048 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1070 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv       1074 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv       1076 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       1077 drivers/infiniband/core/iwcm.c 	work = get_work(cm_id_priv);
cm_id_priv       1084 drivers/infiniband/core/iwcm.c 	work->cm_id = cm_id_priv;
cm_id_priv       1097 drivers/infiniband/core/iwcm.c 	atomic_inc(&cm_id_priv->refcount);
cm_id_priv       1098 drivers/infiniband/core/iwcm.c 	if (list_empty(&cm_id_priv->work_list)) {
cm_id_priv       1099 drivers/infiniband/core/iwcm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       1102 drivers/infiniband/core/iwcm.c 		list_add_tail(&work->list, &cm_id_priv->work_list);
cm_id_priv       1104 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1108 drivers/infiniband/core/iwcm.c static int iwcm_init_qp_init_attr(struct iwcm_id_private *cm_id_priv,
cm_id_priv       1115 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       1116 drivers/infiniband/core/iwcm.c 	switch (cm_id_priv->state) {
cm_id_priv       1130 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1134 drivers/infiniband/core/iwcm.c static int iwcm_init_qp_rts_attr(struct iwcm_id_private *cm_id_priv,
cm_id_priv       1141 drivers/infiniband/core/iwcm.c 	spin_lock_irqsave(&cm_id_priv->lock, flags);
cm_id_priv       1142 drivers/infiniband/core/iwcm.c 	switch (cm_id_priv->state) {
cm_id_priv       1154 drivers/infiniband/core/iwcm.c 	spin_unlock_irqrestore(&cm_id_priv->lock, flags);
cm_id_priv       1162 drivers/infiniband/core/iwcm.c 	struct iwcm_id_private *cm_id_priv;
cm_id_priv       1165 drivers/infiniband/core/iwcm.c 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
cm_id_priv       1169 drivers/infiniband/core/iwcm.c 		ret = iwcm_init_qp_init_attr(cm_id_priv,
cm_id_priv       1173 drivers/infiniband/core/iwcm.c 		ret = iwcm_init_qp_rts_attr(cm_id_priv,