Lines Matching defs:epc
201 static enum iwch_ep_state state_read(struct iwch_ep_common *epc)
206 spin_lock_irqsave(&epc->lock, flags);
207 state = epc->state;
208 spin_unlock_irqrestore(&epc->lock, flags);
212 static void __state_set(struct iwch_ep_common *epc, enum iwch_ep_state new)
214 epc->state = new;
217 static void state_set(struct iwch_ep_common *epc, enum iwch_ep_state new)
221 spin_lock_irqsave(&epc->lock, flags);
222 PDBG("%s - %s -> %s\n", __FUNCTION__, states[epc->state], states[new]);
223 __state_set(epc, new);
224 spin_unlock_irqrestore(&epc->lock, flags);
230 struct iwch_ep_common *epc;
232 epc = kmalloc(size, gfp);
233 if (epc) {
234 memset(epc, 0, size);
235 kref_init(&epc->kref);
236 spin_lock_init(&epc->lock);
237 init_waitqueue_head(&epc->waitq);
239 PDBG("%s alloc ep %p\n", __FUNCTION__, epc);
240 return epc;
245 struct iwch_ep_common *epc;
246 epc = container_of(kref, struct iwch_ep_common, kref);
247 PDBG("%s ep %p state %s\n", __FUNCTION__, epc, states[state_read(epc)]);
248 kfree(epc);
2033 struct iwch_ep_common *epc = ctx;
2035 get_ep(epc);