Lines Matching refs:cm_id
289 rdma_notify(ch->rdma_cm.cm_id, event->event); in srpt_qp_event()
291 ib_cm_notify(ch->ib_cm.cm_id, event->event); in srpt_qp_event()
1225 ret = ib_cm_init_qp_attr(ch->ib_cm.cm_id, &qp_attr, &attr_mask); in srpt_ch_qp_rtr()
1255 ret = ib_cm_init_qp_attr(ch->ib_cm.cm_id, &qp_attr, &attr_mask); in srpt_ch_qp_rts()
1898 ret = rdma_create_qp(ch->rdma_cm.cm_id, sdev->pd, qp_init); in srpt_create_ch_ib()
1899 ch->qp = ch->rdma_cm.cm_id->qp; in srpt_create_ch_ib()
2010 ret = rdma_disconnect(ch->rdma_cm.cm_id); in srpt_disconnect_ch()
2012 ret = ib_send_cm_dreq(ch->ib_cm.cm_id, NULL, 0); in srpt_disconnect_ch()
2014 ret = ib_send_cm_drep(ch->ib_cm.cm_id, NULL, 0); in srpt_disconnect_ch()
2163 rdma_destroy_id(ch->rdma_cm.cm_id); in srpt_release_channel_work()
2165 ib_destroy_cm_id(ch->ib_cm.cm_id); in srpt_release_channel_work()
2290 ch->rdma_cm.cm_id = rdma_cm_id; in srpt_cm_req_recv()
2293 ch->ib_cm.cm_id = ib_cm_id; in srpt_cm_req_recv()
2589 static int srpt_ib_cm_req_recv(struct ib_cm_id *cm_id, in srpt_ib_cm_req_recv() argument
2598 return srpt_cm_req_recv(cm_id->context, cm_id, NULL, param->port, in srpt_ib_cm_req_recv()
2603 static int srpt_rdma_cm_req_recv(struct rdma_cm_id *cm_id, in srpt_rdma_cm_req_recv() argument
2609 struct sa_path_rec *path_rec = cm_id->route.path_rec; in srpt_rdma_cm_req_recv()
2612 sdev = ib_get_client_data(cm_id->device, &srpt_client); in srpt_rdma_cm_req_recv()
2632 &cm_id->route.addr.src_addr); in srpt_rdma_cm_req_recv()
2634 return srpt_cm_req_recv(sdev, NULL, cm_id, cm_id->port_num, in srpt_rdma_cm_req_recv()
2704 static int srpt_cm_handler(struct ib_cm_id *cm_id, in srpt_cm_handler() argument
2707 struct srpt_rdma_ch *ch = cm_id->context; in srpt_cm_handler()
2713 ret = srpt_ib_cm_req_recv(cm_id, &event->param.req_rcvd, in srpt_cm_handler()
2756 static int srpt_rdma_cm_handler(struct rdma_cm_id *cm_id, in srpt_rdma_cm_handler() argument
2759 struct srpt_rdma_ch *ch = cm_id->context; in srpt_rdma_cm_handler()
2764 ret = srpt_rdma_cm_req_recv(cm_id, event); in srpt_rdma_cm_handler()
3237 sdev->cm_id = ib_create_cm_id(device, srpt_cm_handler, sdev); in srpt_add_one()
3238 if (IS_ERR(sdev->cm_id)) { in srpt_add_one()
3240 PTR_ERR(sdev->cm_id)); in srpt_add_one()
3241 ret = PTR_ERR(sdev->cm_id); in srpt_add_one()
3242 sdev->cm_id = NULL; in srpt_add_one()
3257 ret = sdev->cm_id ? in srpt_add_one()
3258 ib_cm_listen(sdev->cm_id, cpu_to_be64(srpt_service_guid)) : in srpt_add_one()
3262 sdev->cm_id->state); in srpt_add_one()
3302 if (sdev->cm_id) in srpt_add_one()
3303 ib_destroy_cm_id(sdev->cm_id); in srpt_add_one()
3331 if (sdev->cm_id) in srpt_remove_one()
3332 ib_destroy_cm_id(sdev->cm_id); in srpt_remove_one()