drivers/usb/gadget/udc/fsl_qe_udc.c
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/udc/fsl_qe_udc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/udc/fsl_qe_udc.c- Extension
.c- Size
- 63496 bytes
- Lines
- 2719
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/kernel.hlinux/ioport.hlinux/types.hlinux/errno.hlinux/err.hlinux/slab.hlinux/list.hlinux/interrupt.hlinux/io.hlinux/moduleparam.hlinux/of.hlinux/of_address.hlinux/of_irq.hlinux/platform_device.hlinux/dma-mapping.hlinux/usb/ch9.hlinux/usb/gadget.hlinux/usb/otg.hsoc/fsl/qe/qe.hasm/cpm.hasm/dma.hasm/reg.hfsl_qe_udc.h
Detected Declarations
function donefunction nukefunction qe_eprx_stall_changefunction qe_eptx_stall_changefunction qe_ep0_stallfunction qe_eprx_nackfunction qe_eprx_normalfunction qe_ep_cmd_stoptxfunction qe_ep_cmd_restarttxfunction qe_ep_flushtxfifofunction qe_ep_filltxfifofunction qe_epbds_resetfunction qe_ep_resetfunction qe_ep_toggledata01function qe_ep_bd_initfunction qe_ep_rxbd_updatefunction qe_ep_register_initfunction qe_ep_initfunction qe_usb_enablefunction qe_usb_disablefunction recycle_one_rxbdfunction recycle_rxbdsfunction ep_recycle_rxbdsfunction ep0_setup_handlefunction qe_ep0_rxfunction qe_ep_rxframe_handlefunction ep_rx_taskletfunction qe_ep_rxfunction qe_ep_txfunction txcompletefunction qe_usb_senddatafunction sendnulldatafunction frame_create_txfunction ep0_prime_statusfunction ep0_req_completefunction ep0_txcompletefunction ep0_txframe_handlefunction qe_ep0_txconffunction ep_txframe_handlefunction qe_ep_txconffunction ep_req_sendfunction ep_req_rxfunction ep_req_receivefunction qe_ep_enablefunction qe_ep_disablefunction qe_free_requestfunction __qe_ep_queuefunction qe_ep_queue
Annotated Snippet
switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
case USB_ENDPOINT_XFER_BULK:
if (strstr(ep->ep.name, "-iso")
|| strstr(ep->ep.name, "-int"))
goto en_done;
switch (udc->gadget.speed) {
case USB_SPEED_HIGH:
if ((max == 128) || (max == 256) || (max == 512))
break;
fallthrough;
default:
switch (max) {
case 4:
case 8:
case 16:
case 32:
case 64:
break;
default:
case USB_SPEED_LOW:
goto en_done;
}
}
break;
case USB_ENDPOINT_XFER_INT:
if (strstr(ep->ep.name, "-iso")) /* bulk is ok */
goto en_done;
switch (udc->gadget.speed) {
case USB_SPEED_HIGH:
if (max <= 1024)
break;
fallthrough;
case USB_SPEED_FULL:
if (max <= 64)
break;
fallthrough;
default:
if (max <= 8)
break;
goto en_done;
}
break;
case USB_ENDPOINT_XFER_ISOC:
if (strstr(ep->ep.name, "-bulk")
|| strstr(ep->ep.name, "-int"))
goto en_done;
switch (udc->gadget.speed) {
case USB_SPEED_HIGH:
if (max <= 1024)
break;
fallthrough;
case USB_SPEED_FULL:
if (max <= 1023)
break;
fallthrough;
default:
goto en_done;
}
break;
case USB_ENDPOINT_XFER_CONTROL:
if (strstr(ep->ep.name, "-iso")
|| strstr(ep->ep.name, "-int"))
goto en_done;
switch (udc->gadget.speed) {
case USB_SPEED_HIGH:
case USB_SPEED_FULL:
switch (max) {
case 1:
case 2:
case 4:
case 8:
case 16:
case 32:
case 64:
break;
default:
goto en_done;
}
fallthrough;
case USB_SPEED_LOW:
switch (max) {
case 1:
case 2:
case 4:
case 8:
break;
default:
goto en_done;
}
default:
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/ioport.h`, `linux/types.h`, `linux/errno.h`, `linux/err.h`, `linux/slab.h`, `linux/list.h`.
- Detected declarations: `function done`, `function nuke`, `function qe_eprx_stall_change`, `function qe_eptx_stall_change`, `function qe_ep0_stall`, `function qe_eprx_nack`, `function qe_eprx_normal`, `function qe_ep_cmd_stoptx`, `function qe_ep_cmd_restarttx`, `function qe_ep_flushtxfifo`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.