diff options
| -rw-r--r-- | drivers/infiniband/hw/ipath/ipath_qp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 8214c0905c75..553d9007cf07 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
| @@ -329,8 +329,9 @@ struct ipath_qp *ipath_lookup_qpn(struct ipath_qp_table *qpt, u32 qpn) | |||
| 329 | /** | 329 | /** |
| 330 | * ipath_reset_qp - initialize the QP state to the reset state | 330 | * ipath_reset_qp - initialize the QP state to the reset state |
| 331 | * @qp: the QP to reset | 331 | * @qp: the QP to reset |
| 332 | * @type: the QP type | ||
| 332 | */ | 333 | */ |
| 333 | static void ipath_reset_qp(struct ipath_qp *qp) | 334 | static void ipath_reset_qp(struct ipath_qp *qp, enum ib_qp_type type) |
| 334 | { | 335 | { |
| 335 | qp->remote_qpn = 0; | 336 | qp->remote_qpn = 0; |
| 336 | qp->qkey = 0; | 337 | qp->qkey = 0; |
| @@ -342,7 +343,7 @@ static void ipath_reset_qp(struct ipath_qp *qp) | |||
| 342 | qp->s_psn = 0; | 343 | qp->s_psn = 0; |
| 343 | qp->r_psn = 0; | 344 | qp->r_psn = 0; |
| 344 | qp->r_msn = 0; | 345 | qp->r_msn = 0; |
| 345 | if (qp->ibqp.qp_type == IB_QPT_RC) { | 346 | if (type == IB_QPT_RC) { |
| 346 | qp->s_state = IB_OPCODE_RC_SEND_LAST; | 347 | qp->s_state = IB_OPCODE_RC_SEND_LAST; |
| 347 | qp->r_state = IB_OPCODE_RC_SEND_LAST; | 348 | qp->r_state = IB_OPCODE_RC_SEND_LAST; |
| 348 | } else { | 349 | } else { |
| @@ -534,7 +535,7 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
| 534 | 535 | ||
| 535 | switch (new_state) { | 536 | switch (new_state) { |
| 536 | case IB_QPS_RESET: | 537 | case IB_QPS_RESET: |
| 537 | ipath_reset_qp(qp); | 538 | ipath_reset_qp(qp, ibqp->qp_type); |
| 538 | break; | 539 | break; |
| 539 | 540 | ||
| 540 | case IB_QPS_ERR: | 541 | case IB_QPS_ERR: |
| @@ -839,7 +840,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
| 839 | goto bail_qp; | 840 | goto bail_qp; |
| 840 | } | 841 | } |
| 841 | qp->ip = NULL; | 842 | qp->ip = NULL; |
| 842 | ipath_reset_qp(qp); | 843 | ipath_reset_qp(qp, init_attr->qp_type); |
| 843 | break; | 844 | break; |
| 844 | 845 | ||
| 845 | default: | 846 | default: |
