Lines Matching refs:uep
49 struct usbhsg_uep *uep; member
64 int (*device)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
66 int (*interface)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
68 int (*endpoint)(struct usbhs_priv *priv, struct usbhsg_uep *uep,
82 ((i) < (g)->uep_size) && ((pos) = (g)->uep + (i)); \
100 #define usbhsg_gpriv_to_dcp(gp) ((gp)->uep)
101 #define usbhsg_gpriv_to_nth_uep(gp, i) ((gp)->uep + i)
122 static void __usbhsg_queue_pop(struct usbhsg_uep *uep, in __usbhsg_queue_pop() argument
126 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in __usbhsg_queue_pop()
127 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in __usbhsg_queue_pop()
135 usb_gadget_giveback_request(&uep->ep, &ureq->req); in __usbhsg_queue_pop()
139 static void usbhsg_queue_pop(struct usbhsg_uep *uep, in usbhsg_queue_pop() argument
143 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_queue_pop()
148 __usbhsg_queue_pop(uep, ureq, status); in usbhsg_queue_pop()
155 struct usbhsg_uep *uep = usbhsg_pipe_to_uep(pipe); in usbhsg_queue_done() local
162 if (uep) in usbhsg_queue_done()
163 __usbhsg_queue_pop(uep, ureq, 0); in usbhsg_queue_done()
167 static void usbhsg_queue_push(struct usbhsg_uep *uep, in usbhsg_queue_push() argument
170 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_queue_push()
172 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_queue_push()
195 struct usbhsg_uep *uep = usbhsg_pipe_to_uep(pipe); in usbhsg_dma_map_ctrl() local
196 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_dma_map_ctrl()
222 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_control_done() argument
235 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_clear_endpoint() argument
238 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_recip_handler_std_clear_endpoint()
239 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_recip_handler_std_clear_endpoint()
247 usbhsg_recip_handler_std_control_done(priv, uep, ctrl); in usbhsg_recip_handler_std_clear_endpoint()
265 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_set_device() argument
270 usbhsg_recip_handler_std_control_done(priv, uep, ctrl); in usbhsg_recip_handler_std_set_device()
275 usbhsg_recip_handler_std_control_done(priv, uep, ctrl); in usbhsg_recip_handler_std_set_device()
283 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_set_endpoint() argument
286 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_recip_handler_std_set_endpoint()
290 usbhsg_recip_handler_std_control_done(priv, uep, ctrl); in usbhsg_recip_handler_std_set_endpoint()
354 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_get_device() argument
357 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_recip_handler_std_get_device()
369 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_get_interface() argument
372 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_recip_handler_std_get_interface()
381 struct usbhsg_uep *uep, in usbhsg_recip_handler_std_get_endpoint() argument
384 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_recip_handler_std_get_endpoint()
385 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_recip_handler_std_get_endpoint()
412 struct usbhsg_uep *uep; in usbhsg_recip_run_handle() local
417 int (*func)(struct usbhs_priv *priv, struct usbhsg_uep *uep, in usbhsg_recip_run_handle()
421 uep = usbhsg_gpriv_to_nth_uep(gpriv, nth); in usbhsg_recip_run_handle()
422 pipe = usbhsg_uep_to_pipe(uep); in usbhsg_recip_run_handle()
449 ret = func(priv, uep, ctrl); in usbhsg_recip_run_handle()
554 static int usbhsg_pipe_disable(struct usbhsg_uep *uep) in usbhsg_pipe_disable() argument
556 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_pipe_disable()
564 usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET); in usbhsg_pipe_disable()
580 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in usbhsg_ep_enable() local
581 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_ep_enable()
590 if (uep->pipe) { in usbhsg_ep_enable()
591 usbhs_pipe_clear(uep->pipe); in usbhsg_ep_enable()
592 usbhs_pipe_sequence_data0(uep->pipe); in usbhsg_ep_enable()
600 uep->pipe = pipe; in usbhsg_ep_enable()
601 pipe->mod_private = uep; in usbhsg_ep_enable()
626 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in usbhsg_ep_disable() local
627 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_ep_disable()
632 usbhsg_pipe_disable(uep); in usbhsg_ep_disable()
635 uep->pipe->mod_private = NULL; in usbhsg_ep_disable()
636 uep->pipe = NULL; in usbhsg_ep_disable()
667 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in usbhsg_ep_queue() local
668 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in usbhsg_ep_queue()
670 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_ep_queue()
678 usbhsg_queue_push(uep, ureq); in usbhsg_ep_queue()
685 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in usbhsg_ep_dequeue() local
687 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in usbhsg_ep_dequeue()
690 usbhsg_queue_pop(uep, ureq, -ECONNRESET); in usbhsg_ep_dequeue()
697 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); in __usbhsg_ep_set_halt_wedge() local
698 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); in __usbhsg_ep_set_halt_wedge()
699 struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); in __usbhsg_ep_set_halt_wedge()
704 usbhsg_pipe_disable(uep); in __usbhsg_ep_set_halt_wedge()
982 struct usbhsg_uep *uep; in usbhs_mod_gadget_probe() local
994 uep = kzalloc(sizeof(struct usbhsg_uep) * pipe_size, GFP_KERNEL); in usbhs_mod_gadget_probe()
995 if (!uep) { in usbhs_mod_gadget_probe()
1018 gpriv->uep = uep; in usbhs_mod_gadget_probe()
1035 usbhsg_for_each_uep_with_dcp(uep, gpriv, i) { in usbhs_mod_gadget_probe()
1036 uep->gpriv = gpriv; in usbhs_mod_gadget_probe()
1037 uep->pipe = NULL; in usbhs_mod_gadget_probe()
1038 snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i); in usbhs_mod_gadget_probe()
1040 uep->ep.name = uep->ep_name; in usbhs_mod_gadget_probe()
1041 uep->ep.ops = &usbhsg_ep_ops; in usbhs_mod_gadget_probe()
1042 INIT_LIST_HEAD(&uep->ep.ep_list); in usbhs_mod_gadget_probe()
1045 if (usbhsg_is_dcp(uep)) { in usbhs_mod_gadget_probe()
1046 gpriv->gadget.ep0 = &uep->ep; in usbhs_mod_gadget_probe()
1047 usb_ep_set_maxpacket_limit(&uep->ep, 64); in usbhs_mod_gadget_probe()
1051 usb_ep_set_maxpacket_limit(&uep->ep, 512); in usbhs_mod_gadget_probe()
1052 list_add_tail(&uep->ep.ep_list, &gpriv->gadget.ep_list); in usbhs_mod_gadget_probe()
1066 kfree(gpriv->uep); in usbhs_mod_gadget_probe()
1080 kfree(gpriv->uep); in usbhs_mod_gadget_remove()