Skip to content
Commit cbbca488 authored by Phil Elwell's avatar Phil Elwell
Browse files

usb: dwc2: Fix gadget DMA unmap direction

The dwc2 gadget support maps and unmaps DMA buffers as necessary. When
mapping and unmapping it uses the direction of the endpoint to select
the direction of the DMA transfer, but this fails for Control OUT
transfers because the unmap occurs after the endpoint direction has
been reversed for the status phase.

A possible solution would be to unmap the buffer before the direction
is changed, but a safer, less invasive fix is to remember the buffer
direction independently of the endpoint direction.

See: https://github.com/raspberrypi/Raspberry-Pi-OS-64bit/issues/127



Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>
parent 9394937e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment