Lines Matching defs:uep

43 	struct usbhsg_uep	*uep;
60 int (*device)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
62 int (*interface)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
64 int (*endpoint)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
78 ((i) < (g)->uep_size) && ((pos) = (g)->uep + (i)); \
96 #define usbhsg_gpriv_to_dcp(gp) ((gp)->uep)
97 #define usbhsg_gpriv_to_nth_uep(gp, i) ((gp)->uep + i)
118 static void __usbhsg_queue_pop(struct usbhsg_uep *uep,
122 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
123 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
132 usb_gadget_giveback_request(&uep->ep, &ureq->req);
136 static void usbhsg_queue_pop(struct usbhsg_uep *uep,
140 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
145 __usbhsg_queue_pop(uep, ureq, status);
152 struct usbhsg_uep *uep = usbhsg_pipe_to_uep(pipe);
159 if (uep)
160 __usbhsg_queue_pop(uep, ureq, 0);
164 static void usbhsg_queue_push(struct usbhsg_uep *uep,
167 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
169 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
218 struct usbhsg_uep *uep,
231 struct usbhsg_uep *uep,
234 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
235 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
243 usbhsg_recip_handler_std_control_done(priv, uep, ctrl);
261 struct usbhsg_uep *uep,
266 usbhsg_recip_handler_std_control_done(priv, uep, ctrl);
271 usbhsg_recip_handler_std_control_done(priv, uep, ctrl);
279 struct usbhsg_uep *uep,
282 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
286 usbhsg_recip_handler_std_control_done(priv, uep, ctrl);
349 struct usbhsg_uep *uep,
352 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
364 struct usbhsg_uep *uep,
367 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
376 struct usbhsg_uep *uep,
379 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
380 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
407 struct usbhsg_uep *uep;
412 int (*func)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
416 uep = usbhsg_gpriv_to_nth_uep(gpriv, nth);
417 pipe = usbhsg_uep_to_pipe(uep);
444 ret = func(priv, uep, ctrl);
556 static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
558 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
566 usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ESHUTDOWN);
582 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
583 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
595 if (uep->pipe) {
596 usbhs_pipe_clear(uep->pipe);
597 usbhs_pipe_sequence_data0(uep->pipe);
606 uep->pipe = pipe;
607 pipe->mod_private = uep;
638 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
642 spin_lock_irqsave(&uep->lock, flags);
643 pipe = usbhsg_uep_to_pipe(uep);
647 usbhsg_pipe_disable(uep);
650 uep->pipe->mod_private = NULL;
651 uep->pipe = NULL;
654 spin_unlock_irqrestore(&uep->lock, flags);
685 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
686 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
688 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
696 usbhsg_queue_push(uep, ureq);
703 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
708 spin_lock_irqsave(&uep->lock, flags);
709 pipe = usbhsg_uep_to_pipe(uep);
717 usbhsg_queue_pop(uep, ureq, -ECONNRESET);
718 spin_unlock_irqrestore(&uep->lock, flags);
725 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
726 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
727 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep);
877 struct usbhsg_uep *uep;
913 usbhsg_for_each_uep_with_dcp(uep, gpriv, i)
914 usbhsg_ep_disable(&uep->ep);
1079 struct usbhsg_uep *uep;
1091 uep = kcalloc(pipe_size, sizeof(struct usbhsg_uep), GFP_KERNEL);
1092 if (!uep) {
1118 gpriv->uep = uep;
1137 usbhsg_for_each_uep_with_dcp(uep, gpriv, i) {
1138 uep->gpriv = gpriv;
1139 uep->pipe = NULL;
1140 snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i);
1142 uep->ep.name = uep->ep_name;
1143 uep->ep.ops = &usbhsg_ep_ops;
1144 INIT_LIST_HEAD(&uep->ep.ep_list);
1145 spin_lock_init(&uep->lock);
1148 if (usbhsg_is_dcp(uep)) {
1149 gpriv->gadget.ep0 = &uep->ep;
1150 usb_ep_set_maxpacket_limit(&uep->ep, 64);
1151 uep->ep.caps.type_control = true;
1155 uep->ep.caps.type_iso = true;
1157 uep->ep.caps.type_bulk = true;
1159 uep->ep.caps.type_int = true;
1160 usb_ep_set_maxpacket_limit(&uep->ep,
1162 list_add_tail(&uep->ep.ep_list, &gpriv->gadget.ep_list);
1164 uep->ep.caps.dir_in = true;
1165 uep->ep.caps.dir_out = true;
1178 kfree(gpriv->uep);
1192 kfree(gpriv->uep);