Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23771
b: refs/heads/master
c: ded9ad7
h: refs/heads/master
i:
  23769: 27b4eae
  23767: cc24980
v: v3
  • Loading branch information
Jack Morgenstein authored and Roland Dreier committed Mar 24, 2006
1 parent 6bd36ab commit b0e82bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ef61db837c93d4377fabd37182bb6f83ea5ca70
refs/heads/master: ded9ad721d220d47989177076a181ae1f1b93af5
4 changes: 4 additions & 0 deletions trunk/drivers/infiniband/hw/mthca/mthca_srq.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ int mthca_alloc_srq(struct mthca_dev *dev, struct mthca_pd *pd,
ds = max(64UL,
roundup_pow_of_two(sizeof (struct mthca_next_seg) +
srq->max_gs * sizeof (struct mthca_data_seg)));

if (ds > dev->limits.max_desc_sz)
return -EINVAL;

srq->wqe_shift = long_log2(ds);

srq->srqn = mthca_alloc(&dev->srq_table.alloc);
Expand Down

0 comments on commit b0e82bc

Please sign in to comment.