]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Thu, 7 Jul 2011 23:25:04 +0000 (20:25 -0300)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork: (52 commits)
  [media] v4l: Document V4L2 control endianness as machine endianness
  [media] adp1653: Add driver for LED flash controller
  [media] v4l: Add flash control documentation
  [media] v4l: Add a class and a set of controls for flash devices
  [media] DocBook: document V4L2_CTRL_TYPE_BITMASK
  [media] vivi: add bitmask test control
  [media] v4l2-ctrls: add new bitmask control type
  [media] vivi: Fix sleep-in-atomic-context
  [media] DocBook: fix typo: vl42_plane_pix_format -> v4l2_plane_pix_format
  [media] v4l2-ctrls: always send an event if a control changed implicitly
  [media] v4l2-ctrls.c: copy-and-paste error: user_to_new -> new_to_user
  [media] pwc: clean-up header files
  [media] pwc: Enable power-management by default on tested models
  [media] pwc: Add a bunch of pwc custom API to feature-removal-schedule.txt
  [media] pwc: Add v4l2 controls for pan/tilt on Logitech QuickCam Orbit/Sphere
  [media] pwc: Allow dqbuf / read to complete while waiting for controls
  [media] pwc: Replace control code with v4l2-ctrls framework
  [media] pwc: properly allocate dma-able memory for ISO buffers
  [media] pwc: Allow multiple opens
  [media] pwc: Move various initialization to driver load and / or stream start
  ...

Conflicts:
Documentation/feature-removal-schedule.txt

13 years agoMerge remote branch 'linus/master'
Mauro Carvalho Chehab [Thu, 7 Jul 2011 23:15:13 +0000 (20:15 -0300)]
Merge remote branch 'linus/master'

* linus/master: (1507 commits)
  FS-Cache: Add a helper to bulk uncache pages on an inode
  xen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.
  sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
  x86: Don't use the EFI reboot method by default
  net: refine {udp|tcp|sctp}_mem limits
  vmxnet3: round down # of queues to power of two
  x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup
  Documentation: fix cgroup blkio throttle filenames
  Documentation: update CodingStyle memory allocators
  MAINTAINERS: move kernel-doc patches location
  FDPIC: Fix memory leak
  PM / Hibernate: Fix free_unnecessary_pages()
  resource: ability to resize an allocated resource
  fs: fix lock initialization
  net: sh_eth: fix the parameter for the ETHER of SH7757
  net: sh_eth: fix cannot work half-duplex mode
  gpio: tps65910: add missing breaks in tps65910_gpio_init
  net: vlan: enable soft features regardless of underlying device
  x86, reboot: Acer Aspire One A110 reboot quirk
  vmxnet3: fix starving rx ring whenoc_skb kb fails
  ...

13 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Thu, 7 Jul 2011 23:13:51 +0000 (20:13 -0300)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream:
  [media] msp3400: fill in v4l2_tuner based on vt->type field
  [media] tuner-core.c: don't change type field in g_tuner or g_frequency
  [media] cx18/ivtv: fix g_tuner support
  [media] tuner-core: power up tuner when called with s_power(1)
  [media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK
  [media] tuner-core: simplify the standard fixup
  [media] tuner-core/v4l2-subdev: document that the type field has to be filled in
  [media] v4l2-subdev.h: remove unused s_mode tuner op
  [media] feature-removal-schedule: change in how radio device nodes are handled
  [media] bttv: fix s_tuner for radio
  [media] pvrusb2: fix g/s_tuner support
  [media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
  [media] tuner-core: fix tuner_resume: use t->mode instead of t->type
  [media] tuner-core: fix s_std and s_tuner

13 years ago[media] v4l: Document V4L2 control endianness as machine endianness
Sakari Ailus [Mon, 4 Jul 2011 08:37:21 +0000 (05:37 -0300)]
[media] v4l: Document V4L2 control endianness as machine endianness

Document V4L2 control endianness as machine endianness.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] adp1653: Add driver for LED flash controller
Sakari Ailus [Thu, 5 May 2011 18:39:25 +0000 (15:39 -0300)]
[media] adp1653: Add driver for LED flash controller

This patch adds the driver for the adp1653 LED flash controller. This
controller supports a high power led in flash and torch modes and an
indicator light, sometimes also called privacy light.

The adp1653 is used on the Nokia N900.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: David Cohen <dacohen@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l: Add flash control documentation
Sakari Ailus [Wed, 4 May 2011 13:45:58 +0000 (10:45 -0300)]
[media] v4l: Add flash control documentation

Add documentation for V4L2 flash controls.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l: Add a class and a set of controls for flash devices
Sakari Ailus [Mon, 21 Mar 2011 15:52:51 +0000 (12:52 -0300)]
[media] v4l: Add a class and a set of controls for flash devices

Add a control class and a set of controls to support LED and Xenon flash
devices. An example of such a device is the adp1653.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook: document V4L2_CTRL_TYPE_BITMASK
Hans Verkuil [Mon, 23 May 2011 10:36:55 +0000 (07:36 -0300)]
[media] DocBook: document V4L2_CTRL_TYPE_BITMASK

[mchehab@redhat.com: Fix a merge conflict and make compat.xml coherent with v4l2.xml]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] vivi: add bitmask test control
Hans Verkuil [Tue, 29 Mar 2011 19:33:11 +0000 (16:33 -0300)]
[media] vivi: add bitmask test control

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ctrls: add new bitmask control type
Hans Verkuil [Mon, 23 May 2011 07:07:05 +0000 (04:07 -0300)]
[media] v4l2-ctrls: add new bitmask control type

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] vivi: Fix sleep-in-atomic-context
Hans Verkuil [Tue, 5 Jul 2011 10:19:23 +0000 (07:19 -0300)]
[media] vivi: Fix sleep-in-atomic-context

Fix sleep-in-atomic-context bug in vivi:

Jun 28 18:14:39 tschai kernel: [   80.970478] BUG: sleeping function called from invalid context at kernel/mutex.c:271
Jun 28 18:14:39 tschai kernel: [   80.970483] in_atomic(): 0, irqs_disabled(): 1, pid: 2854, name: vivi-000
Jun 28 18:14:39 tschai kernel: [   80.970485] INFO: lockdep is turned off.
Jun 28 18:14:39 tschai kernel: [   80.970486] irq event stamp: 0
Jun 28 18:14:39 tschai kernel: [   80.970487] hardirqs last  enabled at (0): [<          (null)>]           (null)
Jun 28 18:14:39 tschai kernel: [   80.970490] hardirqs last disabled at (0): [<ffffffff8109a90b>] copy_process+0x61b/0x1440
Jun 28 18:14:39 tschai kernel: [   80.970495] softirqs last  enabled at (0): [<ffffffff8109a90b>] copy_process+0x61b/0x1440
Jun 28 18:14:39 tschai kernel: [   80.970498] softirqs last disabled at (0): [<          (null)>]           (null)
Jun 28 18:14:39 tschai kernel: [   80.970502] Pid: 2854, comm: vivi-000 Tainted: P            3.0.0-rc1-tschai #372
Jun 28 18:14:39 tschai kernel: [   80.970504] Call Trace:
Jun 28 18:14:39 tschai kernel: [   80.970509]  [<ffffffff81089be3>] __might_sleep+0xf3/0x130
Jun 28 18:14:39 tschai kernel: [   80.970512]  [<ffffffff8176967f>] mutex_lock_nested+0x2f/0x60
Jun 28 18:14:39 tschai kernel: [   80.970517]  [<ffffffffa0acee3e>] vivi_fillbuff+0x20e/0x3f0 [vivi]
Jun 28 18:14:39 tschai kernel: [   80.970520]  [<ffffffff81407004>] ? do_raw_spin_lock+0x54/0x150
Jun 28 18:14:39 tschai kernel: [   80.970524]  [<ffffffff8104ef5e>] ? read_tsc+0xe/0x20
Jun 28 18:14:39 tschai kernel: [   80.970528]  [<ffffffff810c9d87>] ? getnstimeofday+0x57/0xe0
Jun 28 18:14:39 tschai kernel: [   80.970531]  [<ffffffffa0acf1b1>] vivi_thread+0x191/0x2f0 [vivi]
Jun 28 18:14:39 tschai kernel: [   80.970534]  [<ffffffff81093aa0>] ? try_to_wake_up+0x2d0/0x2d0
Jun 28 18:14:39 tschai kernel: [   80.970537]  [<ffffffffa0acf020>] ? vivi_fillbuff+0x3f0/0x3f0 [vivi]
Jun 28 18:14:39 tschai kernel: [   80.970541]  [<ffffffff810bff46>] kthread+0xb6/0xc0
Jun 28 18:14:39 tschai kernel: [   80.970544]  [<ffffffff817743e4>] kernel_thread_helper+0x4/0x10
Jun 28 18:14:39 tschai kernel: [   80.970547]  [<ffffffff8176b4d4>] ? retint_restore_args+0x13/0x13
Jun 28 18:14:39 tschai kernel: [   80.970550]  [<ffffffff810bfe90>] ? __init_kthread_worker+0x70/0x70
Jun 28 18:14:39 tschai kernel: [   80.970552]  [<ffffffff817743e0>] ? gs_change+0x13/0x13

This bug was introduced in 2.6.39.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook: fix typo: vl42_plane_pix_format -> v4l2_plane_pix_format
Hans Verkuil [Tue, 5 Jul 2011 10:17:39 +0000 (07:17 -0300)]
[media] DocBook: fix typo: vl42_plane_pix_format -> v4l2_plane_pix_format

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ctrls: always send an event if a control changed implicitly
Hans Verkuil [Tue, 5 Jul 2011 10:09:26 +0000 (07:09 -0300)]
[media] v4l2-ctrls: always send an event if a control changed implicitly

By default no control events are sent to the application that caused the
control value or flags change (i.e. the control(s) passed to VIDIOC_S_CTRL
or VIDIOC_S_EXT_CTRLS). But if a change in one control causes a change in
another control that was not part of the control(s) in VIDIOC_S_CTRL or
S_EXT_CTRLS, then the application should be notified.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ctrls.c: copy-and-paste error: user_to_new -> new_to_user
Hans Verkuil [Tue, 5 Jul 2011 09:56:37 +0000 (06:56 -0300)]
[media] v4l2-ctrls.c: copy-and-paste error: user_to_new -> new_to_user

The new values were never copied to userspace due to this copy and paste
error. This was introduced during the rewrite of this part of the code in
commit 3219f8a362640b7e4b7e2187b1094c4e46d85aa0.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: clean-up header files
Hans de Goede [Sun, 3 Jul 2011 19:26:52 +0000 (16:26 -0300)]
[media] pwc: clean-up header files

Remove unused pwc-ioctl.h (the copy in include/media is used everywhere)
Remove almost empty pwc-uncompress.h, move single define to pwc.h

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Enable power-management by default on tested models
Hans de Goede [Sun, 3 Jul 2011 18:52:54 +0000 (15:52 -0300)]
[media] pwc: Enable power-management by default on tested models

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Add a bunch of pwc custom API to feature-removal-schedule.txt
Hans de Goede [Sun, 3 Jul 2011 18:02:10 +0000 (15:02 -0300)]
[media] pwc: Add a bunch of pwc custom API to feature-removal-schedule.txt

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Add v4l2 controls for pan/tilt on Logitech QuickCam Orbit/Sphere
Hans de Goede [Sun, 3 Jul 2011 15:23:24 +0000 (12:23 -0300)]
[media] pwc: Add v4l2 controls for pan/tilt on Logitech QuickCam Orbit/Sphere

This makes the API for this:
1) v4l2 spec compliant
2) match that of the UVC Logitech QuickCam Sphere models

For now this operates in parellel to the sysfs interface for this, but the
intend is to deprecate the sysfs interface and remove it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Allow dqbuf / read to complete while waiting for controls
Hans de Goede [Sun, 3 Jul 2011 14:50:51 +0000 (11:50 -0300)]
[media] pwc: Allow dqbuf / read to complete while waiting for controls

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Replace control code with v4l2-ctrls framework
Hans de Goede [Sun, 26 Jun 2011 15:52:01 +0000 (12:52 -0300)]
[media] pwc: Replace control code with v4l2-ctrls framework

Also remove all the converting from native range to 0-65535 and back
that was going on. This is no longer needed now that we no longer support
v4l1.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: properly allocate dma-able memory for ISO buffers
Hans de Goede [Sun, 26 Jun 2011 16:57:15 +0000 (13:57 -0300)]
[media] pwc: properly allocate dma-able memory for ISO buffers

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Allow multiple opens
Hans de Goede [Sun, 26 Jun 2011 15:13:44 +0000 (12:13 -0300)]
[media] pwc: Allow multiple opens

Allow multiple opens of the /dev/video node so that control panel apps
can be open to-gether with streaming apps.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Move various initialization to driver load and / or stream start
Hans de Goede [Sun, 26 Jun 2011 09:49:59 +0000 (06:49 -0300)]
[media] pwc: Move various initialization to driver load and / or stream start

Doing a bunch of initialization every time /dev/video is opened, and thus
for example when the udev rules probe for capabilities makes no sense,
do it at driver load, resp. stream start instead.

This is a preparation patch for allowing multiple opens of the /dev/video
node.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Make power-saving a per device option
Hans de Goede [Sun, 26 Jun 2011 06:51:19 +0000 (03:51 -0300)]
[media] pwc: Make power-saving a per device option

  as vcinterface must be set before calling pwc_camera_power()

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Remove some unused PWC_INT_PIPE left overs
Hans de Goede [Sat, 25 Jun 2011 20:42:55 +0000 (17:42 -0300)]
[media] pwc: Remove some unused PWC_INT_PIPE left overs

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Get rid of error_status and unplugged variables
Hans de Goede [Sat, 25 Jun 2011 20:39:19 +0000 (17:39 -0300)]
[media] pwc: Get rid of error_status and unplugged variables

Having 2 ways of tracking disconnection is too much, remove both and
instead simply set pdev->udev to NULL on disconnect. Also check for
pdev->udev being NULL in all possible entry paths.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Fix non CodingStyle compliant 3 space indent in pwc.h
Hans de Goede [Sat, 25 Jun 2011 20:10:51 +0000 (17:10 -0300)]
[media] pwc: Fix non CodingStyle compliant 3 space indent in pwc.h

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Replace private buffer management code with videobuf2
Hans de Goede [Mon, 6 Jun 2011 18:33:44 +0000 (15:33 -0300)]
[media] pwc: Replace private buffer management code with videobuf2

Looking at the pwc buffer management code has made it clear to me it needed
some serious fixing. Not only was there a ton of code duplication even
internally to pwc (read and mmap wait for frame code was duplicated), the
code also was outright buggy. With the worst offender being dqbuf, which
just round robin returned all the mmap buffers, without paying any attention
to them being queued by the app with qbuf or not. And qbuf itself was a noop.

So I set out to fix this and already had some cleanups in place when
I read Jonathan Corbet's lwn article on videobuf2, this inspired me to just
rip out the buffer management code and replace it with videobuf2, greatly
reducing the amount of code, and fixing all bugs in one go:

Many thanks to Jonathan for the timely article on this !

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: remove __cplusplus guards from private header
Hans de Goede [Mon, 6 Jun 2011 18:35:54 +0000 (15:35 -0300)]
[media] pwc: remove __cplusplus guards from private header

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pwc: Remove a bunch of bogus sanity checks / don't return EFAULT wrongly
Hans de Goede [Mon, 6 Jun 2011 18:25:18 +0000 (15:25 -0300)]
[media] pwc: Remove a bunch of bogus sanity checks / don't return EFAULT wrongly

The chances if any of these becoming NULL magically are 0% And if they
do become NULL oopsing is the right thing to do (so that the user logs a
bug with the kernel rather then with whatever app he was using).

Returning EFAULT to userspace should only be done when userspace supplies
a bad address, not on driver bugs / hw issues, so in the few cases where the
check is not bogus return something else.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca: s/strncpy/strlcpy/
Hans de Goede [Sun, 5 Jun 2011 17:58:46 +0000 (14:58 -0300)]
[media] gspca: s/strncpy/strlcpy/

Just like in userspace strncpy does not guarantee 0 termination. Use strlcpy
instead which does guarantee 0 termination.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca_sunplus: Fix streaming on logitech quicksmart 420
Hans de Goede [Tue, 17 May 2011 12:34:23 +0000 (09:34 -0300)]
[media] gspca_sunplus: Fix streaming on logitech quicksmart 420

Don't issue a stream stop to the camera at the end of sd_start, this fixes
streaming with this particular model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca: Add new se401 camera driver
Hans de Goede [Sun, 5 Jun 2011 10:44:34 +0000 (07:44 -0300)]
[media] gspca: Add new se401 camera driver

Based on the old v4l1 camera by Jeroen Vreeken driver which recently got
removed from the kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca: reset image_len to 0 on LAST_PACKET when discarding frame
Hans de Goede [Sun, 5 Jun 2011 06:44:43 +0000 (03:44 -0300)]
[media] gspca: reset image_len to 0 on LAST_PACKET when discarding frame

Reset image and image_len to NULL/0 on LAST_PACKET when we're in discard
frame mode, just like we do when not discarding the current frame.

The new se401 driver uses image_len for SOF/EOF detection and thus depends on
this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] videodev2.h Add SE401 compressed RGB format
Hans de Goede [Sun, 5 Jun 2011 11:32:27 +0000 (08:32 -0300)]
[media] videodev2.h Add SE401 compressed RGB format

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - ov519: Fix a LED inversion
Jean-François Moine [Sun, 3 Jul 2011 08:24:05 +0000 (05:24 -0300)]
[media] gspca - ov519: Fix a LED inversion

In the webcam 041e:405f, the LED is inverted.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca - ov519: Fix sensor detection problems
Jean-François Moine [Sun, 3 Jul 2011 08:17:27 +0000 (05:17 -0300)]
[media] gspca - ov519: Fix sensor detection problems

The sensor of some webcams could not be detected due to timing problems
in sensor register reading. This patch adds bridge register readings
before sensor register reading.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoMerge branch 'tmp/for_3.0-rc6' into staging/for_v3.1
Mauro Carvalho Chehab [Thu, 7 Jul 2011 20:49:22 +0000 (17:49 -0300)]
Merge branch 'tmp/for_3.0-rc6' into staging/for_v3.1

* tmp/for_3.0-rc6: (46 commits)
  [media] rc: call input_sync after scancode reports
  [media] imon: allow either proto on unknown 0xffdc
  [media] imon: auto-config ffdc 7e device
  [media] saa7134: fix raw IR timeout value
  [media] rc: fix ghost keypresses with certain hw
  [media] [staging] lirc_serial: allocate irq at init time
  [media] lirc_zilog: fix spinning rx thread
  [media] keymaps: fix table for pinnacle pctv hd devices
  [media] ite-cir: 8709 needs to use pnp resource 2
  [media] V4L: mx1-camera: fix uninitialized variable
  [media] omap_vout: Added check in reqbuf & mmap for buf_size allocation
  [media] OMAP_VOUT: Change hardcoded device node number to -1
  [media] OMAP_VOUTLIB: Fix wrong resizer calculation
  [media] uvcvideo: Disable the queue when failing to start
  [media] uvcvideo: Remove buffers from the queues when freeing
  [media] uvcvideo: Ignore entities for terminals with no supported format
  [media] v4l: Don't access media entity after is has been destroyed
  [media] media: omap3isp: fix a potential NULL deref
  [media] media: vb2: fix allocation failure check
  [media] media: vb2: reset queued_count value during queue reinitialization
  ...

13 years ago[media] msp3400: fill in v4l2_tuner based on vt->type field
Hans Verkuil [Sun, 26 Jun 2011 09:16:03 +0000 (06:16 -0300)]
[media] msp3400: fill in v4l2_tuner based on vt->type field

The vt->type field determines how the msp3400 should fill in the
tuner data, not whether the msp3400 is in radio mode or not.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Thu, 7 Jul 2011 20:22:41 +0000 (13:22 -0700)]
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / Hibernate: Fix free_unnecessary_pages()

13 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Thu, 7 Jul 2011 20:22:26 +0000 (13:22 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

* 'for-linus' of git://git.kernel.dk/linux-block:
  drbd: we should write meta data updates with FLUSH FUA
  drbd: fix limit define, we support 1 PiByte now
  drbd: when receive times out on meta socket, also check last receive time on data socket
  drbd: account bitmap IO during resync as resync-(related-)-io
  drbd: don't cond_resched_lock with IRQs disabled
  drbd: add missing spinlock to bitmap receive
  drbd: Use the correct max_bio_size when creating resync requests
  cfq-iosched: make code consistent
  cfq-iosched: fix a rcu warning

13 years agoFS-Cache: Add a helper to bulk uncache pages on an inode
David Howells [Thu, 7 Jul 2011 11:19:48 +0000 (12:19 +0100)]
FS-Cache: Add a helper to bulk uncache pages on an inode

Add an FS-Cache helper to bulk uncache pages on an inode.  This will
only work for the circumstance where the pages in the cache correspond
1:1 with the pages attached to an inode's page cache.

This is required for CIFS and NFS: When disabling inode cookie, we were
returning the cookie and setting cifsi->fscache to NULL but failed to
invalidate any previously mapped pages.  This resulted in "Bad page
state" errors and manifested in other kind of errors when running
fsstress.  Fix it by uncaching mapped pages when we disable the inode
cookie.

This patch should fix the following oops and "Bad page state" errors
seen during fsstress testing.

  ------------[ cut here ]------------
  kernel BUG at fs/cachefiles/namei.c:201!
  invalid opcode: 0000 [#1] SMP
  Pid: 5, comm: kworker/u:0 Not tainted 2.6.38.7-30.fc15.x86_64 #1 Bochs Bochs
  RIP: 0010: cachefiles_walk_to_object+0x436/0x745 [cachefiles]
  RSP: 0018:ffff88002ce6dd00  EFLAGS: 00010282
  RAX: ffff88002ef165f0 RBX: ffff88001811f500 RCX: 0000000000000000
  RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000282
  RBP: ffff88002ce6dda0 R08: 0000000000000100 R09: ffffffff81b3a300
  R10: 0000ffff00066c0a R11: 0000000000000003 R12: ffff88002ae54840
  R13: ffff88002ae54840 R14: ffff880029c29c00 R15: ffff88001811f4b0
  FS:  00007f394dd32720(0000) GS:ffff88002ef00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
  CR2: 00007fffcb62ddf8 CR3: 000000001825f000 CR4: 00000000000006e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  Process kworker/u:0 (pid: 5, threadinfo ffff88002ce6c000, task ffff88002ce55cc0)
  Stack:
   0000000000000246 ffff88002ce55cc0 ffff88002ce6dd58 ffff88001815dc00
   ffff8800185246c0 ffff88001811f618 ffff880029c29d18 ffff88001811f380
   ffff88002ce6dd50 ffffffff814757e4 ffff88002ce6dda0 ffffffff8106ac56
  Call Trace:
   cachefiles_lookup_object+0x78/0xd4 [cachefiles]
   fscache_lookup_object+0x131/0x16d [fscache]
   fscache_object_work_func+0x1bc/0x669 [fscache]
   process_one_work+0x186/0x298
   worker_thread+0xda/0x15d
   kthread+0x84/0x8c
   kernel_thread_helper+0x4/0x10
  RIP  cachefiles_walk_to_object+0x436/0x745 [cachefiles]
  ---[ end trace 1d481c9af1804caa ]---

I tested the uncaching by the following means:

 (1) Create a big file on my NFS server (104857600 bytes).

 (2) Read the file into the cache with md5sum on the NFS client.  Look in
     /proc/fs/fscache/stats:

Pages  : mrk=25601 unc=0

 (3) Open the file for read/write ("bash 5<>/warthog/bigfile").  Look in proc
     again:

Pages  : mrk=25601 unc=25601

Reported-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman@suse.de>
cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years ago[media] tuner-core.c: don't change type field in g_tuner or g_frequency
Hans Verkuil [Sun, 26 Jun 2011 08:35:34 +0000 (05:35 -0300)]
[media] tuner-core.c: don't change type field in g_tuner or g_frequency

The tuner core should not silently change the type field in g_tuner and
g_frequency. If the tuner is in a different mode than the one that was
requested, then just fill in what you can and don't attempt to read afc,
signal or rxsubchans values.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoMerge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 7 Jul 2011 20:19:04 +0000 (13:19 -0700)]
Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

* 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.

13 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 7 Jul 2011 20:18:13 +0000 (13:18 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Don't use the EFI reboot method by default
  x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup
  x86, reboot: Acer Aspire One A110 reboot quirk
  x86-32, NUMA: Fix boot regression caused by NUMA init unification on highmem machines

13 years agoMerge branches 'core-urgent-for-linus', 'perf-urgent-for-linus' and 'sched-urgent...
Linus Torvalds [Thu, 7 Jul 2011 20:17:45 +0000 (13:17 -0700)]
Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus' and 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  debugobjects: Fix boot crash when kmemleak and debugobjects enabled

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  jump_label: Fix jump_label update for modules
  oprofile, x86: Fix race in nmi handler while starting counters

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Disable (revert) SCHED_LOAD_SCALE increase
  sched, cgroups: Fix MIN_SHARES on 64-bit boxen

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 7 Jul 2011 20:16:21 +0000 (13:16 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (31 commits)
  sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
  net: refine {udp|tcp|sctp}_mem limits
  vmxnet3: round down # of queues to power of two
  net: sh_eth: fix the parameter for the ETHER of SH7757
  net: sh_eth: fix cannot work half-duplex mode
  net: vlan: enable soft features regardless of underlying device
  vmxnet3: fix starving rx ring whenoc_skb kb fails
  bridge: Always flood broadcast packets
  greth: greth_set_mac_add would corrupt the MAC address.
  net: bind() fix error return on wrong address family
  natsemi: silence dma-debug warnings
  net: 8139too: Initial necessary vlan_features to support vlan
  Fix call trace when interrupts are disabled while sleeping function kzalloc is called
  qlge:Version change to v1.00.00.29
  qlge: Fix printk priority so chip fatal errors are always reported.
  qlge:Fix crash caused by mailbox execution on wedged chip.
  xfrm4: Don't call icmp_send on local error
  ipv4: Don't use ufo handling on later transformed packets
  xfrm: Remove family arg from xfrm_bundle_ok
  ipv6: Don't put artificial limit on routing table size.
  ...

13 years ago[media] cx18/ivtv: fix g_tuner support
Hans Verkuil [Sat, 25 Jun 2011 13:28:21 +0000 (10:28 -0300)]
[media] cx18/ivtv: fix g_tuner support

The driver shouldn't override vt->type, and the tuner name should be
based on vt->type as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core: power up tuner when called with s_power(1)
Hans Verkuil [Sat, 25 Jun 2011 13:24:49 +0000 (10:24 -0300)]
[media] tuner-core: power up tuner when called with s_power(1)

Drivers must be able to rely on s_power to power up subdevices.

Note that at this moment no driver attempts to power up tuners. This probably
isn't surprising since s_power(1) was never implemented in tuner-core.c until
now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK
Hans Verkuil [Tue, 14 Jun 2011 07:03:26 +0000 (04:03 -0300)]
[media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK

Prohibit attempts to change the tuner to a type that is different
from the device node the ioctl is called from. I.e. the type must
be RADIO for a radio node and ANALOG_TV for a video/vbi node.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core: simplify the standard fixup
Hans Verkuil [Mon, 13 Jun 2011 12:47:56 +0000 (09:47 -0300)]
[media] tuner-core: simplify the standard fixup

Get rid of a number of unnecessary tuner_dbg messages by simplifying
the std fixup function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core/v4l2-subdev: document that the type field has to be filled in
Hans Verkuil [Mon, 13 Jun 2011 12:35:56 +0000 (09:35 -0300)]
[media] tuner-core/v4l2-subdev: document that the type field has to be filled in

The tuner ops g_frequency, g_tuner and s_tuner require that the tuner type
field is filled in. Document this.

The tuner-core doc is based on a patch from Mauro Carvalho Chehab <mchehab@redhat.com>.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-subdev.h: remove unused s_mode tuner op
Hans Verkuil [Mon, 13 Jun 2011 12:34:56 +0000 (09:34 -0300)]
[media] v4l2-subdev.h: remove unused s_mode tuner op

s_mode is no longer used, so remove it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] feature-removal-schedule: change in how radio device nodes are handled
Hans Verkuil [Mon, 13 Jun 2011 12:38:54 +0000 (09:38 -0300)]
[media] feature-removal-schedule: change in how radio device nodes are handled

Radio devices have weird side-effects when used with combined TV/radio
tuners and the V4L2 spec is ambiguous on how it should work. This results
in inconsistent driver behavior which makes life hard for everyone.

Be more strict in when and how the switch between radio and tv mode
takes place and make sure all drivers behave the same.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] bttv: fix s_tuner for radio
Hans Verkuil [Sun, 12 Jun 2011 10:02:43 +0000 (07:02 -0300)]
[media] bttv: fix s_tuner for radio

Fix typo: g_tuner should have been s_tuner.

Tested with a bttv card.

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pvrusb2: fix g/s_tuner support
Hans Verkuil [Sun, 12 Jun 2011 09:39:52 +0000 (06:39 -0300)]
[media] pvrusb2: fix g/s_tuner support

The tuner-core subdev requires that the type field of v4l2_tuner is
filled in correctly. This is done in v4l2-ioctl.c, but pvrusb2 doesn't
use that yet, so we have to do it manually based on whether the current
input is radio or not.

Tested with my pvrusb2.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Mike Isely <isely@pobox.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
Hans Verkuil [Sun, 12 Jun 2011 09:36:41 +0000 (06:36 -0300)]
[media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner

The subdevs are supposed to receive a valid tuner type for the g_frequency
and g/s_tuner subdev ops. Some drivers do this, others don't. So prefill
this in v4l2-ioctl.c based on whether the device node from which this is
called is a radio node or not.

The spec does not require applications to fill in the type, and if they
leave it at 0 then the 'check_mode' call in tuner-core.c will return
an error and the ioctl does nothing.

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core: fix tuner_resume: use t->mode instead of t->type
Hans Verkuil [Mon, 13 Jun 2011 12:21:56 +0000 (09:21 -0300)]
[media] tuner-core: fix tuner_resume: use t->mode instead of t->type

set_mode is called with t->type, which is the tuner type. Instead, use
t->mode which is the actual tuner mode (i.e. radio vs tv).

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner-core: fix s_std and s_tuner
Hans Verkuil [Tue, 14 Jun 2011 06:56:09 +0000 (03:56 -0300)]
[media] tuner-core: fix s_std and s_tuner

Both s_std and s_tuner are broken because set_mode_freq is called before the
new std (for s_std) and audmode (for s_tuner) are set.

This patch splits set_mode_freq in a set_mode and a set_freq and in s_std/s_tuner
first calls set_mode, and if that returns 0 (i.e. the mode is supported)
then they set t->std/t->audmode and call set_freq.

This fixes a bug where changing std or audmode would actually change it to
the previous value.

Discovered while testing analog TV standards for cx18 with a tda18271 tuner.

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] firedtv: change some -EFAULT returns to more fitting error codes
Stefan Richter [Wed, 6 Jul 2011 18:54:48 +0000 (15:54 -0300)]
[media] firedtv: change some -EFAULT returns to more fitting error codes

Mauro Carvalho Chehab wrote:
> I'm validating if all drivers are behaving equally with respect to the
> error codes returned to userspace, and double-checking with the API.
>
> On almost all places, -EFAULT code is used only to indicate when
> copy_from_user/copy_to_user fails. However, firedtv uses a lot of
> -EFAULT, where it seems to me that other error codes should be used
> instead (like -EIO for bus transfer errors and -EINVAL/-ERANGE for
> invalid/out of range parameters).

This concerns only the CI (CAM) related code of firedtv of which I know
little.  Let's just pass through the error returns of lower level I/O
code where applicable, and -EACCES (permission denied) when a seemingly
valid but negative FCP response or an unknown-to-firedtv CA message is
received.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Henrik Kurelid <henrik@kurelid.se>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] return -ENOTTY for unsupported ioctl's at legacy drivers
Mauro Carvalho Chehab [Sun, 26 Jun 2011 13:18:03 +0000 (10:18 -0300)]
[media] return -ENOTTY for unsupported ioctl's at legacy drivers

Those drivers are not relying at the V4L2 core to handle the ioctl's.
So, we need to manually patch them every time a change goes to the
core.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-By: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2 core: return -ENOTTY if an ioctl doesn't exist
Mauro Carvalho Chehab [Wed, 6 Jul 2011 17:08:08 +0000 (14:08 -0300)]
[media] v4l2 core: return -ENOTTY if an ioctl doesn't exist

Currently, -EINVAL is used to return either when an IOCTL is not
implemented, or if the ioctl was not implemented.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook/dvb: Use generic descriptions for the video API
Mauro Carvalho Chehab [Wed, 6 Jul 2011 16:51:51 +0000 (13:51 -0300)]
[media] DocBook/dvb: Use generic descriptions for the video API

While here, removes the bogus EINTERNAL error codes.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook/dvb: Use generic descriptions for the frontend API
Mauro Carvalho Chehab [Wed, 6 Jul 2011 16:42:08 +0000 (13:42 -0300)]
[media] DocBook/dvb: Use generic descriptions for the frontend API

Move generic stuff into gen-errors.xml, and remove them from
DVB API. While here, removes two bogus error codes that aren't
supported or used on Linux: EINTERNAL and ENOSIGNAL.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dvb-bt8xx: Don't return -EFAULT when a device is not found
Mauro Carvalho Chehab [Wed, 6 Jul 2011 12:05:41 +0000 (09:05 -0300)]
[media] dvb-bt8xx: Don't return -EFAULT when a device is not found

When a device (or their PCI structs) are not found, the error should
be -ENODEV. -EFAULT is reserved for errors while copying arguments
from/to userspace.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook/demux.xml: Remove generic errors
Mauro Carvalho Chehab [Tue, 5 Jul 2011 16:39:38 +0000 (13:39 -0300)]
[media] DocBook/demux.xml: Remove generic errors

Remove generic errors from ioctl() descriptions. For other ioctl's,
there's no generic section. So, just keep whatever is there.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook/audio.xml: Remove generic errors
Mauro Carvalho Chehab [Tue, 5 Jul 2011 16:18:15 +0000 (13:18 -0300)]
[media] DocBook/audio.xml: Remove generic errors

Remove generic errors from ioctl() descriptions. For other ioctl's,
there's no generic section. So, just keep whatever is there.
Also remove the EINTERNAL error code, as no DVB driver returns
it, and this error code is not defined on POSIX or on Linux.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: Point to the generic error chapter
Mauro Carvalho Chehab [Tue, 5 Jul 2011 15:36:01 +0000 (12:36 -0300)]
[media] DVB: Point to the generic error chapter

Just like the V4L, MC and LIRC API's, point to the generic error
chapter for ioctl's. This will allow moving generic error codes
to just one place inside all media API's.

A latter patch will remove the generic errors from each specific
ioctl.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] nxt6000: i2c bus error should return -EIO
Mauro Carvalho Chehab [Wed, 6 Jul 2011 15:41:21 +0000 (12:41 -0300)]
[media] nxt6000: i2c bus error should return -EIO

data from/to userspace. Don't mix it with I2C bus error (-EIO).

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] siano: bad parameter is -EINVAL and not -EFAULT
Mauro Carvalho Chehab [Wed, 6 Jul 2011 15:55:29 +0000 (12:55 -0300)]
[media] siano: bad parameter is -EINVAL and not -EFAULT

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook: Add return error codes to LIRC ioctl session
Mauro Carvalho Chehab [Tue, 5 Jul 2011 15:07:54 +0000 (12:07 -0300)]
[media] DocBook: Add return error codes to LIRC ioctl session

Add a reference for the generic error code chapter to LIRC ioctl
description.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook: Add an error code session for LIRC interface
Mauro Carvalho Chehab [Tue, 5 Jul 2011 15:02:12 +0000 (12:02 -0300)]
[media] DocBook: Add an error code session for LIRC interface

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook: Remove V4L generic error description for ioctl()
Mauro Carvalho Chehab [Tue, 5 Jul 2011 14:57:05 +0000 (11:57 -0300)]
[media] DocBook: Remove V4L generic error description for ioctl()

V4L ioctl function descripton also has a generic error chapter.
Remove it, as it is now obsoleted by a general, multi-API generic
error descriptions.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook/media-ioc-setup-link.xml: Remove EBUSY
Mauro Carvalho Chehab [Tue, 5 Jul 2011 14:39:53 +0000 (11:39 -0300)]
[media] DocBook/media-ioc-setup-link.xml: Remove EBUSY

The EBUSY is already described as a generic error condition, with a
similar text.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook: Use the generic error code page also for MC API
Mauro Carvalho Chehab [Tue, 5 Jul 2011 14:37:58 +0000 (11:37 -0300)]
[media] DocBook: Use the generic error code page also for MC API

Instead of having their own generic error codes at the MC API, move
its section to the generic one and be sure that all media ioctl's
will point to it.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook: Use the generic ioctl error codes for all V4L ioctl's
Mauro Carvalho Chehab [Tue, 5 Jul 2011 14:22:28 +0000 (11:22 -0300)]
[media] DocBook: Use the generic ioctl error codes for all V4L ioctl's

Be sure that all VIDIOC_* ioctl are using the return error macro, and
aren't specifying generic error codes internally.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DocBook: Add a chapter to describe media errors
Mauro Carvalho Chehab [Tue, 5 Jul 2011 13:07:37 +0000 (10:07 -0300)]
[media] DocBook: Add a chapter to describe media errors

There are several errors reported by V4L that aren't described.
They can occur on almost all ioctl's. Instead of adding them
into each ioctl, create a new chapter.

For V4L, the new chapter will automatically be listed on all
places, as there's a macro used everywhere there.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoxen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.
Konrad Rzeszutek Wilk [Wed, 6 Jul 2011 13:43:16 +0000 (09:43 -0400)]
xen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.

Previously we would check for acpi_sci_override_gsi == gsi every time
a PCI device was enabled. That works during early bootup, but later
on it could lead to triggering unnecessarily the acpi_gsi_to_irq(..) lookup.
The reason is that acpi_sci_override_gsi was declared in __initdata and
after early bootup could contain bogus values.

This patch moves the check for acpi_sci_override_gsi to the
site where the ACPI SCI is preset.

CC: stable@kernel.org
Reported-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
Tested-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
[http://lists.xensource.com/archives/html/xen-devel/2011-07/msg00154.html]
Suggested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agosctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
Wei Yongjun [Sat, 2 Jul 2011 09:28:04 +0000 (09:28 +0000)]
sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it

We forgot to send up SCTP_SENDER_DRY_EVENT notification when
user app subscribes to this event, and there is no data to be
sent or retransmit.

This is required by the Socket API and used by the DTLS/SCTP
implementation.

Reported-by: Michael Tüxen <Michael.Tuexen@lurchi.franken.de>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Tested-by: Robin Seggelmann <seggelmann@fh-muenster.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agox86: Don't use the EFI reboot method by default
Matthew Garrett [Wed, 6 Jul 2011 20:52:37 +0000 (16:52 -0400)]
x86: Don't use the EFI reboot method by default

Testing suggests that at least some Lenovos and some Intels will
fail to reboot via EFI, attempting to jump to an unmapped
physical address. In the long run we could handle this by
providing a page table with a 1:1 mapping of physical addresses,
but for now it's probably just easier to assume that ACPI or
legacy methods will be present and reboot via those.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@linux.intel.com>
Link: http://lkml.kernel.org/r/1309985557-15350-1-git-send-email-mjg@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agonet: refine {udp|tcp|sctp}_mem limits
Eric Dumazet [Thu, 7 Jul 2011 07:27:05 +0000 (00:27 -0700)]
net: refine {udp|tcp|sctp}_mem limits

Current tcp/udp/sctp global memory limits are not taking into account
hugepages allocations, and allow 50% of ram to be used by buffers of a
single protocol [ not counting space used by sockets / inodes ...]

Lets use nr_free_buffer_pages() and allow a default of 1/8 of kernel ram
per protocol, and a minimum of 128 pages.
Heavy duty machines sysadmins probably need to tweak limits anyway.

References: https://bugzilla.stlinux.com/show_bug.cgi?id=38032
Reported-by: starlight <starlight@binnacle.cx>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovmxnet3: round down # of queues to power of two
Shreyas Bhatewara [Thu, 7 Jul 2011 07:25:52 +0000 (00:25 -0700)]
vmxnet3: round down # of queues to power of two

vmxnet3 device supports only power-of-two number of queues. The driver
therefore needs to check this and rounds down the number of queues to the
nearest power of two.

Signed-off-by: Yong Wang <yongwang@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
13 years agox86, suspend: Restore MISC_ENABLE MSR in realmode wakeup
Kees Cook [Thu, 7 Jul 2011 01:10:34 +0000 (18:10 -0700)]
x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup

Some BIOSes will reset the Intel MISC_ENABLE MSR (specifically the
XD_DISABLE bit) when resuming from S3, which can interact poorly with
ebba638ae723d8a8fc2f7abce5ec18b688b791d7. In 32bit PAE mode, this can
lead to a fault when EFER is restored by the kernel wakeup routines,
due to it setting the NX bit for a CPU that (thanks to the BIOS reset)
now incorrectly thinks it lacks the NX feature. (64bit is not affected
because it uses a common CPU bring-up that specifically handles the
XD_DISABLE bit.)

The need for MISC_ENABLE being restored so early is specific to the S3
resume path. Normally, MISC_ENABLE is saved in save_processor_state(),
but this happens after the resume header is created, so just reproduce
the logic here. (acpi_suspend_lowlevel() creates the header, calls
do_suspend_lowlevel, which calls save_processor_state(), so the saved
processor context isn't available during resume header creation.)

[ hpa: Consider for stable if OK in mainline ]

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Link: http://lkml.kernel.org/r/20110707011034.GA8523@outflux.net
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: <stable@kernel.org> 2.6.38+
13 years agoMerge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Thu, 7 Jul 2011 01:36:53 +0000 (18:36 -0700)]
Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6

* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
  gpio: tps65910: add missing breaks in tps65910_gpio_init

13 years agoDocumentation: fix cgroup blkio throttle filenames
Andrea Righi [Wed, 6 Jul 2011 18:26:26 +0000 (11:26 -0700)]
Documentation: fix cgroup blkio throttle filenames

All the blkio.throttle.* file names are incorrectly reported without
".throttle" in the documentation. Fix it.

Signed-off-by: Andrea Righi <andrea@betterlinux.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: update CodingStyle memory allocators
Jesper Juhl [Wed, 6 Jul 2011 18:27:17 +0000 (11:27 -0700)]
Documentation: update CodingStyle memory allocators

The list of available general purpose memory allocators in
Documentation/CodingStyle chapter 14 is incomplete. This patch adds
the missing vzalloc() to the list.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: move kernel-doc patches location
Randy Dunlap [Wed, 6 Jul 2011 18:19:56 +0000 (11:19 -0700)]
MAINTAINERS: move kernel-doc patches location

Move location of quilt series for kernel-doc patches.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Wed, 6 Jul 2011 19:16:49 +0000 (12:16 -0700)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (46 commits)
  [media] rc: call input_sync after scancode reports
  [media] imon: allow either proto on unknown 0xffdc
  [media] imon: auto-config ffdc 7e device
  [media] saa7134: fix raw IR timeout value
  [media] rc: fix ghost keypresses with certain hw
  [media] [staging] lirc_serial: allocate irq at init time
  [media] lirc_zilog: fix spinning rx thread
  [media] keymaps: fix table for pinnacle pctv hd devices
  [media] ite-cir: 8709 needs to use pnp resource 2
  [media] V4L: mx1-camera: fix uninitialized variable
  [media] omap_vout: Added check in reqbuf & mmap for buf_size allocation
  [media] OMAP_VOUT: Change hardcoded device node number to -1
  [media] OMAP_VOUTLIB: Fix wrong resizer calculation
  [media] uvcvideo: Disable the queue when failing to start
  [media] uvcvideo: Remove buffers from the queues when freeing
  [media] uvcvideo: Ignore entities for terminals with no supported format
  [media] v4l: Don't access media entity after is has been destroyed
  [media] media: omap3isp: fix a potential NULL deref
  [media] media: vb2: fix allocation failure check
  [media] media: vb2: reset queued_count value during queue reinitialization
  ...

Fix up trivial conflict in MAINTAINERS as per Mauro

13 years agoFDPIC: Fix memory leak
Davidlohr Bueso [Wed, 6 Jul 2011 11:26:05 +0000 (12:26 +0100)]
FDPIC: Fix memory leak

The shdr4extnum variable isn't being freed in the cleanup process of
elf_fdpic_core_dump().

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoPM / Hibernate: Fix free_unnecessary_pages()
Rafael J. Wysocki [Wed, 6 Jul 2011 18:15:23 +0000 (20:15 +0200)]
PM / Hibernate: Fix free_unnecessary_pages()

There is a bug in free_unnecessary_pages() that causes it to
attempt to free too many pages in some cases, which triggers the
BUG_ON() in memory_bm_clear_bit() for copy_bm.  Namely, if
count_data_pages() is initially greater than alloc_normal, we get
to_free_normal equal to 0 and "save" greater from 0.  In that case,
if the sum of "save" and count_highmem_pages() is greater than
alloc_highmem, we subtract a positive number from to_free_normal.
Hence, since to_free_normal was 0 before the subtraction and is
an unsigned int, the result is converted to a huge positive number
that is used as the number of pages to free.

Fix this bug by checking if to_free_normal is actually greater
than or equal to the number we're going to subtract from it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@kernel.org
13 years agoresource: ability to resize an allocated resource
Ram Pai [Wed, 6 Jul 2011 06:44:30 +0000 (23:44 -0700)]
resource: ability to resize an allocated resource

Provides the ability to resize a resource that is already allocated.
This functionality is put in place to support reallocation needs of
pci resources.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofs: fix lock initialization
Miklos Szeredi [Wed, 6 Jul 2011 10:33:55 +0000 (12:33 +0200)]
fs: fix lock initialization

locks_alloc_lock() assumed that the allocated struct file_lock is
already initialized to zero members.  This is only true for the first
allocation of the structure, after reuse some of the members will have
random values.

This will for example result in passing random fl_start values to
userspace in fuse for FL_FLOCK locks, which is an information leak at
best.

Fix by reinitializing those members which may be non-zero after freeing.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agonet: sh_eth: fix the parameter for the ETHER of SH7757
Yoshihiro Shimoda [Tue, 5 Jul 2011 20:33:57 +0000 (20:33 +0000)]
net: sh_eth: fix the parameter for the ETHER of SH7757

If the driver didn't set this parameter on the ETHER, the CPU will
encounter the "data address error" exception.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: fix cannot work half-duplex mode
Yoshihiro Shimoda [Tue, 5 Jul 2011 20:33:51 +0000 (20:33 +0000)]
net: sh_eth: fix cannot work half-duplex mode

When link was down, the bit of DM in ECMR was always set.
So, we could not use half-duplex mode on the controller.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agogpio: tps65910: add missing breaks in tps65910_gpio_init
Axel Lin [Wed, 6 Jul 2011 02:08:27 +0000 (10:08 +0800)]
gpio: tps65910: add missing breaks in tps65910_gpio_init

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Wed, 6 Jul 2011 03:57:45 +0000 (20:57 -0700)]
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: fix regression occurring during device removal
  USB: fsl_udc_core: fix build breakage when building for ARM arch

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Wed, 6 Jul 2011 03:57:08 +0000 (20:57 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Add Makefile and Kconfig Entries for tps65911 comparator
  mfd: Fix build error for tps65911-comparator.c
  Revert "mfd: Add omap-usbhs runtime PM support"
  input: pmic8xxx-pwrkey: Do not use mfd_get_data()
  input: pmic8xxx-keypad: Do not use mfd_get_data()

13 years agonet: vlan: enable soft features regardless of underlying device
Shan Wei [Wed, 6 Jul 2011 03:43:12 +0000 (20:43 -0700)]
net: vlan: enable soft features regardless of underlying device

If gso/gro feature of underlying device is turned off,
then new created vlan device never can turn gso/gro on.

Although underlying device don't support TSO, we still
should use software segments for vlan device.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agox86, reboot: Acer Aspire One A110 reboot quirk
Peter Chubb [Wed, 6 Jul 2011 00:56:30 +0000 (10:56 +1000)]
x86, reboot: Acer Aspire One A110 reboot quirk

Since git commit
  660e34cebf0a11d54f2d5dd8838607452355f321 x86: reorder reboot method
  preferences,
my Acer Aspire One hangs on reboot.  It appears that its ACPI method
for rebooting is broken.  The attached patch adds a quirk so that the
machine will reboot via the BIOS.

[ hpa: verified that the ACPI control on this machine is just plain broken. ]

Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>
Link: http://lkml.kernel.org/r/w439iki5vl.wl%25peter@chubb.wattle.id.au
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
13 years agovmxnet3: fix starving rx ring whenoc_skb kb fails
Shreyas Bhatewara [Tue, 5 Jul 2011 14:34:05 +0000 (14:34 +0000)]
vmxnet3: fix starving rx ring whenoc_skb kb fails

If the rx ring is completely empty, then the device may never fire an rx
interrupt. Unfortunately, the rx interrupt is what triggers populating the
rx ring with fresh buffers, so this will cause networking to lock up.

This patch replenishes the skb in recv descriptor as soon as it is
peeled off while processing rx completions. If the skb/buffer
allocation fails, existing one is recycled and the packet in hand is
dropped. This way none of the RX desc is ever left empty, thus avoiding
starvation

Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>