Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21962
b: refs/heads/master
c: fd02e80
h: refs/heads/master
v: v3
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Mar 20, 2006
1 parent 3f7cb9d commit 61088fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: bfef73fa78ca1e56175dcbd33aa11de4764f85a5
refs/heads/master: fd02e8038eb943755e8727a0ea193c037a51714f
12 changes: 8 additions & 4 deletions trunk/drivers/infiniband/hw/mthca/mthca_srq.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ struct mthca_tavor_srq_context {
__be32 state_pd;
__be32 lkey;
__be32 uar;
__be32 wqe_cnt;
__be16 limit_watermark;
__be16 wqe_cnt;
u32 reserved[2];
};

Expand Down Expand Up @@ -369,6 +370,7 @@ int mthca_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr)
struct mthca_srq *srq = to_msrq(ibsrq);
struct mthca_mailbox *mailbox;
struct mthca_arbel_srq_context *arbel_ctx;
struct mthca_tavor_srq_context *tavor_ctx;
u8 status;
int err;

Expand All @@ -382,9 +384,11 @@ int mthca_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr)

if (mthca_is_memfree(dev)) {
arbel_ctx = mailbox->buf;
srq_attr->srq_limit = arbel_ctx->limit_watermark;
} else
srq_attr->srq_limit = 0;
srq_attr->srq_limit = be16_to_cpu(arbel_ctx->limit_watermark);
} else {
tavor_ctx = mailbox->buf;
srq_attr->srq_limit = be16_to_cpu(tavor_ctx->limit_watermark);
}

srq_attr->max_wr = (mthca_is_memfree(dev)) ? srq->max - 1 : srq->max;
srq_attr->max_sge = srq->max_gs;
Expand Down

0 comments on commit 61088fd

Please sign in to comment.