diff options
-rw-r--r-- | drivers/infiniband/core/cm.c | 4 | ||||
-rw-r--r-- | include/rdma/ib_cm.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 4de93ba274a6..96136543aa4e 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c | |||
@@ -173,7 +173,8 @@ static int cm_alloc_msg(struct cm_id_private *cm_id_priv, | |||
173 | if (IS_ERR(ah)) | 173 | if (IS_ERR(ah)) |
174 | return PTR_ERR(ah); | 174 | return PTR_ERR(ah); |
175 | 175 | ||
176 | m = ib_create_send_mad(mad_agent, 1, cm_id_priv->av.pkey_index, | 176 | m = ib_create_send_mad(mad_agent, cm_id_priv->id.remote_cm_qpn, |
177 | cm_id_priv->av.pkey_index, | ||
177 | ah, 0, sizeof(struct ib_mad_hdr), | 178 | ah, 0, sizeof(struct ib_mad_hdr), |
178 | sizeof(struct ib_mad)-sizeof(struct ib_mad_hdr), | 179 | sizeof(struct ib_mad)-sizeof(struct ib_mad_hdr), |
179 | GFP_ATOMIC); | 180 | GFP_ATOMIC); |
@@ -536,6 +537,7 @@ struct ib_cm_id *ib_create_cm_id(ib_cm_handler cm_handler, | |||
536 | cm_id_priv->id.state = IB_CM_IDLE; | 537 | cm_id_priv->id.state = IB_CM_IDLE; |
537 | cm_id_priv->id.cm_handler = cm_handler; | 538 | cm_id_priv->id.cm_handler = cm_handler; |
538 | cm_id_priv->id.context = context; | 539 | cm_id_priv->id.context = context; |
540 | cm_id_priv->id.remote_cm_qpn = 1; | ||
539 | ret = cm_alloc_id(cm_id_priv); | 541 | ret = cm_alloc_id(cm_id_priv); |
540 | if (ret) | 542 | if (ret) |
541 | goto error; | 543 | goto error; |
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h index 77fe9039209b..5308683c8c41 100644 --- a/include/rdma/ib_cm.h +++ b/include/rdma/ib_cm.h | |||
@@ -290,6 +290,7 @@ struct ib_cm_id { | |||
290 | enum ib_cm_lap_state lap_state; /* internal CM/debug use */ | 290 | enum ib_cm_lap_state lap_state; /* internal CM/debug use */ |
291 | __be32 local_id; | 291 | __be32 local_id; |
292 | __be32 remote_id; | 292 | __be32 remote_id; |
293 | u32 remote_cm_qpn; /* 1 unless redirected */ | ||
293 | }; | 294 | }; |
294 | 295 | ||
295 | /** | 296 | /** |