Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67155
b: refs/heads/master
c: c9cf7db
h: refs/heads/master
i:
  67153: acf5a8c
  67151: 05f4f17
v: v3
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Oct 10, 2007
1 parent 818c403 commit e5c05c5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 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: 036be09ca55ee8512c05742f4f6b88911d012a90
refs/heads/master: c9cf7db2bca9180f5888eebc23dc607666a9685b
22 changes: 20 additions & 2 deletions trunk/drivers/infiniband/hw/ipath/ipath_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,18 @@ void ipath_skip_sge(struct ipath_sge_state *ss, u32 length)
}
}

static void ipath_flush_wqe(struct ipath_qp *qp, struct ib_send_wr *wr)
{
struct ib_wc wc;

memset(&wc, 0, sizeof(wc));
wc.wr_id = wr->wr_id;
wc.status = IB_WC_WR_FLUSH_ERR;
wc.opcode = ib_ipath_wc_opcode[wr->opcode];
wc.qp = &qp->ibqp;
ipath_cq_enter(to_icq(qp->ibqp.send_cq), &wc, 1);
}

/**
* ipath_post_one_send - post one RC, UC, or UD send work request
* @qp: the QP to post on
Expand All @@ -248,8 +260,14 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr)
spin_lock_irqsave(&qp->s_lock, flags);

/* Check that state is OK to post send. */
if (!(ib_ipath_state_ops[qp->state] & IPATH_POST_SEND_OK))
goto bail_inval;
if (unlikely(!(ib_ipath_state_ops[qp->state] & IPATH_POST_SEND_OK))) {
if (qp->state != IB_QPS_SQE && qp->state != IB_QPS_ERR)
goto bail_inval;
/* C10-96 says generate a flushed completion entry. */
ipath_flush_wqe(qp, wr);
ret = 0;
goto bail;
}

/* IB spec says that num_sge == 0 is OK. */
if (wr->num_sge > qp->s_max_sge)
Expand Down

0 comments on commit e5c05c5

Please sign in to comment.