Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88501
b: refs/heads/master
c: 10a8c3c
h: refs/heads/master
i:
  88499: 4b92fc5
v: v3
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Apr 17, 2008
1 parent cc9ce43 commit 4af5b31
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 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: 69bd74c6968f45a864a394338a63da4b768da6ec
refs/heads/master: 10a8c3cd0157948ba421b3b69b89edfba6ddb4a5
26 changes: 16 additions & 10 deletions trunk/drivers/infiniband/hw/ipath/ipath_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,19 +748,25 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
struct ib_qp *ret;

if (init_attr->cap.max_send_sge > ib_ipath_max_sges ||
init_attr->cap.max_recv_sge > ib_ipath_max_sges ||
init_attr->cap.max_send_wr > ib_ipath_max_qp_wrs ||
init_attr->cap.max_recv_wr > ib_ipath_max_qp_wrs) {
ret = ERR_PTR(-ENOMEM);
init_attr->cap.max_send_wr > ib_ipath_max_qp_wrs) {
ret = ERR_PTR(-EINVAL);
goto bail;
}

if (init_attr->cap.max_send_sge +
init_attr->cap.max_recv_sge +
init_attr->cap.max_send_wr +
init_attr->cap.max_recv_wr == 0) {
ret = ERR_PTR(-EINVAL);
goto bail;
/* Check receive queue parameters if no SRQ is specified. */
if (!init_attr->srq) {
if (init_attr->cap.max_recv_sge > ib_ipath_max_sges ||
init_attr->cap.max_recv_wr > ib_ipath_max_qp_wrs) {
ret = ERR_PTR(-EINVAL);
goto bail;
}
if (init_attr->cap.max_send_sge +
init_attr->cap.max_send_wr +
init_attr->cap.max_recv_sge +
init_attr->cap.max_recv_wr == 0) {
ret = ERR_PTR(-EINVAL);
goto bail;
}
}

switch (init_attr->qp_type) {
Expand Down

0 comments on commit 4af5b31

Please sign in to comment.