rxe_init_task(rxe, &qp->comp.task, qp,
rxe_completer, "comp");
- setup_timer(&qp->rnr_nak_timer, rnr_nak_timer, (unsigned long)qp);
- setup_timer(&qp->retrans_timer, retransmit_timer, (unsigned long)qp);
qp->qp_timeout_jiffies = 0; /* Can't be set for UD/UC in modify_qp */
-
+ if (init->qp_type == IB_QPT_RC) {
+ setup_timer(&qp->rnr_nak_timer, rnr_nak_timer, (unsigned long)qp);
+ setup_timer(&qp->retrans_timer, retransmit_timer, (unsigned long)qp);
+ }
return 0;
}
qp->qp_timeout_jiffies = 0;
rxe_cleanup_task(&qp->resp.task);
- del_timer_sync(&qp->retrans_timer);
- del_timer_sync(&qp->rnr_nak_timer);
+ if (qp_type(qp) == IB_QPT_RC) {
+ del_timer_sync(&qp->retrans_timer);
+ del_timer_sync(&qp->rnr_nak_timer);
+ }
rxe_cleanup_task(&qp->req.task);
rxe_cleanup_task(&qp->comp.task);