You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usb: dwc2: use temporary URB buffer for small control transfers
As a result of a hardware bug, small IN packets with length < 4 cause a
4-byte write to memory. Generally, buffers allocated with kmalloc
reserve at least one cacheline of memory, but the UVC driver passes
offsets into a struct as the buffer. This causes trampling of video
control min/max/default/range data.
e.g. on a generic UVC camera, these default values are nonsense:
$ v4l2-ctl -d0 --all
[...]
brightness 0x00980900 (int) : min=0 max=255 step=1 default=-8193 value=128
contrast 0x00980901 (int) : min=0 max=100 step=1 default=57343 value=67
saturation 0x00980902 (int) : min=0 max=100 step=1 default=57343 value=62
hue 0x00980903 (int) : min=-90 max=90 step=2 default=12287 value=0
gamma 0x00980910 (int) : min=1 max=30 step=1 default=57343 value=29
[...]
Update the pre-existing DMA alignment code to catch this case.
Link: #3148
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
0 commit comments