Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37173
b: refs/heads/master
c: 44334bd
h: refs/heads/master
i:
  37171: 6a6b7fc
v: v3
  • Loading branch information
Eric Sesterhenn authored and Roland Dreier committed Sep 28, 2006
1 parent c5758e7 commit 86518dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6edf602341cd8f6e79479ff7f5bca72562c1f608
refs/heads/master: 44334bd97e76662c5f40c629357e6acc4dee3e8a
15 changes: 7 additions & 8 deletions trunk/drivers/infiniband/hw/amso1100/c2_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ int c2_llp_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
vq_req = vq_req_alloc(c2dev);
if (!vq_req) {
err = -ENOMEM;
goto bail1;
goto bail0;
}
vq_req->qp = qp;
vq_req->cm_id = cm_id;
Expand All @@ -311,7 +311,7 @@ int c2_llp_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
wr = kmalloc(c2dev->req_vq.msg_size, GFP_KERNEL);
if (!wr) {
err = -ENOMEM;
goto bail2;
goto bail1;
}

/* Build the WR */
Expand All @@ -331,7 +331,7 @@ int c2_llp_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
/* Validate private_data length */
if (iw_param->private_data_len > C2_MAX_PRIVATE_DATA_SIZE) {
err = -EINVAL;
goto bail2;
goto bail1;
}

if (iw_param->private_data) {
Expand All @@ -348,29 +348,28 @@ int c2_llp_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw_param)
err = vq_send_wr(c2dev, (union c2wr *) wr);
if (err) {
vq_req_put(c2dev, vq_req);
goto bail2;
goto bail1;
}

/* Wait for reply from adapter */
err = vq_wait_for_reply(c2dev, vq_req);
if (err)
goto bail2;
goto bail1;

/* Check that reply is present */
reply = (struct c2wr_cr_accept_rep *) (unsigned long) vq_req->reply_msg;
if (!reply) {
err = -ENOMEM;
goto bail2;
goto bail1;
}

err = c2_errno(reply);
vq_repbuf_free(c2dev, reply);

if (!err)
c2_set_qp_state(qp, C2_QP_STATE_RTS);
bail2:
kfree(wr);
bail1:
kfree(wr);
vq_req_free(c2dev, vq_req);
bail0:
if (err) {
Expand Down

0 comments on commit 86518dd

Please sign in to comment.