Lines Matching refs:rc

157 	int count, rc;  in rpcrdma_sendcq_poll()  local
162 rc = ib_poll_cq(cq, ARRAY_SIZE(wcs), pos); in rpcrdma_sendcq_poll()
163 if (rc < 0) in rpcrdma_sendcq_poll()
166 count = rc; in rpcrdma_sendcq_poll()
169 } while (rc == ARRAY_SIZE(wcs)); in rpcrdma_sendcq_poll()
238 int count, rc; in rpcrdma_recvcq_poll() local
243 rc = ib_poll_cq(cq, ARRAY_SIZE(wcs), pos); in rpcrdma_recvcq_poll()
244 if (rc < 0) in rpcrdma_recvcq_poll()
247 count = rc; in rpcrdma_recvcq_poll()
250 } while (rc == ARRAY_SIZE(wcs)); in rpcrdma_recvcq_poll()
377 int rc; in rpcrdma_create_id() local
384 rc = PTR_ERR(id); in rpcrdma_create_id()
386 __func__, rc); in rpcrdma_create_id()
391 rc = rdma_resolve_addr(id, NULL, addr, RDMA_RESOLVE_TIMEOUT); in rpcrdma_create_id()
392 if (rc) { in rpcrdma_create_id()
394 __func__, rc); in rpcrdma_create_id()
410 rc = ia->ri_async_rc; in rpcrdma_create_id()
411 if (rc) in rpcrdma_create_id()
415 rc = rdma_resolve_route(id, RDMA_RESOLVE_TIMEOUT); in rpcrdma_create_id()
416 if (rc) { in rpcrdma_create_id()
418 __func__, rc); in rpcrdma_create_id()
423 rc = ia->ri_async_rc; in rpcrdma_create_id()
424 if (rc) in rpcrdma_create_id()
432 return ERR_PTR(rc); in rpcrdma_create_id()
466 int rc; in rpcrdma_ia_open() local
472 rc = PTR_ERR(ia->ri_id); in rpcrdma_ia_open()
479 rc = PTR_ERR(ia->ri_pd); in rpcrdma_ia_open()
481 __func__, rc); in rpcrdma_ia_open()
485 rc = ib_query_device(ia->ri_device, devattr); in rpcrdma_ia_open()
486 if (rc) { in rpcrdma_ia_open()
488 __func__, rc); in rpcrdma_ia_open()
504 rc = -EINVAL; in rpcrdma_ia_open()
522 rc = -ENOMEM; in rpcrdma_ia_open()
538 return rc; in rpcrdma_ia_open()
573 int rc, err; in rpcrdma_ep_create() local
597 rc = ia->ri_ops->ro_open(ia, ep, cdata); in rpcrdma_ep_create()
598 if (rc) in rpcrdma_ep_create()
599 return rc; in rpcrdma_ep_create()
631 rc = PTR_ERR(sendcq); in rpcrdma_ep_create()
633 __func__, rc); in rpcrdma_ep_create()
637 rc = ib_req_notify_cq(sendcq, IB_CQ_NEXT_COMP); in rpcrdma_ep_create()
638 if (rc) { in rpcrdma_ep_create()
640 __func__, rc); in rpcrdma_ep_create()
648 rc = PTR_ERR(recvcq); in rpcrdma_ep_create()
650 __func__, rc); in rpcrdma_ep_create()
654 rc = ib_req_notify_cq(recvcq, IB_CQ_NEXT_COMP); in rpcrdma_ep_create()
655 if (rc) { in rpcrdma_ep_create()
657 __func__, rc); in rpcrdma_ep_create()
693 return rc; in rpcrdma_ep_create()
706 int rc; in rpcrdma_ep_destroy() local
724 rc = ib_destroy_cq(ep->rep_attr.recv_cq); in rpcrdma_ep_destroy()
725 if (rc) in rpcrdma_ep_destroy()
727 __func__, rc); in rpcrdma_ep_destroy()
729 rc = ib_destroy_cq(ep->rep_attr.send_cq); in rpcrdma_ep_destroy()
730 if (rc) in rpcrdma_ep_destroy()
732 __func__, rc); in rpcrdma_ep_destroy()
735 rc = ib_dereg_mr(ia->ri_dma_mr); in rpcrdma_ep_destroy()
737 __func__, rc); in rpcrdma_ep_destroy()
748 int rc = 0; in rpcrdma_ep_connect() local
763 rc = -EHOSTUNREACH; in rpcrdma_ep_connect()
777 rc = -ENETUNREACH; in rpcrdma_ep_connect()
781 rc = rdma_create_qp(id, ia->ri_pd, &ep->rep_attr); in rpcrdma_ep_connect()
782 if (rc) { in rpcrdma_ep_connect()
784 __func__, rc); in rpcrdma_ep_connect()
786 rc = -ENETUNREACH; in rpcrdma_ep_connect()
799 rc = rdma_create_qp(ia->ri_id, ia->ri_pd, &ep->rep_attr); in rpcrdma_ep_connect()
800 if (rc) { in rpcrdma_ep_connect()
802 __func__, rc); in rpcrdma_ep_connect()
810 rc = rdma_connect(ia->ri_id, &ep->rep_remote_cma); in rpcrdma_ep_connect()
811 if (rc) { in rpcrdma_ep_connect()
813 __func__, rc); in rpcrdma_ep_connect()
843 rc = ep->rep_connected; in rpcrdma_ep_connect()
854 rc = rpcrdma_ep_post_extra_recv(r_xprt, extras); in rpcrdma_ep_connect()
855 if (rc) in rpcrdma_ep_connect()
857 __func__, rc); in rpcrdma_ep_connect()
858 rc = 0; in rpcrdma_ep_connect()
863 if (rc) in rpcrdma_ep_connect()
864 ep->rep_connected = rc; in rpcrdma_ep_connect()
865 return rc; in rpcrdma_ep_connect()
880 int rc; in rpcrdma_ep_disconnect() local
883 rc = rdma_disconnect(ia->ri_id); in rpcrdma_ep_disconnect()
884 if (!rc) { in rpcrdma_ep_disconnect()
891 dprintk("RPC: %s: rdma_disconnect %i\n", __func__, rc); in rpcrdma_ep_disconnect()
892 ep->rep_connected = rc; in rpcrdma_ep_disconnect()
920 int rc; in rpcrdma_create_rep() local
922 rc = -ENOMEM; in rpcrdma_create_rep()
930 rc = PTR_ERR(rep->rr_rdmabuf); in rpcrdma_create_rep()
942 return ERR_PTR(rc); in rpcrdma_create_rep()
950 int i, rc; in rpcrdma_buffer_create() local
956 rc = ia->ri_ops->ro_init(r_xprt); in rpcrdma_buffer_create()
957 if (rc) in rpcrdma_buffer_create()
970 rc = PTR_ERR(req); in rpcrdma_buffer_create()
985 rc = PTR_ERR(rep); in rpcrdma_buffer_create()
994 return rc; in rpcrdma_buffer_create()
1261 int i, rc; in rpcrdma_ep_post() local
1264 rc = rpcrdma_ep_post_recv(ia, ep, rep); in rpcrdma_ep_post()
1265 if (rc) in rpcrdma_ep_post()
1289 rc = ib_post_send(ia->ri_id->qp, &send_wr, &send_wr_fail); in rpcrdma_ep_post()
1290 if (rc) in rpcrdma_ep_post()
1292 rc); in rpcrdma_ep_post()
1294 return rc; in rpcrdma_ep_post()
1306 int rc; in rpcrdma_ep_post_recv() local
1318 rc = ib_post_recv(ia->ri_id->qp, &recv_wr, &recv_wr_fail); in rpcrdma_ep_post_recv()
1320 if (rc) in rpcrdma_ep_post_recv()
1322 rc); in rpcrdma_ep_post_recv()
1323 return rc; in rpcrdma_ep_post_recv()
1341 int rc; in rpcrdma_ep_post_extra_recv() local
1350 rc = rpcrdma_ep_post_recv(ia, ep, rep); in rpcrdma_ep_post_extra_recv()
1351 if (rc) in rpcrdma_ep_post_extra_recv()
1364 return rc; in rpcrdma_ep_post_extra_recv()