Lines Matching refs:ep

21 void scif_cleanup_ep_qp(struct scif_endpt *ep)  in scif_cleanup_ep_qp()  argument
23 struct scif_qp *qp = ep->qp_info.qp; in scif_cleanup_ep_qp()
27 qp->outbound_q.size, ep->remote_dev); in scif_cleanup_ep_qp()
32 sizeof(struct scif_qp), ep->remote_dev); in scif_cleanup_ep_qp()
36 scif_unmap_single(qp->local_qp, ep->remote_dev, in scif_cleanup_ep_qp()
41 scif_unmap_single(qp->local_buf, ep->remote_dev, in scif_cleanup_ep_qp()
49 struct scif_endpt *ep = endpt; in scif_teardown_ep() local
50 struct scif_qp *qp = ep->qp_info.qp; in scif_teardown_ep()
53 spin_lock(&ep->lock); in scif_teardown_ep()
54 scif_cleanup_ep_qp(ep); in scif_teardown_ep()
55 spin_unlock(&ep->lock); in scif_teardown_ep()
65 void scif_add_epd_to_zombie_list(struct scif_endpt *ep, bool eplock_held) in scif_add_epd_to_zombie_list() argument
69 spin_lock(&ep->lock); in scif_add_epd_to_zombie_list()
70 ep->state = SCIFEP_ZOMBIE; in scif_add_epd_to_zombie_list()
71 spin_unlock(&ep->lock); in scif_add_epd_to_zombie_list()
72 list_add_tail(&ep->list, &scif_info.zombie); in scif_add_epd_to_zombie_list()
81 struct scif_endpt *ep = NULL; in scif_find_listen_ep() local
86 ep = list_entry(pos, struct scif_endpt, list); in scif_find_listen_ep()
87 if (ep->port.port == port) { in scif_find_listen_ep()
89 return ep; in scif_find_listen_ep()
99 struct scif_endpt *ep; in scif_cleanup_zombie_epd() local
103 ep = list_entry(pos, struct scif_endpt, list); in scif_cleanup_zombie_epd()
104 if (scif_rma_ep_can_uninit(ep)) { in scif_cleanup_zombie_epd()
107 put_iova_domain(&ep->rma_info.iovad); in scif_cleanup_zombie_epd()
108 kfree(ep); in scif_cleanup_zombie_epd()
130 struct scif_endpt *ep = NULL; in scif_cnctreq() local
138 ep = scif_find_listen_ep(msg->dst.port); in scif_cnctreq()
139 if (!ep) in scif_cnctreq()
143 spin_lock(&ep->lock); in scif_cnctreq()
145 if (ep->backlog <= ep->conreqcnt) { in scif_cnctreq()
147 spin_unlock(&ep->lock); in scif_cnctreq()
152 list_add_tail(&conreq->list, &ep->conlist); in scif_cnctreq()
153 ep->conreqcnt++; in scif_cnctreq()
154 wake_up_interruptible(&ep->conwq); in scif_cnctreq()
155 spin_unlock(&ep->lock); in scif_cnctreq()
176 struct scif_endpt *ep = (struct scif_endpt *)msg->payload[0]; in scif_cnctgnt() local
178 spin_lock(&ep->lock); in scif_cnctgnt()
179 if (SCIFEP_CONNECTING == ep->state) { in scif_cnctgnt()
180 ep->peer.node = msg->src.node; in scif_cnctgnt()
181 ep->peer.port = msg->src.port; in scif_cnctgnt()
182 ep->qp_info.gnt_pld = msg->payload[1]; in scif_cnctgnt()
183 ep->remote_ep = msg->payload[2]; in scif_cnctgnt()
184 ep->state = SCIFEP_MAPPING; in scif_cnctgnt()
186 wake_up(&ep->conwq); in scif_cnctgnt()
188 spin_unlock(&ep->lock); in scif_cnctgnt()
201 struct scif_endpt *ep = (struct scif_endpt *)msg->payload[0]; in scif_cnctgnt_ack() local
204 spin_lock(&ep->lock); in scif_cnctgnt_ack()
206 ep->state = SCIFEP_CONNECTED; in scif_cnctgnt_ack()
207 list_add_tail(&ep->list, &scif_info.connected); in scif_cnctgnt_ack()
208 wake_up(&ep->conwq); in scif_cnctgnt_ack()
209 spin_unlock(&ep->lock); in scif_cnctgnt_ack()
223 struct scif_endpt *ep = (struct scif_endpt *)msg->payload[0]; in scif_cnctgnt_nack() local
225 spin_lock(&ep->lock); in scif_cnctgnt_nack()
226 ep->state = SCIFEP_CLOSING; in scif_cnctgnt_nack()
227 wake_up(&ep->conwq); in scif_cnctgnt_nack()
228 spin_unlock(&ep->lock); in scif_cnctgnt_nack()
240 struct scif_endpt *ep = (struct scif_endpt *)msg->payload[0]; in scif_cnctrej() local
242 spin_lock(&ep->lock); in scif_cnctrej()
243 if (SCIFEP_CONNECTING == ep->state) { in scif_cnctrej()
244 ep->state = SCIFEP_BOUND; in scif_cnctrej()
245 wake_up(&ep->conwq); in scif_cnctrej()
247 spin_unlock(&ep->lock); in scif_cnctrej()
265 struct scif_endpt *ep = NULL; in scif_discnct() local
281 ep = tmpep; in scif_discnct()
282 spin_lock(&ep->lock); in scif_discnct()
293 if (!ep) { in scif_discnct()
298 ep->state = SCIFEP_DISCONNECTED; in scif_discnct()
299 list_add_tail(&ep->list, &scif_info.disconnected); in scif_discnct()
301 wake_up_interruptible(&ep->sendwq); in scif_discnct()
302 wake_up_interruptible(&ep->recvwq); in scif_discnct()
303 spin_unlock(&ep->lock); in scif_discnct()
319 struct scif_endpt *ep = (struct scif_endpt *)msg->payload[0]; in scif_discnt_ack() local
321 spin_lock(&ep->lock); in scif_discnt_ack()
322 ep->state = SCIFEP_DISCONNECTED; in scif_discnt_ack()
323 spin_unlock(&ep->lock); in scif_discnt_ack()
324 complete(&ep->discon); in scif_discnt_ack()
335 struct scif_endpt *ep = (struct scif_endpt *)msg->payload[0]; in scif_clientsend() local
337 spin_lock(&ep->lock); in scif_clientsend()
338 if (SCIFEP_CONNECTED == ep->state) in scif_clientsend()
339 wake_up_interruptible(&ep->recvwq); in scif_clientsend()
340 spin_unlock(&ep->lock); in scif_clientsend()
351 struct scif_endpt *ep = (struct scif_endpt *)msg->payload[0]; in scif_clientrcvd() local
353 spin_lock(&ep->lock); in scif_clientrcvd()
354 if (SCIFEP_CONNECTED == ep->state) in scif_clientrcvd()
355 wake_up_interruptible(&ep->sendwq); in scif_clientrcvd()
356 spin_unlock(&ep->lock); in scif_clientrcvd()