Home
last modified time | relevance | path

Searched full:ep0 (Results 1 – 25 of 120) sorted by relevance

12345

/linux/drivers/usb/gadget/udc/aspeed-vhub/
H A Dep0.c5 * ep0.c - Endpoint 0 handling
31 struct usb_request *req = &ep->ep0.req.req; in ast_vhub_reply()
36 if (WARN_ON(!ep->ep0.dir_in)) in ast_vhub_reply()
92 memcpy_fromio(&crq, ep->ep0.setup, sizeof(crq)); in ast_vhub_ep0_handle_setup()
100 ep->ep0.state); in ast_vhub_ep0_handle_setup()
112 if (ep->ep0.state != ep0_state_token && in ast_vhub_ep0_handle_setup()
113 ep->ep0.state != ep0_state_stall) { in ast_vhub_ep0_handle_setup()
118 /* Calculate next state for EP0 */ in ast_vhub_ep0_handle_setup()
119 ep->ep0.state = ep0_state_data; in ast_vhub_ep0_handle_setup()
120 ep->ep0.dir_in = !!(crq.bRequestType & USB_DIR_IN); in ast_vhub_ep0_handle_setup()
[all …]
H A Dvhub.h93 /* HUB EP0 control */
136 * matching corresponding vHub EP0 control bits
215 #define AST_VHUB_EP0_MAX_PACKET 64 /* EP0's max packet size */
243 * mode (or ep0), any >= 0 value means "last packet"
255 /* Current state of an EP0 */
264 * An endpoint, either generic, ep0, actual gadget EP
265 * or internal use vhub EP0. vhub EP1 doesn't have an
274 /* EP index in the device, 0 means this is an EP0 */
277 /* Dev pointer or NULL for vHub EP0 */
284 * DMA buffer for EP0, fallback DMA buffer for misaligned
[all …]
H A Ddev.c38 ast_vhub_ep0_handle_ack(&d->ep0, true); in ast_vhub_dev_irq()
40 ast_vhub_ep0_handle_ack(&d->ep0, false); in ast_vhub_dev_irq()
42 ast_vhub_ep0_handle_setup(&d->ep0); in ast_vhub_dev_irq()
52 /* Cleanup EP0 state */ in ast_vhub_dev_enable()
55 /* Enable device and its EP0 interrupts */ in ast_vhub_dev_enable()
70 /* Set EP0 DMA buffer address */ in ast_vhub_dev_enable()
71 writel(d->ep0.buf_dma, d->regs + AST_VHUB_DEV_EP0_DATA); in ast_vhub_dev_enable()
177 return ast_vhub_simple_reply(&d->ep0, st0, 0); in ast_vhub_dev_status()
202 return ast_vhub_simple_reply(&d->ep0, st0, 0); in ast_vhub_ep_status()
391 /* Only EP0 can be a control endpoint */ in ast_vhub_udc_match_ep()
[all …]
/linux/tools/usb/ffs-aio-example/simple/device_app/
H A Daio_simple.c182 static void handle_ep0(int ep0, bool *ready) in handle_ep0() argument
188 pfds[0].fd = ep0; in handle_ep0()
194 ret = read(ep0, &event, sizeof(event)); in handle_ep0()
196 perror("unable to read event from ep0"); in handle_ep0()
203 write(ep0, NULL, 0); in handle_ep0()
205 read(ep0, NULL, 0); in handle_ep0()
227 int ep0; in main() local
252 sprintf(ep_path, "%s/ep0", argv[1]); in main()
253 ep0 = open(ep_path, O_RDWR); in main()
254 if (ep0 < 0) { in main()
[all …]
/linux/tools/usb/ffs-aio-example/multibuff/device_app/
H A Daio_multibuff.c176 static void handle_ep0(int ep0, bool *ready) in handle_ep0() argument
181 ret = read(ep0, &event, sizeof(event)); in handle_ep0()
183 perror("unable to read event from ep0"); in handle_ep0()
190 write(ep0, NULL, 0); in handle_ep0()
192 read(ep0, NULL, 0); in handle_ep0()
240 int ep0, ep1; in main() local
263 sprintf(ep_path, "%s/ep0", argv[1]); in main()
264 ep0 = open(ep_path, O_RDWR); in main()
265 if (ep0 < 0) { in main()
266 perror("unable to open ep0"); in main()
[all …]
/linux/drivers/usb/gadget/function/
H A Du_fs.h96 * are refused. All epfiles, except ep0, are deleted so there
102 * ep0 is opened again. In the second case functionfs state will
120 * In this state no open(2), read(2) or write(2) (both on ep0
122 * unlinked and all closed so this is not a problem; ep0 is
123 * also closed but ep0 file exists and so open(2) on ep0 must
134 * there. The next read/write on ep0 will handle the
141 * setup. If this state is set read/write on ep0 return
178 /* how many files are opened (EP0 and others) */
181 /* EP0 state */
187 * happens only in ep0 read which is P: mutex
[all …]
/linux/drivers/usb/mtu3/
H A Dmtu3_gadget_ep0.c3 * mtu3_gadget_ep0.c - MediaTek USB3 DRD peripheral driver ep0 handling
17 /* ep0 is always mtu3->in_eps[0] */
18 #define next_ep0_request(mtu) next_request((mtu)->ep0)
59 mtu3_req_complete(mtu->ep0, req, 0); in ep0_req_giveback()
123 * because the length of test packet is less than max packet of HS ep0, in ep0_load_test_packet()
126 ep0_write_fifo(mtu->ep0, mtu3_test_packet, sizeof(mtu3_test_packet)); in ep0_load_test_packet()
152 dev_dbg(mtu->dev, "ep0: %s STALL, ep0_state: %s\n", in ep0_stall_set()
196 mtu->ep0_req.mep = mtu->ep0; in ep0_set_sel()
200 ret = ep0_queue(mtu->ep0, &mtu->ep0_req); in ep0_set_sel()
265 mtu->ep0_req.mep = mtu->ep0; in ep0_get_status()
[all …]
H A Dmtu3_core.c180 /* Clear EP0 and Tx/Rx EPn interrupts status */ in mtu3_intr_status_clear()
307 /* set/clear the stall and toggle bits for non-ep0 */
403 /* for non-ep0 */
505 /* for non-ep0 */
531 * 1. when device IP supports SS, the fifo of EP0, TX EPs, RX EPs
535 * the total fifo size of non-ep0, and ep0's is fixed to 64B,
537 * Due to the first 64B should be reserved for EP0, non-ep0's fifo
582 u32 maxpacket = mtu->g.ep0->maxpacket; in mtu3_ep0_setup()
593 /* Enable EP0 interrupt */ in mtu3_ep0_setup()
614 /* one for ep0, another is reserved */ in mtu3_mem_alloc()
[all …]
H A Dmtu3.h89 * Maximum size of ep0 response buffer for ch9 requests,
112 * @MU3D_EP0_STATE_STALL: ep0 is in stall status, will be auto-cleared
320 * @setup_buf: ep0 response buffer for GET_STATUS and SET_SEL requests
337 struct mtu3_ep *ep0; member
/linux/drivers/usb/gadget/legacy/
H A Dinode.c51 * are two types of files. One type is for the device, implementing ep0.
89 /* /dev/gadget/$CHIP represents ep0 and the whole device */
95 * ep0/device i/o modes and binding to the controller. Driver
101 /* From then on, ep0 fd is in either of two basic modes:
110 /* UNBOUND means the driver closed ep0, so the device won't be
131 /* drivers reading ep0 MUST handle control requests (SETUP)
154 /* except this scratch i/o buffer for ep0 */
243 * at the end of ep0 configuration, or after unbind.
845 /* EP0 IMPLEMENTATION can be partly in userspace.
898 DBG (dev, "ep0 request busy!\n"); in setup_req()
[all …]
H A Ddbgp.c226 usb_ep_free_request(gadget->ep0, dbgp.req); in dbgp_unbind()
284 dbgp.req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL); in dbgp_bind()
367 device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; in dbgp_setup()
401 return usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); in dbgp_setup()
/linux/include/uapi/linux/usb/
H A Dgadgetfs.h5 * Other than ep0 operations, most things are done by read() and write()
8 * i/o requests. When ep0 is configured, the device can enumerate;
10 * ep0 require ioctl() operations.
28 * Events are delivered on the ep0 file descriptor, when the user mode driver
/linux/drivers/usb/gadget/udc/bdc/
H A Dbdc_ep.c383 /* Setup the first bd for ep0 transfer */
400 (req_len % bdc->gadget.ep0->maxpacket == 0)) { in setup_first_bd_ep0()
403 bdc->gadget.ep0->maxpacket); in setup_first_bd_ep0()
416 "Unknown ep0 state for queueing bd ep0_state:%s\n", in setup_first_bd_ep0()
455 /* format of first bd for ep0 is different than other */ in setup_bd_list_xfr()
587 /* ep0 memory is not freed, but reused on next connect sr */ in bdc_ep_disable()
617 /* only for ep0: config ep is called for ep0 from connect event */ in bdc_ep_enable()
635 /* EP0 related code */
655 /* Queue xfr on ep0 */
915 /* ep0 is not in this gadget list */ in bdc_free_ep()
[all …]
H A Dbdc_udc.c50 /* EP0 initial descripror */
86 bdc->gadget.ep0->maxpacket = EP0_MAX_PKT_SIZE; in bdc_uspc_connected()
98 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected()
104 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected()
110 bdc->gadget.ep0->maxpacket = 8; in bdc_uspc_connected()
118 /* Now we know the speed, configure ep0 */ in bdc_uspc_connected()
122 dev_err(bdc->dev, "EP0 config failed\n"); in bdc_uspc_connected()
135 * Only stop ep0 from here, rest of the endpoints will be disabled in bdc_uspc_disconnected()
556 * Allocate bd list for ep0 only, ep0 will be enabled on connect in bdc_udc_init()
H A Dbdc.h36 * Maximum size of ep0 response buffer for ch9 requests,
385 /* EP0 states */
418 * 1 for ep0, 2 for 1out,3 for 1in ....
445 /* ep0 callback handlers */
447 /* ep0 response buffer for ch9 requests like GET_STATUS and SET_SEL */
484 /* EP0 XSF handlers */
/linux/drivers/usb/musb/
H A Dmusb_regs.h113 #define MUSB_TYPE_PROTO 0x30 /* Implicitly zero for ep0 */
115 #define MUSB_TYPE_REMOTE_END 0xf /* Implicitly zero for ep0 */
249 #define MUSB_CSR0 MUSB_TXCSR /* Re-used for EP0 */
253 #define MUSB_COUNT0 MUSB_RXCOUNT /* Re-used for EP0 */
255 #define MUSB_TYPE0 MUSB_TXTYPE /* Re-used for EP0 */
257 #define MUSB_NAKLIMIT0 MUSB_TXINTERVAL /* Re-used for EP0 */
261 #define MUSB_CONFIGDATA MUSB_FIFOSIZE /* Re-used for EP0 */
/linux/drivers/usb/gadget/udc/
H A Dfsl_usb2_udc.h104 /* ep0 transfer state */
300 #define EPCTRL_TX_DATA_TOGGLE_RST 0x00400000 /* Not EP0 */
301 #define EPCTRL_TX_DATA_TOGGLE_INH 0x00200000 /* Not EP0 */
303 #define EPCTRL_TX_DATA_SOURCE 0x00020000 /* Not EP0 */
306 #define EPCTRL_RX_DATA_TOGGLE_RST 0x00000040 /* Not EP0 */
307 #define EPCTRL_RX_DATA_TOGGLE_INH 0x00000020 /* Not EP0 */
309 #define EPCTRL_RX_DATA_SINK 0x00000002 /* Not EP0 */
492 struct fsl_req *status_req; /* ep0 status request */
536 /* we only have one ep0 structure but two queue heads */ in get_qh_by_ep()
H A Dnet2280.h69 /* ep0 max packet size */
116 /* ep0 only */ in allow_status()
191 /* ep0 and bulk/intr endpoints */ in set_halt()
201 /* ep0 and bulk/intr endpoints */ in clear_halt()
/linux/Documentation/usb/
H A Dfunctionfs.rst19 mounted provides an "ep0" file. User space driver need to
35 configuration changes to (say) endpoint 2)). "ep0" is used
70 have been written to their ep0's.
87 IOCTLs have to be performed on a data endpoint (ie. not ep0). They are:
/linux/Documentation/driver-api/cxl/
H A Daccess-coordinates.rst42 > EP0 EP1 EP2 EP3 EP4 EP5 EP6 EP7
48 Min(SW0SSLBIS for SW0DSP0 (EP0), EP0 DSLBIS, EP0 Upstream Link) +
/linux/drivers/usb/host/
H A Dfhci-tds.c100 ep = usb->ep0; in fhci_ep0_free()
136 usb->ep0 = NULL; in fhci_ep0_free()
224 usb->ep0 = ep; in fhci_create_ep()
279 struct endpoint *ep = usb->ep0; in fhci_td_transaction_confirm()
385 struct endpoint *ep = usb->ep0; in fhci_host_transaction()
472 struct endpoint *ep = usb->ep0; in fhci_flush_bds()
528 struct endpoint *ep = usb->ep0; in fhci_flush_actual_frame()
592 struct endpoint *ep = usb->ep0; in fhci_host_transmit_actual_frame()
/linux/drivers/usb/usbip/
H A Dvudc_sysfs.c26 struct vep *ep0 = to_vep(udc->gadget.ep0); in get_gadget_descs() local
47 usb_req = list_last_entry(&ep0->req_queue, struct vrequest, req_entry); in get_gadget_descs()
61 usb_gadget_giveback_request(&(ep0->ep), &(usb_req->req)); in get_gadget_descs()
/linux/drivers/usb/dwc2/
H A Dgadget.c1153 /* Adjust length: EP0 - MPS, other OUT EPs - multiple of MPS */ in dwc2_hsotg_start_req()
1209 dev_dbg(hsotg->dev, "ep0 state:%d\n", hsotg->ep0_state); in dwc2_hsotg_start_req()
1372 * Called to update EP0 structure's pointers depend on stage of
1469 /* If using descriptor DMA configure EP0 descriptor chain pointers */ in dwc2_hsotg_ep_queue()
1673 struct dwc2_hsotg_ep *ep0 = hsotg->eps_out[0]; in dwc2_hsotg_process_req_status() local
1681 if (!ep0->dir_in) { in dwc2_hsotg_process_req_status()
1715 ret = dwc2_hsotg_send_reply(hsotg, ep0, &reply, 2); in dwc2_hsotg_process_req_status()
1777 struct dwc2_hsotg_ep *ep0 = hsotg->eps_out[0]; in dwc2_hsotg_process_req_feature() local
1816 ret = dwc2_hsotg_send_reply(hsotg, ep0, NULL, 0); in dwc2_hsotg_process_req_feature()
1839 ret = dwc2_hsotg_send_reply(hsotg, ep0, NULL, 0); in dwc2_hsotg_process_req_feature()
[all …]
/linux/drivers/usb/cdns3/
H A DMakefile18 cdns3-$(CONFIG_USB_CDNS3_GADGET) += cdns3-gadget.o cdns3-ep0.o
40 cdnsp-mem.o cdnsp-ep0.o
/linux/include/linux/usb/
H A Dgadget.h160 * @type_control:Endpoint supports control type (reserved for ep0).
223 * gadget->ep_list. the control endpoint (gadget->ep0) is not in that list,
343 * @ep0: Endpoint zero, used when reading or writing responses to
419 struct usb_ep *ep0; member
658 * @setup: Invoked for ep0 control requests that aren't handled by
663 * queues a response to ep0, or returns negative to stall.
695 * are in descriptors the ep0 implementation returns from setup() calls.
697 * Except for ep0 implementation, most driver code shouldn't need change to
699 * that ep0 implementation.
717 * ep0 within the setup() call, the driver can do it after setup() returns.
[all …]

12345