Commit e971b8cd authored by Sean Hefty's avatar Sean Hefty Committed by Roland Dreier

IB/cm: Remove ca_guid from cm_device structure

The cm_device references an ib_device, which already contains the node_guid.
Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 962063e6
...@@ -88,7 +88,6 @@ struct cm_port { ...@@ -88,7 +88,6 @@ struct cm_port {
struct cm_device { struct cm_device {
struct list_head list; struct list_head list;
struct ib_device *device; struct ib_device *device;
__be64 ca_guid;
struct cm_port port[0]; struct cm_port port[0];
}; };
...@@ -739,8 +738,8 @@ static void cm_destroy_id(struct ib_cm_id *cm_id, int err) ...@@ -739,8 +738,8 @@ static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
spin_unlock_irqrestore(&cm_id_priv->lock, flags); spin_unlock_irqrestore(&cm_id_priv->lock, flags);
ib_send_cm_rej(cm_id, IB_CM_REJ_TIMEOUT, ib_send_cm_rej(cm_id, IB_CM_REJ_TIMEOUT,
&cm_id_priv->av.port->cm_dev->ca_guid, &cm_id_priv->id.device->node_guid,
sizeof cm_id_priv->av.port->cm_dev->ca_guid, sizeof cm_id_priv->id.device->node_guid,
NULL, 0); NULL, 0);
break; break;
case IB_CM_REQ_RCVD: case IB_CM_REQ_RCVD:
...@@ -883,7 +882,7 @@ static void cm_format_req(struct cm_req_msg *req_msg, ...@@ -883,7 +882,7 @@ static void cm_format_req(struct cm_req_msg *req_msg,
req_msg->local_comm_id = cm_id_priv->id.local_id; req_msg->local_comm_id = cm_id_priv->id.local_id;
req_msg->service_id = param->service_id; req_msg->service_id = param->service_id;
req_msg->local_ca_guid = cm_id_priv->av.port->cm_dev->ca_guid; req_msg->local_ca_guid = cm_id_priv->id.device->node_guid;
cm_req_set_local_qpn(req_msg, cpu_to_be32(param->qp_num)); cm_req_set_local_qpn(req_msg, cpu_to_be32(param->qp_num));
cm_req_set_resp_res(req_msg, param->responder_resources); cm_req_set_resp_res(req_msg, param->responder_resources);
cm_req_set_init_depth(req_msg, param->initiator_depth); cm_req_set_init_depth(req_msg, param->initiator_depth);
...@@ -1442,7 +1441,7 @@ static void cm_format_rep(struct cm_rep_msg *rep_msg, ...@@ -1442,7 +1441,7 @@ static void cm_format_rep(struct cm_rep_msg *rep_msg,
cm_rep_set_flow_ctrl(rep_msg, param->flow_control); cm_rep_set_flow_ctrl(rep_msg, param->flow_control);
cm_rep_set_rnr_retry_count(rep_msg, param->rnr_retry_count); cm_rep_set_rnr_retry_count(rep_msg, param->rnr_retry_count);
cm_rep_set_srq(rep_msg, param->srq); cm_rep_set_srq(rep_msg, param->srq);
rep_msg->local_ca_guid = cm_id_priv->av.port->cm_dev->ca_guid; rep_msg->local_ca_guid = cm_id_priv->id.device->node_guid;
if (param->private_data && param->private_data_len) if (param->private_data && param->private_data_len)
memcpy(rep_msg->private_data, param->private_data, memcpy(rep_msg->private_data, param->private_data,
...@@ -3385,7 +3384,6 @@ static void cm_add_one(struct ib_device *device) ...@@ -3385,7 +3384,6 @@ static void cm_add_one(struct ib_device *device)
return; return;
cm_dev->device = device; cm_dev->device = device;
cm_dev->ca_guid = device->node_guid;
set_bit(IB_MGMT_METHOD_SEND, reg_req.method_mask); set_bit(IB_MGMT_METHOD_SEND, reg_req.method_mask);
for (i = 1; i <= device->phys_port_cnt; i++) { for (i = 1; i <= device->phys_port_cnt; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment