Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3635
b: refs/heads/master
c: 34a4a75
h: refs/heads/master
i:
  3633: afacd9e
  3631: b9e369f
v: v3
  • Loading branch information
Roland Dreier authored and Linus Torvalds committed Jun 27, 2005
1 parent bbd315f commit ec6d8bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: cd123d7fcfde319bd723d14d975d60319a1b2ad8
refs/heads/master: 34a4a753d15f905158d77fb81adc9c19a02a4639
16 changes: 8 additions & 8 deletions trunk/drivers/infiniband/hw/mthca/mthca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,9 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RETRY_COUNT);
}

if (attr_mask & IB_QP_MAX_DEST_RD_ATOMIC) {
qp_context->params1 |= cpu_to_be32(min(attr->max_dest_rd_atomic ?
ffs(attr->max_dest_rd_atomic) - 1 : 0,
if (attr_mask & IB_QP_MAX_QP_RD_ATOMIC) {
qp_context->params1 |= cpu_to_be32(min(attr->max_rd_atomic ?
ffs(attr->max_rd_atomic) - 1 : 0,
7) << 21);
qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_SRA_MAX);
}
Expand Down Expand Up @@ -764,10 +764,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
qp->atomic_rd_en = attr->qp_access_flags;
}

if (attr_mask & IB_QP_MAX_QP_RD_ATOMIC) {
if (attr_mask & IB_QP_MAX_DEST_RD_ATOMIC) {
u8 rra_max;

if (qp->resp_depth && !attr->max_rd_atomic) {
if (qp->resp_depth && !attr->max_dest_rd_atomic) {
/*
* Lowering our responder resources to zero.
* Turn off RDMA/atomics as responder.
Expand All @@ -778,7 +778,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
MTHCA_QP_OPTPAR_RAE);
}

if (!qp->resp_depth && attr->max_rd_atomic) {
if (!qp->resp_depth && attr->max_dest_rd_atomic) {
/*
* Increasing our responder resources from
* zero. Turn on RDMA/atomics as appropriate.
Expand All @@ -799,15 +799,15 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
}

for (rra_max = 0;
1 << rra_max < attr->max_rd_atomic &&
1 << rra_max < attr->max_dest_rd_atomic &&
rra_max < dev->qp_table.rdb_shift;
++rra_max)
; /* nothing */

qp_context->params2 |= cpu_to_be32(rra_max << 21);
qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_RRA_MAX);

qp->resp_depth = attr->max_rd_atomic;
qp->resp_depth = attr->max_dest_rd_atomic;
}

qp_context->params2 |= cpu_to_be32(MTHCA_QP_BIT_RSC);
Expand Down

0 comments on commit ec6d8bc

Please sign in to comment.