summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorNaresh Gottumukkala <bgottumukkala@emulex.com>2013-06-10 04:42:40 +0000
committerRoland Dreier <roland@purestorage.com>2013-06-20 04:52:14 -0700
commitf6ddcf71070d01a7bb34818dd3aaf4bdac5386fa (patch)
tree82ae24cc56ef99f4d3058244fee6f1bcc8aebcfc /drivers/infiniband/hw
parentef99c4c2ed63cb0deb94ea70fb47c2d6294e302e (diff)
downloadblackbird-op-linux-f6ddcf71070d01a7bb34818dd3aaf4bdac5386fa.tar.gz
blackbird-op-linux-f6ddcf71070d01a7bb34818dd3aaf4bdac5386fa.zip
RDMA/ocrdma: Set bad_wr in error case
Fix post_send to set the bad_wr in error case. Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_verbs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 882a8198d820..06215301a675 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -1734,12 +1734,14 @@ int ocrdma_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
spin_lock_irqsave(&qp->q_lock, flags);
if (qp->state != OCRDMA_QPS_RTS && qp->state != OCRDMA_QPS_SQD) {
spin_unlock_irqrestore(&qp->q_lock, flags);
+ *bad_wr = wr;
return -EINVAL;
}
while (wr) {
if (ocrdma_hwq_free_cnt(&qp->sq) == 0 ||
wr->num_sge > qp->sq.max_sges) {
+ *bad_wr = wr;
status = -ENOMEM;
break;
}
OpenPOWER on IntegriCloud