From: Roland Dreier <rolandd@cisco.com>
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: [PATCH 06/10] IB/mthca: Fix posting work requests to shared receive queues
Date: Tue, 20 Sep 2005 15:08:11 -0700 [thread overview]
Message-ID: <2005920158.fH5cjWXDbJWaw3V6@cisco.com> (raw)
In-Reply-To: <2005920158.G3atJmbH9pmjSQjI@cisco.com>
The error handling paths in mthca_tavor_post_srq_recv() and
mthca_arbel_post_srq_recv() are quite bogus, the result of a
screwed up merge. Fix them so they work as intended.
Pointed out by Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
---
drivers/infiniband/hw/mthca/mthca_srq.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
b95e7b96cd976a5974fa2ae8f3a1af510cb8d4c9
diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c
--- a/drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -409,7 +409,7 @@ int mthca_tavor_post_srq_recv(struct ib_
mthca_err(dev, "SRQ %06x full\n", srq->srqn);
err = -ENOMEM;
*bad_wr = wr;
- return nreq;
+ break;
}
wqe = get_wqe(srq, ind);
@@ -427,7 +427,7 @@ int mthca_tavor_post_srq_recv(struct ib_
err = -EINVAL;
*bad_wr = wr;
srq->last = prev_wqe;
- return nreq;
+ break;
}
for (i = 0; i < wr->num_sge; ++i) {
@@ -456,8 +456,6 @@ int mthca_tavor_post_srq_recv(struct ib_
srq->first_free = next_ind;
}
- return nreq;
-
if (likely(nreq)) {
__be32 doorbell[2];
@@ -501,7 +499,7 @@ int mthca_arbel_post_srq_recv(struct ib_
mthca_err(dev, "SRQ %06x full\n", srq->srqn);
err = -ENOMEM;
*bad_wr = wr;
- return nreq;
+ break;
}
wqe = get_wqe(srq, ind);
@@ -517,7 +515,7 @@ int mthca_arbel_post_srq_recv(struct ib_
if (unlikely(wr->num_sge > srq->max_gs)) {
err = -EINVAL;
*bad_wr = wr;
- return nreq;
+ break;
}
for (i = 0; i < wr->num_sge; ++i) {
next prev parent reply other threads:[~2005-09-20 22:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-20 22:08 [git pull] InfiniBand fixes Roland Dreier
2005-09-20 22:08 ` [PATCH 01/10] IPoIB: fix module removal race Roland Dreier
2005-09-20 22:08 ` [PATCH 02/10] IB/mthca: assign ACK timeout field correctly Roland Dreier
2005-09-20 22:08 ` [PATCH 03/10] IB/mthca: fix posting of first work request Roland Dreier
2005-09-20 22:08 ` [PATCH 04/10] IPoIB: Fix SA client retransmission strategy Roland Dreier
2005-09-20 22:08 ` [PATCH 05/10] IB/mthca: Initialize eq->nent before we use it Roland Dreier
2005-09-20 22:08 ` Roland Dreier [this message]
2005-09-20 22:08 ` [PATCH 07/10] IB/mthca: Don't try to set srq->last for userspace SRQs Roland Dreier
2005-09-20 22:08 ` [PATCH 08/10] IB: Fix data length for RMPP SA sends Roland Dreier
2005-09-20 22:08 ` [PATCH 09/10] IPoIB: Don't flush workqueue from within workqueue Roland Dreier
2005-09-20 22:08 ` [PATCH 10/10] IB/mthca: Fix device removal memory leak Roland Dreier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2005920158.fH5cjWXDbJWaw3V6@cisco.com \
--to=rolandd@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openib-general@openib.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®