History log of /linux-master/drivers/media/usb/gspca/sonixb.c
Revision Date Author Comments
# 4843a543 16-Aug-2019 Hans Verkuil <hverkuil-cisco@xs4all.nl>

media: gspca: zero usb_buf on error

If reg_r() fails, then gspca_dev->usb_buf was left uninitialized,
and some drivers used the contents of that buffer in logic.

This caused several syzbot errors:

https://syzkaller.appspot.com/bug?extid=397fd082ce5143e2f67d
https://syzkaller.appspot.com/bug?extid=1a35278dd0ebfb3a038a
https://syzkaller.appspot.com/bug?extid=06ddf1788cfd048c5e82

I analyzed the gspca drivers and zeroed the buffer where needed.

Reported-and-tested-by: syzbot+1a35278dd0ebfb3a038a@syzkaller.appspotmail.com
Reported-and-tested-by: syzbot+397fd082ce5143e2f67d@syzkaller.appspotmail.com
Reported-and-tested-by: syzbot+06ddf1788cfd048c5e82@syzkaller.appspotmail.com

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>


# fd9871f7 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 24

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or any
later version this program is distributed in the hope that it will
be useful but without any warranty without even the implied warranty
of merchantability or fitness for a particular purpose see the gnu
general public license for more details

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 50 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190519154042.917228456@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3e4d8f48 18-Feb-2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

media: usb: fix several typos

Use codespell to fix lots of typos over frontends.

Manually verified to avoid false-positives.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>


# bcb63314 28-Oct-2016 Sakari Ailus <sakari.ailus@linux.intel.com>

[media] media: Drop FSF's postal address from the source code files

Drop the FSF's postal address from the source code files that typically
contain mostly the license text. Of the 628 removed instances, 578 are
outdated.

The patch has been created with the following command without manual edits:

git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \
drivers/media/ include/media|while read i; do i=$i perl -e '
open(F,"< $ENV{i}");
$a=join("", <F>);
$a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m
&& $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m;
close(F);
open(F, "> $ENV{i}");
print F $a;
close(F);'; done

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>


# 0d5e8c43 16-Jul-2014 Hans Verkuil <hverkuil@xs4all.nl>

[media] Fix 64-bit division fall-out from 64-bit control ranges

Commit 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 increased the internal control ranges
to 64 bit, but that caused problems in drivers that use the minimum/maximum/step/default_value
control values in a division or modulus operations since not all architectures support
those natively.

Luckily, in almost all cases it is possible to just cast to 32 bits (the control value
is known to be 32 bits, so it is safe to cast). Only in v4l2-ctrls.c was it necessary to
use do_div in one function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# 877ed143 11-Apr-2014 Jean Delvare <jdelvare@suse.de>

[media] Prefer gspca_sonixb over sn9c102 for all devices

The sn9c102 driver is deprecated. It was moved to staging in
anticipation of its removal in a future kernel version. However, USB
devices 0C45:6024 and 0C45:6025 are still handled by sn9c102 when
both sn9c102 and gspca_sonixb are enabled.

We must migrate all the users of these devices to the gspca_sonixb
driver now, so that it gets sufficient testing before the sn9c102
driver is finally phased out.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# ee35fa22 03-Sep-2013 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

[media] gspca: print small buffers via %*ph

Instead of passing each byte through stack let's use %*ph specifier to do this
job better.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# 1966bc2a 30-Aug-2013 Ondrej Zary <linux@rainbow-software.org>

[media] gspca: store current mode instead of individual parameters

Store complete current mode (struct v4l2_pix_format) in struct gspca_dev
instead of separate pixfmt, width and height parameters.
This is a preparation for variable resolution support.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>


# 0391dc17 29-Apr-2013 Hans de Goede <hdegoede@redhat.com>

[media] gspca-sonixb: Adjust hstart on sn9c103 + pas202

For some unknown reason we need to increase hstart by 1 on when using the
PAS202 on the sn9c103 (versus on the sn9c102), otherwise we get the wrong
colors, due to shifting of the bayer pattern.

Reported-by: Patrizio Bassi <patrizio.bassi@gmail.com>
Tested-by: Patrizio Bassi <patrizio.bassi@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 9f8c7347 11-Feb-2013 Hans Verkuil <hans.verkuil@cisco.com>

[media] gspca_sonixb: Remove querymenu function (dead code)

We forgot to remove that when sonixb was converted to the control framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# f5b6de9c 24-Jan-2013 Peter Senna Tschudin <peter.senna@gmail.com>

[media] usb/gspca/sonixb.c: use IS_ENABLED() macro

replace:
#if defined(CONFIG_INPUT) || \
defined(CONFIG_INPUT_MODULE)
with:
#if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT
Also replaced:
#if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE
with:
#if !IS_ENABLED(CONFIG_USB_SN9C102)

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 2756442e 21-Dec-2012 Hans de Goede <hdegoede@redhat.com>

[media] gspca_sonixb: Properly wait between i2c writes

We must wait for the previous i2c write to complete before starting a new
one. Sofar we were getting away with this, but it seems that some parts
of the usb-subsystem has been sped up making us go to fast :)
This fixes streaming on sn9c103 based cams not working with an
"i2c_w error" error.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 18fa0d36 21-Dec-2012 Hans de Goede <hdegoede@redhat.com>

[media] gspca_sonixb: Properly wait between i2c writes

We must wait for the previous i2c write to complete before starting a new
one. Sofar we were getting away with this, but it seems that some parts
of the usb-subsystem has been sped up making us go to fast :)
This fixes streaming on sn9c103 based cams not working with an
"i2c_w error" error.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# f72c77a0 04-Nov-2012 Hans de Goede <hdegoede@redhat.com>

[media] gspca-sonixb: Add USB-id for Genius Eye 310

Reported through:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046608
https://bugzilla.kernel.org/show_bug.cgi?id=48111

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>


# 0c0d06ca 13-Aug-2012 Mauro Carvalho Chehab <mchehab@kernel.org>

[media] rename most media/video usb drivers to media/usb

Rename all USB drivers with their own directory under
drivers/media/video into drivers/media/usb and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>