]> git.baikalelectronics.ru Git - kernel.git/commit
[media] uvcvideo: Fix incorrect bandwidth with Chicony device 04f2:b50b
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 12 May 2015 21:57:53 +0000 (18:57 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 30 May 2015 15:12:15 +0000 (12:12 -0300)
commitdc3423eff8ed3bc2009172afe8603f103865ca07
treec077d309dc7e2186ba576c2df01a87bad938a8ed
parent055ece764a2599e7385172af49f117811c208d2d
[media] uvcvideo: Fix incorrect bandwidth with Chicony device 04f2:b50b

The "TOSHIBA Web Camera - 5M" Chicony device (04f2:b50b) seems to
compute the bandwidth on 16 bits and erroneously sign-extend it to
32 bits, resulting in a huge bandwidth value. Detect and fix that
condition by setting the 16 MSBs to 0 when they're all equal to 1.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/uvc/uvc_video.c