Commit 3174771
usb: dwc2: limit "maximum packet size" for split-IN transfers
dwc2_hc_start_transfer() overwrites hc->xfer_len for split-IN transfers.
Drivers may not allocate buffers that are multiples of the endpoint max
packet size, which may cause buffer overruns in the last transfer.
The hardware needs HCTSIZ to be set to a multiple of HCCHAR.MPS, so trim
chan->max_packet in dwc2_assign_and_init_hc().
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>1 parent d75a2ff commit 3174771
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2646 | 2646 | | |
2647 | 2647 | | |
2648 | 2648 | | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
2649 | 2653 | | |
2650 | 2654 | | |
2651 | 2655 | | |
| |||
0 commit comments