mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-09-02 18:06:13 +02:00
![]() The UVC rev1.5 spec has requirements with data payload as below, take HS Isoc transfer as example (2.4.3.2.2 Sample Isochronous Transfers): +-----+ +----+ +---+-------+ +----+ +-------+ +----+ +-------+ +-----+ | SOF | | IN | | H | DATA2 | | IN | | DATA1 | | IN | | DATA0 | | SOF | +-----+ +----+ +---+-------+ +----+ +-------+ +----+ +-------+ +-----+ \ Payload Header (8 bytes) Three DATA packets need to be sent to the USB bus within 1 micro-frame. However, the start address of payload header and DATA2 passed from uvc layer may be not 4K page-aligned when using scatterlist. The sgs may have below formats: sgs: - sg[0]: 8 bytes (payload header) - sg[1]: 3064 bytes (payload) In this case, the udc needs 2 dTDs to send data out. However, the packets on USB bus will show as: +-----+ +----+ +---+ +-----+ +----+ +-------+ +----+ +-------+ +----+ +-------+ +-----+ | SOF | | IN | | H | | SOF | | IN | | DATA2 | | IN | | DATA1 | | IN | | DATA0 | | SOF | +-----+ +----+ +---+ +-----+ +----+ +-------+ +----+ +-------+ +----+ +-------+ +-----+ \ Payload Header (8 bytes) This behavior is unexpected since the host will not recognize uvc data correctly. The root cause should be dTD doesn't support scatterlist very well. Such as (1) doesn't support one DATA packet span two or more dTD (2) doesn't support specify offset for page1-4. So in order for uvc gadget works properly, disable sg_support when it has uvc function, or else enable it. Note: most of the functions use sg_support after bind stage, except uvc which uses sg_support when call bind(), so if a function in future also uses sg_support when call bind(), it will be limited to non-sg way. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Reviewed-by: Jun Li <jun.li@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com> |
||
---|---|---|
.. | ||
bits.h | ||
ci_hdrc_imx.c | ||
ci_hdrc_imx.h | ||
ci_hdrc_msm.c | ||
ci_hdrc_pci.c | ||
ci_hdrc_tegra.c | ||
ci_hdrc_usb2.c | ||
ci.h | ||
core.c | ||
debug.c | ||
host.c | ||
host.h | ||
Kconfig | ||
Makefile | ||
otg_fsm.c | ||
otg_fsm.h | ||
otg.c | ||
otg.h | ||
trace.c | ||
trace.h | ||
udc.c | ||
udc.h | ||
ulpi.c | ||
usbmisc_imx.c |