Lines Matching refs:sqp_ctx
1173 struct mlx4_ib_demux_pv_ctx *sqp_ctx; in mlx4_ib_send_to_wire() local
1185 sqp_ctx = dev->sriov.sqps[port-1]; in mlx4_ib_send_to_wire()
1188 if (!sqp_ctx || sqp_ctx->state != DEMUX_PV_STATE_ACTIVE) in mlx4_ib_send_to_wire()
1193 sqp = &sqp_ctx->qp[0]; in mlx4_ib_send_to_wire()
1197 sqp = &sqp_ctx->qp[1]; in mlx4_ib_send_to_wire()
1206 ah = ib_create_ah(sqp_ctx->pd, attr); in mlx4_ib_send_to_wire()
1241 list.lkey = sqp_ctx->mr->lkey; in mlx4_ib_send_to_wire()
2029 static void mlx4_ib_free_sqp_ctx(struct mlx4_ib_demux_pv_ctx *sqp_ctx) in mlx4_ib_free_sqp_ctx() argument
2031 if (sqp_ctx->state > DEMUX_PV_STATE_DOWN) { in mlx4_ib_free_sqp_ctx()
2032 sqp_ctx->state = DEMUX_PV_STATE_DOWNING; in mlx4_ib_free_sqp_ctx()
2033 flush_workqueue(sqp_ctx->wq); in mlx4_ib_free_sqp_ctx()
2034 if (sqp_ctx->has_smi) { in mlx4_ib_free_sqp_ctx()
2035 ib_destroy_qp(sqp_ctx->qp[0].qp); in mlx4_ib_free_sqp_ctx()
2036 sqp_ctx->qp[0].qp = NULL; in mlx4_ib_free_sqp_ctx()
2037 mlx4_ib_free_pv_qp_bufs(sqp_ctx, IB_QPT_SMI, 0); in mlx4_ib_free_sqp_ctx()
2039 ib_destroy_qp(sqp_ctx->qp[1].qp); in mlx4_ib_free_sqp_ctx()
2040 sqp_ctx->qp[1].qp = NULL; in mlx4_ib_free_sqp_ctx()
2041 mlx4_ib_free_pv_qp_bufs(sqp_ctx, IB_QPT_GSI, 0); in mlx4_ib_free_sqp_ctx()
2042 ib_dereg_mr(sqp_ctx->mr); in mlx4_ib_free_sqp_ctx()
2043 sqp_ctx->mr = NULL; in mlx4_ib_free_sqp_ctx()
2044 ib_dealloc_pd(sqp_ctx->pd); in mlx4_ib_free_sqp_ctx()
2045 sqp_ctx->pd = NULL; in mlx4_ib_free_sqp_ctx()
2046 ib_destroy_cq(sqp_ctx->cq); in mlx4_ib_free_sqp_ctx()
2047 sqp_ctx->cq = NULL; in mlx4_ib_free_sqp_ctx()
2048 sqp_ctx->state = DEMUX_PV_STATE_DOWN; in mlx4_ib_free_sqp_ctx()