Lines Matching refs:epc

84 static enum c4iw_ep_state state_read(struct c4iw_ep_common *epc);
85 static void __state_set(struct c4iw_ep_common *epc, enum c4iw_ep_state tostate);
86 static void state_set(struct c4iw_ep_common *epc, enum c4iw_ep_state tostate);
88 void __free_ep(struct c4iw_ep_common *epc);
91 static int close_socket(struct c4iw_ep_common *epc, int close);
92 static int shutdown_socket(struct c4iw_ep_common *epc);
110 static void init_sock(struct c4iw_ep_common *epc);
154 struct c4iw_ep_common *epc;
158 epc = TAILQ_FIRST(&req_list);
159 TAILQ_REMOVE(&req_list, epc, entry);
160 epc->entry.tqe_prev = NULL;
162 if (epc->so)
163 process_socket_event((struct c4iw_ep *)epc);
164 c4iw_put_ep(epc);
224 close_socket(struct c4iw_ep_common *epc, int close)
226 struct socket *so = epc->so;
229 CTR4(KTR_IW_CXGBE, "%s: so %p, ep %p, state %s", __func__, epc, so,
230 states[epc->state]);
240 epc->so = NULL;
246 shutdown_socket(struct c4iw_ep_common *epc)
249 CTR4(KTR_IW_CXGBE, "%s: so %p, ep %p, state %s", __func__, epc->so, epc,
250 states[epc->state]);
252 return (soshutdown(epc->so, SHUT_WR));
558 init_sock(struct c4iw_ep_common *epc)
562 struct socket *so = epc->so;
566 soupcall_set(so, SO_RCV, c4iw_so_upcall, epc);
884 c4iw_ep_state state_read(struct c4iw_ep_common *epc)
888 mutex_lock(&epc->mutex);
889 state = epc->state;
890 mutex_unlock(&epc->mutex);
896 __state_set(struct c4iw_ep_common *epc, enum c4iw_ep_state new)
899 epc->state = new;
903 state_set(struct c4iw_ep_common *epc, enum c4iw_ep_state new)
906 mutex_lock(&epc->mutex);
907 __state_set(epc, new);
908 mutex_unlock(&epc->mutex);
914 struct c4iw_ep_common *epc;
916 epc = kzalloc(size, gfp);
917 if (epc == NULL)
920 kref_init(&epc->kref);
921 mutex_init(&epc->mutex);
922 c4iw_init_wr_wait(&epc->wr_wait);
924 return (epc);
928 __free_ep(struct c4iw_ep_common *epc)
930 CTR2(KTR_IW_CXGBE, "%s:feB %p", __func__, epc);
931 KASSERT(!epc->so, ("%s warning ep->so %p \n", __func__, epc->so));
932 KASSERT(!epc->entry.tqe_prev, ("%s epc %p still on req list!\n", __func__, epc));
933 free(epc, M_DEVBUF);
934 CTR2(KTR_IW_CXGBE, "%s:feE %p", __func__, epc);
940 struct c4iw_ep_common *epc;
943 epc = &ep->com;
944 KASSERT(!epc->so, ("%s ep->so %p", __func__, epc->so));
945 KASSERT(!epc->entry.tqe_prev, ("%s epc %p still on req list",
946 __func__, epc));