Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83247
b: refs/heads/master
c: 1203c42
h: refs/heads/master
i:
  83245: 7b3aa31
  83243: 84fb638
  83239: b4c6feb
  83231: 416732f
v: v3
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Feb 5, 2008
1 parent f792500 commit 95bee72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 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: 1d96354e617990799b1cb5d7ff8f7c467b8767c8
refs/heads/master: 1203c42e7be1aa0be641b701f42b6d38c2d94b39
26 changes: 3 additions & 23 deletions trunk/drivers/infiniband/hw/mthca/mthca_srq.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,7 @@ void mthca_free_srq_wqe(struct mthca_srq *srq, u32 wqe_addr)

spin_lock(&srq->lock);

if (likely(srq->first_free >= 0))
*wqe_to_link(get_wqe(srq, srq->last_free)) = ind;
else
srq->first_free = ind;

*wqe_to_link(get_wqe(srq, srq->last_free)) = ind;
*wqe_to_link(get_wqe(srq, ind)) = -1;
srq->last_free = ind;

Expand All @@ -506,15 +502,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
first_ind = srq->first_free;

for (nreq = 0; wr; wr = wr->next) {
ind = srq->first_free;

if (unlikely(ind < 0)) {
mthca_err(dev, "SRQ %06x full\n", srq->srqn);
err = -ENOMEM;
*bad_wr = wr;
break;
}

ind = srq->first_free;
wqe = get_wqe(srq, ind);
next_ind = *wqe_to_link(wqe);

Expand Down Expand Up @@ -614,15 +602,7 @@ int mthca_arbel_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,
spin_lock_irqsave(&srq->lock, flags);

for (nreq = 0; wr; ++nreq, wr = wr->next) {
ind = srq->first_free;

if (unlikely(ind < 0)) {
mthca_err(dev, "SRQ %06x full\n", srq->srqn);
err = -ENOMEM;
*bad_wr = wr;
break;
}

ind = srq->first_free;
wqe = get_wqe(srq, ind);
next_ind = *wqe_to_link(wqe);

Expand Down

0 comments on commit 95bee72

Please sign in to comment.