Lines Matching refs:cep
750 struct scif_endpt *cep; in scif_accept() local
806 cep = kzalloc(sizeof(*cep), GFP_KERNEL); in scif_accept()
807 if (!cep) { in scif_accept()
811 spin_lock_init(&cep->lock); in scif_accept()
812 mutex_init(&cep->sendlock); in scif_accept()
813 mutex_init(&cep->recvlock); in scif_accept()
814 cep->state = SCIFEP_CONNECTING; in scif_accept()
815 cep->remote_dev = &scif_dev[peer->node]; in scif_accept()
816 cep->remote_ep = conreq->msg.payload[0]; in scif_accept()
818 scif_rma_ep_init(cep); in scif_accept()
820 err = scif_reserve_dma_chan(cep); in scif_accept()
827 cep->qp_info.qp = kzalloc(sizeof(*cep->qp_info.qp), GFP_KERNEL); in scif_accept()
828 if (!cep->qp_info.qp) { in scif_accept()
833 err = scif_anon_inode_getfile(cep); in scif_accept()
837 cep->qp_info.qp->magic = SCIFEP_MAGIC; in scif_accept()
838 spdev = scif_get_peer_dev(cep->remote_dev); in scif_accept()
843 err = scif_setup_qp_accept(cep->qp_info.qp, &cep->qp_info.qp_offset, in scif_accept()
845 cep->remote_dev); in scif_accept()
847 dev_dbg(&cep->remote_dev->sdev->dev, in scif_accept()
849 lep, cep, err, cep->qp_info.qp_offset); in scif_accept()
854 cep->port.node = lep->port.node; in scif_accept()
855 cep->port.port = lep->port.port; in scif_accept()
856 cep->peer.node = peer->node; in scif_accept()
857 cep->peer.port = peer->port; in scif_accept()
858 init_waitqueue_head(&cep->sendwq); in scif_accept()
859 init_waitqueue_head(&cep->recvwq); in scif_accept()
860 init_waitqueue_head(&cep->conwq); in scif_accept()
863 msg.src = cep->port; in scif_accept()
864 msg.payload[0] = cep->remote_ep; in scif_accept()
865 msg.payload[1] = cep->qp_info.qp_offset; in scif_accept()
866 msg.payload[2] = (u64)cep; in scif_accept()
868 err = _scif_nodeqp_send(cep->remote_dev, &msg); in scif_accept()
874 err = wait_event_timeout(cep->conwq, cep->state != SCIFEP_CONNECTING, in scif_accept()
876 if (!err && scifdev_alive(cep)) in scif_accept()
883 spin_lock(&cep->lock); in scif_accept()
885 if (cep->state == SCIFEP_CLOSING) { in scif_accept()
890 spin_unlock(&cep->lock); in scif_accept()
891 scif_teardown_ep(cep); in scif_accept()
892 kfree(cep); in scif_accept()
902 scif_get_port(cep->port.port); in scif_accept()
903 *newepd = (scif_epd_t)cep; in scif_accept()
904 spin_unlock(&cep->lock); in scif_accept()
907 scif_anon_inode_fput(cep); in scif_accept()
909 scif_teardown_ep(cep); in scif_accept()
911 kfree(cep); in scif_accept()