Skip to content
Commit dd1494a4 authored by Jonathan Bell's avatar Jonathan Bell Committed by Phil Elwell
Browse files

dwc_otg: constrain endpoint max packet and transfer size on split IN



The hcd would unconditionally set the transfer length to the endpoint
packet size for non-isoc IN transfers. If the remaining buffer length
was less than the length of returned data, random memory would get
scribbled over, with bad effects if it crossed a page boundary.

Force a babble error if this happens by limiting the max transfer size
to the available buffer space. DMA will stop writing to memory on a
babble condition.

The hardware expects xfersize to be an integer multiple of maxpacket
size, so override hcchar.b.mps as well.

Signed-off-by: default avatarJonathan Bell <jonathan@raspberrypi.org>
parent 76772274
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment