]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
14 years agoV4L/DVB (13100): cx23885: Add IR input keypress handling and enable for the HVR-1850
Andy Walls [Sun, 27 Sep 2009 23:55:41 +0000 (20:55 -0300)]
V4L/DVB (13100): cx23885: Add IR input keypress handling and enable for the HVR-1850

This changes adds IR Rx keypress input event handling to the CX23885 module.
This change specifically only adds input handling for IR devices implemented as
v4l2_subdevices, using only the pulse width mode (for now), and only with
RC-5 remotes.  The V4L-DVB infrastructure is missing too much to support RC-6
mode 6A as used in many media center remotes.   The grey Hauppauge RC-5 remote
and HVR-1850 IR receiver work now.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13099): ir-functions: Export ir_rc5_decode() for use by the cx23885 module
Andy Walls [Sun, 27 Sep 2009 23:05:23 +0000 (20:05 -0300)]
V4L/DVB (13099): ir-functions: Export ir_rc5_decode() for use by the cx23885 module

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13098): cx23885: Add integrated IR subdevice interrupt and notification...
Andy Walls [Sun, 27 Sep 2009 22:51:50 +0000 (19:51 -0300)]
V4L/DVB (13098): cx23885: Add integrated IR subdevice interrupt and notification handling

Add integrated IR subdevice interrupt and notification handling.  This is in
preparation of input keypress handling changes for the cx23885 module.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13097): cx23885: Complete CX23888 IR subdev implementation for Rx & almost...
Andy Walls [Sun, 27 Sep 2009 21:31:37 +0000 (18:31 -0300)]
V4L/DVB (13097): cx23885: Complete CX23888 IR subdev implementation for Rx & almost for Tx

This change completes the v4l2_subdev implementation for IR receive for the
IR controller built into the CX23888.

This changes almost completes the IR transmit side also, but doesn't.  Instead
notes in the comments describe what needs to be done for IR Tx to work in the
subdevice implementation.

The current Tx behavior is skeletal and benign.  If left alone, it does nothing.
It will only ever generate a Tx interrupt on Tx init by a caller or when the
tx_write() method is called.  The ISR, when called, will then disable the Tx
FIFO service interrupt.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13096): v4l2-subdev: Add v4l2_subdev_ir_ops and IR notify defines for v4l2_d...
Andy Walls [Sun, 27 Sep 2009 20:50:04 +0000 (17:50 -0300)]
V4L/DVB (13096): v4l2-subdev: Add v4l2_subdev_ir_ops and IR notify defines for v4l2_device

Add v4l2_subdev_ir_ops and IR notify defines for v4l2_device.  This change
is specifically needed at this time to support the integrated IR controller in
the CX2388[58] chips.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13092): cx25840: Improvements to the cx23885/7/8 chip detection mechanism.
Steven Toth [Sun, 27 Sep 2009 18:54:47 +0000 (15:54 -0300)]
V4L/DVB (13092): cx25840: Improvements to the cx23885/7/8 chip detection mechanism.

The prior mechanism wasn't reliable with the cx23887. This new mechanism
tests correctly against cx23885, 7 and 8 based products.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13091): cx23885: Enable HVR-1850 CX23888 A/V core to get VID_CLK running...
Andy Walls [Sun, 27 Sep 2009 03:14:33 +0000 (00:14 -0300)]
V4L/DVB (13091): cx23885: Enable HVR-1850 CX23888 A/V core to get VID_CLK running for IR

For the IR controller on the CX23888 to work for the HVR-1850 and in
general, the A/V core must be initialized to get the VID_CLK going.
The VID_CLK is the timing reference for the CX23888's integrated
IR controller.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13090): cx25840: Init PLLs properly for CX2388[578] A/V cores
Andy Walls [Sun, 27 Sep 2009 03:00:48 +0000 (00:00 -0300)]
V4L/DVB (13090): cx25840: Init PLLs properly for CX2388[578] A/V cores

The SYS and AUX PLLs need to be initialized to different values based on
the chip: CX23885, CX23887, CX23888, as each uses a different crystal
frequency: 28.6363 MHz, 25.0 MHz, 50.0 MHz.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13089): cx25840: Separate set_audclk_freq functionality for the different...
Andy Walls [Sun, 27 Sep 2009 02:54:20 +0000 (23:54 -0300)]
V4L/DVB (13089): cx25840: Separate set_audclk_freq functionality for the different chips

Separate out the set_audclk_freq() function into separate functions for the
four families of cores.  These cores all use slightly different sample clock
schemes and may be assuming slightly (+/- 3 Hz) different reference frequencies.
The code resuse was not worth the maintenance and testing headache of have all
chips use the same function peppered with conditional logic.

Added comments on how PLL and SRC parameters values are computed.  Fixed a few
bugs related to the shared code having a large number of conditional statements.
Noted inconsistencies with FIXME in the comments.

This is done in preparation for getting the CX2388[578] PLL/clock setting logic
cleaned up for CX23888 analog video and IR (which need the VID PLL set right).

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13088): cx25840: Convert chip/core family checks to static inline functions
Andy Walls [Sun, 27 Sep 2009 02:47:21 +0000 (23:47 -0300)]
V4L/DVB (13088): cx25840: Convert chip/core family checks to static inline functions

Change logic to check for various chip or core families to inline functions.
Checks for specific chips should be made against the state->id field now.  This
is in preparation for chip/core specific code for setting up PLLs for the
CX2388[578] family of cores, that all run with different crystal frequencies.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13087): cx25840: Improve detection of CX2388[578] A/V cores
Andy Walls [Sun, 27 Sep 2009 02:32:54 +0000 (23:32 -0300)]
V4L/DVB (13087): cx25840: Improve detection of CX2388[578] A/V cores

Add improved logic to detect the exact CX2388[578] A/V core that is being
probed.  Also cleaned up detection and logging for CX2310[12], CX2583[67],
and CX2584[0123] cores and chips.

Also added code to identify a CX2388[578] A/V decoder core that is not
responding properly.  Typical symptoms include registers 0x00-0xff
responding properly but all other registers returning the same value
(0x13 and 0x5 have been observed).  This state will cause proper detection of
'885 vs. '887 vs. '888 to fail and the chip won't respond to get configured
properly anyway.  I have no method of reseting the core to a working state at
this time; but I didn't try too hard to work one out either.  The problem
likely only occurs in development.  I suspect configuring the SYS PLL VCO to
oscillate too slowly (286.3 MHz?) before post divide may be the root cause,
when encountered.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13086): cx23885: Add skeleton v4l2_subdev for the CX23888 integrated IR...
Andy Walls [Sun, 27 Sep 2009 02:17:30 +0000 (23:17 -0300)]
V4L/DVB (13086): cx23885: Add skeleton v4l2_subdev for the CX23888 integrated IR controller

This change adds a skeletal implementation of a v4l2_subdevice to provide
encapsulation and abstraction of the CX23888's integrated consumer infrared
controller.  This change also instantiates the cx23888_ir subdev for the
HVR-1850 which has IR hardware physically wired up to a CX23888.

The cx23888_ir subdev code is being written with long-term objectives to:
1. port it to the cx25840 module for the CX2584x, CX2583x, CX23885, & CX231xx
   IR controllers
2. possibly port it to the cx18 module for the CX23418 IR controller
3. have the IR subdevice accessed abstractly in the cx23885 module, so the
   driver can ignore the difference between the CX23885 and CX23888.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13085): cx23885: Fix support for v4l2-dbg access to CX2388[578] and CX23417...
Andy Walls [Sun, 27 Sep 2009 01:50:44 +0000 (22:50 -0300)]
V4L/DVB (13085): cx23885: Fix support for v4l2-dbg access to CX2388[578] and CX23417 regs

This changes corrects the ioctl() operations for both the CX2388[578] analog
video and MPEG video device nodes to properly and consistently support
VIDIOC_G_CHIP_IDENT, VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER ioctl()s.

This caused some ioctl() support routines to be broken out into a separate
source file.

Now v4l2-dbg can be used to manipulate CX2388[578] and CX23417 registers
including the CX2388[57] functions handled by the cx25840 module.

This was done in anticipation of developing a new v4l2_subdev for the
integrated IR controller of the CX23888.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13084): v4l2-chip-ident: Add ID's needed for the cx23885 and cx25840 modules
Andy Walls [Sun, 27 Sep 2009 01:07:10 +0000 (22:07 -0300)]
V4L/DVB (13084): v4l2-chip-ident: Add ID's needed for the cx23885 and cx25840 modules

Add identifiers for CX2388[578] chips, CX2310[012] chips, integrated
A/V decoders cores, integrated IR controller core, and the CX23417
MPEG encoder.  The cx23885 module and cx25840 module will use these
identifiers in upcoming changes.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13082): em28xx: remove "not validated" status from Terratec Cinergy T XS...
Devin Heitmueller [Thu, 1 Oct 2009 02:10:17 +0000 (23:10 -0300)]
V4L/DVB (13082): em28xx: remove "not validated" status from Terratec Cinergy T XS (005e)

The board support has been validated by the user, so get rid of the warning
that shows up on board load.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13081): saa7134: use the #define for the xc5000 radio_input field
Devin Heitmueller [Thu, 1 Oct 2009 02:04:39 +0000 (23:04 -0300)]
V4L/DVB (13081): saa7134: use the #define for the xc5000 radio_input field

Dmitri's patch for the Behold X7 didn't use the #define I had setup for
XC5000_RADIO_FM1, so cut over to using that instead of "1".

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13080): saa7134: add support for the digital side of the Behold X7
Beholder Intl. Ltd. Dmitry Belimov [Thu, 1 Oct 2009 02:02:21 +0000 (23:02 -0300)]
V4L/DVB (13080): saa7134: add support for the digital side of the Behold X7

Add support for the digital side of the Behold X7

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13078): em28xx: fix support for Terratec Cinergy T XS (005e)
Uroš Vampl [Thu, 1 Oct 2009 01:53:37 +0000 (22:53 -0300)]
V4L/DVB (13078): em28xx: fix support for Terratec Cinergy T XS (005e)

Make analog audio, dvb and the remote work on a Terratec Cinergy Hybrid
XS (em2882).

Note by djh: Thanks go out fo Andrej Suligoi for his contribution in providing
and testing pretty much the exact same patch as provided by Uros.  Between
the two of them, they got all the core functionality working for the device.

Cc: Andrej Suligoi <suligoi@gmail.com>
Signed-off-by: Uroš Vampl <mobile.leecher@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13077): em28xx: Add support for new variant of KWorld 2800d
Devin Heitmueller [Thu, 1 Oct 2009 01:44:19 +0000 (22:44 -0300)]
V4L/DVB (13077): em28xx: Add support for new variant of KWorld 2800d

Seems that the reference design used for the KWorld 2800d switched from the
em2860 to em2862, so we need to add the new USB id (and the i2c hash remains
so all we need is the default em2862 id.

Thanks to Ian Young for reporting the issue and testing the fix.

Cc: Ian Young <ian@duffrecords.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13076): xc5000: make the definition of the FM input part of the xc5000 confi...
Devin Heitmueller [Thu, 24 Sep 2009 16:27:24 +0000 (13:27 -0300)]
V4L/DVB (13076): xc5000: make the definition of the FM input part of the xc5000 config struct

Remove hard-coded definition of the xc5000 FM radio input, making it a
parameter passed in when doing the attach call.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13075): xc5000: add FM radio support
Beholder Intl. Ltd. Dmitry Belimov [Thu, 24 Sep 2009 16:13:28 +0000 (13:13 -0300)]
V4L/DVB (13075): xc5000: add FM radio support

Add FM radio for the xc5000 silicon tuner chip.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13073): radio-mr800: set radio frequency only upon success
David Ellingsworth [Wed, 23 Sep 2009 21:31:26 +0000 (18:31 -0300)]
V4L/DVB (13073): radio-mr800: set radio frequency only upon success

Set radio frequency only upon success.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13072): radio-mr800: simplify device warnings
David Ellingsworth [Wed, 23 Sep 2009 21:28:02 +0000 (18:28 -0300)]
V4L/DVB (13072): radio-mr800: simplify device warnings

Simplify device warnings.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13071): radio-mr800: preserve radio state during suspend/resume
David Ellingsworth [Wed, 23 Sep 2009 21:24:47 +0000 (18:24 -0300)]
V4L/DVB (13071): radio-mr800: preserve radio state during suspend/resume

Preserve radio state during suspend/resume.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13070): radio-mr800: fix behavior of set_stereo function
David Ellingsworth [Wed, 23 Sep 2009 21:16:38 +0000 (18:16 -0300)]
V4L/DVB (13070): radio-mr800: fix behavior of set_stereo function

Fix behavior of set_stereo function.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13069): radio-mr800: ensure the radio is initialized to a consistent state
David Ellingsworth [Wed, 23 Sep 2009 21:13:50 +0000 (18:13 -0300)]
V4L/DVB (13069): radio-mr800: ensure the radio is initialized to a consistent state

Ensure the radio is initialized to a consistent state.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13068): radio-mr800: remove device initialization from open/close
David Ellingsworth [Wed, 23 Sep 2009 21:09:01 +0000 (18:09 -0300)]
V4L/DVB (13068): radio-mr800: remove device initialization from open/close

Remove device initialization from open/close.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13067): radio-mr800: fix potential use after free
David Ellingsworth [Wed, 23 Sep 2009 21:03:52 +0000 (18:03 -0300)]
V4L/DVB (13067): radio-mr800: fix potential use after free

Fix portential use after free.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13066): radio-mr800: remove device removed indicator
David Ellingsworth [Wed, 23 Sep 2009 20:52:17 +0000 (17:52 -0300)]
V4L/DVB (13066): radio-mr800: remove device removed indicator

Remove device removed indicator

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13065): radio-mr800: simplify locking in ioctl callbacks
David Ellingsworth [Wed, 23 Sep 2009 20:49:36 +0000 (17:49 -0300)]
V4L/DVB (13065): radio-mr800: simplify locking in ioctl callbacks

Simplify locking in ioctl callbacks.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13064): radio-mr800: simplify access to amradio_device
David Ellingsworth [Wed, 23 Sep 2009 20:45:31 +0000 (17:45 -0300)]
V4L/DVB (13064): radio-mr800: simplify access to amradio_device

Simplify access to amradio_device.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13063): radio-mr800: remove unnecessary local variable
David Ellingsworth [Wed, 23 Sep 2009 00:48:43 +0000 (21:48 -0300)]
V4L/DVB (13063): radio-mr800: remove unnecessary local variable

Remove unnecessary local variable.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13062): radio-mr800: simplify error paths in usb probe callback
David Ellingsworth [Wed, 23 Sep 2009 00:43:19 +0000 (21:43 -0300)]
V4L/DVB (13062): radio-mr800: simplify error paths in usb probe callback

Simplify error paths in usb probe callback.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13061): radio-mr800: simplify video_device allocation
David Ellingsworth [Wed, 23 Sep 2009 00:37:30 +0000 (21:37 -0300)]
V4L/DVB (13061): radio-mr800: simplify video_device allocation

simplify video_device allocation

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13060): radio-mr800: implement proper locking
David Ellingsworth [Wed, 23 Sep 2009 00:22:19 +0000 (21:22 -0300)]
V4L/DVB (13060): radio-mr800: implement proper locking

Implement proper locking

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13058): af9015: enable remote polling when eeprom contains 0x04
Antti Palosaari [Tue, 22 Sep 2009 00:26:37 +0000 (21:26 -0300)]
V4L/DVB (13058): af9015: enable remote polling when eeprom contains 0x04

Looks like eeprom IR mode byte value 0x04 means there is remote
which should be polled. Patch enables polling also in case of 0x04.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13057): af9015: add MSI DIGIVOX mini III remote
Antti Palosaari [Mon, 21 Sep 2009 23:52:44 +0000 (20:52 -0300)]
V4L/DVB (13057): af9015: add MSI DIGIVOX mini III remote

Support for MSI DIGIVOX mini III remote.
Thanks to Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Thanks to Roman <lists@hasnoname.de>

Cc: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Cc: Roman <lists@hasnoname.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13056): af9015: add LeadTek Y04G0051 remote buttons
Antti Palosaari [Mon, 21 Sep 2009 21:56:12 +0000 (18:56 -0300)]
V4L/DVB (13056): af9015: add LeadTek Y04G0051 remote buttons

Add missing LeadTek Y04G0051 remote buttons.
Thanks to Matthew Skinner <matt@pcmus.com>

Cc: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13055): af9015: fix few typos
Antti Palosaari [Wed, 16 Sep 2009 23:33:03 +0000 (20:33 -0300)]
V4L/DVB (13055): af9015: fix few typos

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13054): af9015: add USB ID for KWorld PlusTV DVB-T PCI Pro Card (DVB-T PC160-T)
Antti Palosaari [Fri, 18 Sep 2009 16:37:57 +0000 (13:37 -0300)]
V4L/DVB (13054): af9015: add USB ID for KWorld PlusTV DVB-T PCI Pro Card (DVB-T PC160-T)

Add USB ID 1b80:c161 for KWorld PlusTV DVB-T PCI Pro Card (DVB-T PC160-T).
Thanks to Andrew Cruickshank <atcrank@gmail.com> for reporting this.

Cc: Andrew Cruickshank <atcrank@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13052): DiB0700: EvolutePC TvWay+ USB ISDB-Tb fullseg device support
S?rgio Fortier [Mon, 28 Sep 2009 07:19:21 +0000 (04:19 -0300)]
V4L/DVB (13052): DiB0700: EvolutePC TvWay+ USB ISDB-Tb fullseg device support

Patch for EvolutePC TvWay+ USB ISDB-Tb fullseg device support.

Signed-off-by: S?rgio C Fortier <sergiofortier@yahoo.com.br>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13051): DiB7000P: improve rebostness of HAS_LOCK indicator
Olivier Grenie [Wed, 23 Sep 2009 16:41:27 +0000 (13:41 -0300)]
V4L/DVB (13051): DiB7000P: improve rebostness of HAS_LOCK indicator

Update the dib7000p:
The status is HAS_LOCK only if the demod is able to decode the TPS. Sometimes, there is a TPS data lock, even if the demod is not able to decode it (ex: no RF signal).
For the STK7770P: correct value for the charge pump

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13049): dib8000: SNR in 10th of dB
Olivier Grenie [Fri, 18 Sep 2009 07:08:43 +0000 (04:08 -0300)]
V4L/DVB (13049): dib8000: SNR in 10th of dB

dib7000p/dib8000: added pid filtering

dib8000: the SNR is in 10th of dB (not in dB)
dib7000p and dib8000: added the pid filtering. This feature is enabled by module option (dvb-usb module).

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13045): Fix debug messaging for stv0900 demod.
Igor M. Liplianin [Sat, 19 Sep 2009 11:37:40 +0000 (08:37 -0300)]
V4L/DVB (13045): Fix debug messaging for stv0900 demod.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13044): dib0700: Be less verbose when an IR key is pressed
Mauro Carvalho Chehab [Sat, 26 Sep 2009 16:45:03 +0000 (13:45 -0300)]
V4L/DVB (13044): dib0700: Be less verbose when an IR key is pressed

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13043): Add support for Pixelview SBTVD IR
Mauro Carvalho Chehab [Sat, 26 Sep 2009 16:31:31 +0000 (13:31 -0300)]
V4L/DVB (13043): Add support for Pixelview SBTVD IR

This IR uses NEC protocol. In order to use, dvb_usb_dib0700_ir_proto=0
should be used.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13042): Add NEC protocol to firmware v1.2 handler
Mauro Carvalho Chehab [Sat, 26 Sep 2009 16:29:35 +0000 (13:29 -0300)]
V4L/DVB (13042): Add NEC protocol to firmware v1.2 handler

Currently, dvb_usb_dib0700_ir_proto is supported only with firmwares
older than 1.2. Adds support for it also with the newer firmware.

This is needed in order to support PixelView SBTVD IR.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13040): V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV9640...
Marek Vasut [Wed, 23 Sep 2009 07:59:24 +0000 (04:59 -0300)]
V4L/DVB (13040): V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV9640 sensor

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoMerge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 17:53:36 +0000 (09:53 -0800)]
Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (40 commits)
  tracing: Separate raw syscall from syscall tracer
  ring-buffer-benchmark: Add parameters to set produce/consumer priorities
  tracing, function tracer: Clean up strstrip() usage
  ring-buffer benchmark: Run producer/consumer threads at nice +19
  tracing: Remove the stale include/trace/power.h
  tracing: Only print objcopy version warning once from recordmcount
  tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
  ring-buffer: Move access to commit_page up into function used
  tracing: do not disable interrupts for trace_clock_local
  ring-buffer: Add multiple iterations between benchmark timestamps
  kprobes: Sanitize struct kretprobe_instance allocations
  tracing: Fix to use __always_unused attribute
  compiler: Introduce __always_unused
  tracing: Exit with error if a weak function is used in recordmcount.pl
  tracing: Move conditional into update_funcs() in recordmcount.pl
  tracing: Add regex for weak functions in recordmcount.pl
  tracing: Move mcount section search to front of loop in recordmcount.pl
  tracing: Fix objcopy revision check in recordmcount.pl
  tracing: Check absolute path of input file in recordmcount.pl
  tracing: Correct the check for number of arguments in recordmcount.pl
  ...

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 17:53:21 +0000 (09:53 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing: Fix trace_marker output
  tracing: Fix event format export
  tracing: Fix return value of tracing_stats_read()

14 years agoMerge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Dec 2009 17:53:08 +0000 (09:53 -0800)]
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Fix spurious irq seqfile conversion
  genirq: switch /proc/irq/*/spurious to seq_file
  irq: Do not attempt to create subdirectories if /proc/irq/<irq> failed
  irq: Remove unused debug_poll_all_shared_irqs()
  irq: Fix docbook comments
  irq: trivial: Fix typo in comment for #endif

14 years agoMerge branch 'core-softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 17:52:46 +0000 (09:52 -0800)]
Merge branch 'core-softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  softlockup: Fix hung_task_check_count sysctl

14 years agoMerge branch 'core-signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 17:52:33 +0000 (09:52 -0800)]
Merge branch 'core-signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  signal: Print warning message when dropping signals
  signal: Fix alternate signal stack check

14 years agoMerge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Dec 2009 17:52:14 +0000 (09:52 -0800)]
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
  rcu: Make RCU's CPU-stall detector be default
  rcu: Add expedited grace-period support for preemptible RCU
  rcu: Enable fourth level of TREE_RCU hierarchy
  rcu: Rename "quiet" functions
  rcu: Re-arrange code to reduce #ifdef pain
  rcu: Eliminate unneeded function wrapping
  rcu: Fix grace-period-stall bug on large systems with CPU hotplug
  rcu: Eliminate __rcu_pending() false positives
  rcu: Further cleanups of use of lastcomp
  rcu: Simplify association of forced quiescent states with grace periods
  rcu: Accelerate callback processing on CPUs not detecting GP end
  rcu: Mark init-time-only rcu_bootup_announce() as __init
  rcu: Simplify association of quiescent states with grace periods
  rcu: Rename dynticks_completed to completed_fqs
  rcu: Enable synchronize_sched_expedited() fastpath
  rcu: Remove inline from forward-referenced functions
  rcu: Fix note_new_gpnum() uses of ->gpnum
  rcu: Fix synchronization for rcu_process_gp_end() uses of ->completed counter
  rcu: Prepare for synchronization fixes: clean up for non-NO_HZ handling of ->completed counter
  rcu: Cleanup: balance rcu_irq_enter()/rcu_irq_exit() calls
  ...

14 years agoMerge branch 'core-printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 17:50:22 +0000 (09:50 -0800)]
Merge branch 'core-printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ratelimit: Make suppressed output messages more useful
  printk: Remove ratelimit.h from kernel.h
  ratelimit: Fix/allow use in atomic contexts
  ratelimit: Use per ratelimit context locking

14 years agoMerge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 17:49:59 +0000 (09:49 -0800)]
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  mutex: Fix missing conditions to build mutex_spin_on_owner()
  mutex: Better control mutex adaptive spinning config
  locking, task_struct: Reduce size on TRACE_IRQFLAGS and 64bit
  locking: Use __[SPIN|RW]_LOCK_UNLOCKED in [spin|rw]_lock_init()
  locking: Remove unused prototype
  locking: Reduce ifdefs in kernel/spinlock.c
  locking: Make inlining decision Kconfig based

14 years agoMerge branch 'core-ipi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Dec 2009 17:49:46 +0000 (09:49 -0800)]
Merge branch 'core-ipi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-ipi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  generic-ipi: Add smp_call_function_any()
  generic-ipi: Fix misleading smp_call_function*() description

14 years agoMerge branch 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Dec 2009 17:49:07 +0000 (09:49 -0800)]
Merge branch 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (63 commits)
  x86, Calgary IOMMU quirk: Find nearest matching Calgary while walking up the PCI tree
  x86/amd-iommu: Remove amd_iommu_pd_table
  x86/amd-iommu: Move reset_iommu_command_buffer out of locked code
  x86/amd-iommu: Cleanup DTE flushing code
  x86/amd-iommu: Introduce iommu_flush_device() function
  x86/amd-iommu: Cleanup attach/detach_device code
  x86/amd-iommu: Keep devices per domain in a list
  x86/amd-iommu: Add device bind reference counting
  x86/amd-iommu: Use dev->arch->iommu to store iommu related information
  x86/amd-iommu: Remove support for domain sharing
  x86/amd-iommu: Rearrange dma_ops related functions
  x86/amd-iommu: Move some pte allocation functions in the right section
  x86/amd-iommu: Remove iommu parameter from dma_ops_domain_alloc
  x86/amd-iommu: Use get_device_id and check_device where appropriate
  x86/amd-iommu: Move find_protection_domain to helper functions
  x86/amd-iommu: Simplify get_device_resources()
  x86/amd-iommu: Let domain_for_device handle aliases
  x86/amd-iommu: Remove iommu specific handling from dma_ops path
  x86/amd-iommu: Remove iommu parameter from __(un)map_single
  x86/amd-iommu: Make alloc_new_range aware of multiple IOMMUs
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
Linus Torvalds [Sat, 5 Dec 2009 17:47:17 +0000 (09:47 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (31 commits)
  GFS2: Fix glock refcount issues
  writeback: remove unused nonblocking and congestion checks (gfs2)
  GFS2: drop rindex glock to refresh rindex list
  GFS2: Tag all metadata with jid
  GFS2: Locking order fix in gfs2_check_blk_state
  GFS2: Remove dirent_first() function
  GFS2: Display nobarrier option in /proc/mounts
  GFS2: add barrier/nobarrier mount options
  GFS2: remove division from new statfs code
  GFS2: Improve statfs and quota usability
  GFS2: Use dquot_send_warning()
  VFS: Export dquot_send_warning
  GFS2: Add set_xquota support
  GFS2: Add get_xquota support
  GFS2: Clean up gfs2_adjust_quota() and do_glock()
  GFS2: Remove constant argument from qd_get()
  GFS2: Remove constant argument from qdsb_get()
  GFS2: Add proper error reporting to quota sync via sysfs
  GFS2: Add get_xstate quota function
  GFS2: Remove obsolete code in quota.c
  ...

14 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security...
Linus Torvalds [Sat, 5 Dec 2009 17:44:57 +0000 (09:44 -0800)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (30 commits)
  TOMOYO: Add recursive directory matching operator support.
  remove CONFIG_SECURITY_FILE_CAPABILITIES compile option
  SELinux: print denials for buggy kernel with unknown perms
  Silence the existing API for capability version compatibility check.
  LSM: Move security_path_chmod()/security_path_chown() to after mutex_lock().
  SELinux: header generation may hit infinite loop
  selinux: Fix warnings
  security: report the module name to security_module_request
  Config option to set a default LSM
  sysctl: require CAP_SYS_RAWIO to set mmap_min_addr
  tpm: autoload tpm_tis based on system PnP IDs
  tpm_tis: TPM_STS_DATA_EXPECT workaround
  define convenient securebits masks for prctl users (v2)
  tpm: fix header for modular build
  tomoyo: improve hash bucket dispersion
  tpm add default function definitions
  LSM: imbed ima calls in the security hooks
  SELinux: add .gitignore files for dynamic classes
  security: remove root_plug
  SELinux: fix locking issue introduced with c6d3aaa4e35c71a3
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
Linus Torvalds [Sat, 5 Dec 2009 17:42:59 +0000 (09:42 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (50 commits)
  pcmcia: rework the irq_req_t typedef
  pcmcia: remove deprecated handle_to_dev() macro
  pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer
  pcmcia: remove unused "window_t" typedef
  pcmcia: move some window-related code to pcmcia_ioctl.c
  pcmcia: Change window_handle_t logic to unsigned long
  pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()
  pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()
  pcmcia: Pass struct pcmcia_device to pcmcia_release_window()
  drivers/pcmcia: remove unnecessary kzalloc
  pcmcia: correct handling for Zoomed Video registers in topic.h
  pcmcia: fix printk formats
  pcmcia: autoload module pcmcia
  pcmcia/staging: update comedi drivers
  PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket
  PCMCIA: ss: allow PCI IRQs > 255
  PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket
  PCMCIA: soc_common: constify soc_pcmcia_socket ops member
  PCMCIA: sa1111: remove duplicated initializers
  PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data
  ...

14 years agoavr32: Convert BUG() to use unreachable()
David Daney [Sat, 5 Dec 2009 01:44:54 +0000 (17:44 -0800)]
avr32: Convert BUG() to use unreachable()

Use the new unreachable() macro instead of for(;;);

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agos390: Convert BUG() to use unreachable()
David Daney [Sat, 5 Dec 2009 01:44:53 +0000 (17:44 -0800)]
s390: Convert BUG() to use unreachable()

Use the new unreachable() macro instead of for(;;);

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
CC: linux390@de.ibm.com
CC: linux-s390@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMIPS: Convert BUG() to use unreachable()
David Daney [Sat, 5 Dec 2009 01:44:52 +0000 (17:44 -0800)]
MIPS: Convert BUG() to use unreachable()

Use the new unreachable() macro instead of while(1);

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
CC: linux-mips@linux-mips.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86: Convert BUG() to use unreachable()
David Daney [Sat, 5 Dec 2009 01:44:51 +0000 (17:44 -0800)]
x86: Convert BUG() to use unreachable()

Use the new unreachable() macro instead of for(;;);.  When
allyesconfig is built with a GCC-4.5 snapshot on i686 the size of the
text segment is reduced by 3987 bytes (from 6827019 to 6823032).

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: x86@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoAdd support for GCC-4.5's __builtin_unreachable() to compiler.h (v2)
David Daney [Sat, 5 Dec 2009 01:44:50 +0000 (17:44 -0800)]
Add support for GCC-4.5's __builtin_unreachable() to compiler.h (v2)

Starting with version 4.5, GCC has a new built-in function
__builtin_unreachable() that can be used in places like the kernel's
BUG() where inline assembly is used to transfer control flow.  This
eliminated the need for an endless loop in these places.

The patch adds a new macro 'unreachable()' that will expand to either
__builtin_unreachable() or an endless loop depending on the compiler
version.

Change from v1: Simplify unreachable() for non-GCC 4.5 case.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoGFS2: Fix glock refcount issues
Steven Whitehouse [Fri, 27 Nov 2009 10:31:11 +0000 (10:31 +0000)]
GFS2: Fix glock refcount issues

This patch fixes some ref counting issues. Firstly by moving
the point at which we drop the ref count after a dlm lock
operation has completed we ensure that we never call
gfs2_glock_hold() on a lock with a zero ref count.

Secondly, by using atomic_dec_and_lock() in gfs2_glock_put()
we ensure that at no time will a glock with zero ref count
appear on the lru_list. That means that we can remove the
check for this in our shrinker (which was racy).

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agowriteback: remove unused nonblocking and congestion checks (gfs2)
Wu Fengguang [Wed, 18 Nov 2009 10:09:41 +0000 (18:09 +0800)]
writeback: remove unused nonblocking and congestion checks (gfs2)

No one is calling wb_writeback and write_cache_pages with
wbc.nonblocking=1 any more. And lumpy pageout will want to do
nonblocking writeback without the congestion wait.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: drop rindex glock to refresh rindex list
Benjamin Marzinski [Tue, 10 Nov 2009 18:54:56 +0000 (12:54 -0600)]
GFS2: drop rindex glock to refresh rindex list

When a gfs2 filesystem is grown, it needs to rebuild the rindex list to be able
to use the new space.  gfs2 does this when the rindex is marked not uptodate,
which happens when the rindex glock is dropped.  However, on a single node
setup, there is never any reason to drop the rindex glock, so gfs2 never
invalidates the the rindex. This patch makes gfs2 automatically drop the
rindex glock after filesystem grows, so it can refresh the rindex list.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Tag all metadata with jid
Steven Whitehouse [Fri, 6 Nov 2009 16:20:51 +0000 (16:20 +0000)]
GFS2: Tag all metadata with jid

There are two spare field in the header common to all GFS2
metadata. One is just the right size to fit a journal id
in it, and this patch updates the journal code so that each
time a metadata block is modified, we tag it with the journal
id of the node which is performing the modification.

The reason for this is that it should make it much easier to
debug issues which arise if we can tell which node was the
last to modify a particular metadata block.

Since the field is updated before the block is written into
the journal, each journal should only contain metadata which
is tagged with its own journal id. The one exception to this
is the journal header block, which might have a different node's
id in it, if that journal was recovered by another node in the
cluster.

Thus each journal will contain a record of which nodes recovered
it, via the journal header.

The other field in the metadata header could potentially be
used to hold information about what kind of operation was
performed, but for the time being we just zero it on each
transaction so that if we use it for that in future, we'll
know that the information (where it exists) is reliable.

I did consider using the other field to hold the journal
sequence number, however since in GFS2's journaling we write
the modified data into the journal and not the original
data, this gives no information as to what action caused the
modification, so I think we can probably come up with a better
use for those 64 bits in the future.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Locking order fix in gfs2_check_blk_state
Steven Whitehouse [Fri, 6 Nov 2009 11:10:51 +0000 (11:10 +0000)]
GFS2: Locking order fix in gfs2_check_blk_state

In some cases we already have the rindex lock when
we enter this function.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Remove dirent_first() function
Steven Whitehouse [Fri, 6 Nov 2009 11:06:37 +0000 (11:06 +0000)]
GFS2: Remove dirent_first() function

This function only had one caller left, and that caller only
called it for leaf blocks, hence one branch of the "if" was
never taken. In addition the call to get_left had already
verified the metadata type, so the function can be reduced
to a single line of code in its caller.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Display nobarrier option in /proc/mounts
Steven Whitehouse [Fri, 30 Oct 2009 10:48:53 +0000 (10:48 +0000)]
GFS2: Display nobarrier option in /proc/mounts

Since the default is barriers on, this only displays the
nobarrier option when that is active.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: add barrier/nobarrier mount options
Christoph Hellwig [Fri, 30 Oct 2009 07:03:27 +0000 (08:03 +0100)]
GFS2: add barrier/nobarrier mount options

Currently gfs2 issues barrier unconditionally.  There are various reasons
to disable them, be that just for testing or for stupid devices flushing
large battert backed caches.  Add a nobarrier option that matches xfs and
btrfs for this.  Also add a symmetric barrier option to turn it back on
at remount time.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: remove division from new statfs code
Benjamin Marzinski [Mon, 26 Oct 2009 18:29:47 +0000 (13:29 -0500)]
GFS2: remove division from new statfs code

It's not necessary to do any 64bit division for the statfs sync code, so
remove it.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Improve statfs and quota usability
Benjamin Marzinski [Tue, 20 Oct 2009 07:39:44 +0000 (02:39 -0500)]
GFS2: Improve statfs and quota usability

GFS2 now has three new mount options, statfs_quantum, quota_quantum and
statfs_percent.  statfs_quantum and quota_quantum simply allow you to
set the tunables of the same name.  Setting setting statfs_quantum to 0
will also turn on the statfs_slow tunable.  statfs_percent accepts an
integer between 0 and 100.  Numbers between 1 and 100 will cause GFS2 to
do any early sync when the local number of blocks free changes by at
least statfs_percent from the totoal number of blocks free.  Setting
statfs_percent to 0 disables this.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Use dquot_send_warning()
Steven Whitehouse [Mon, 28 Sep 2009 11:49:15 +0000 (12:49 +0100)]
GFS2: Use dquot_send_warning()

This adds support to GFS2 to send quota warnings via netlink.
Also it removes a stray \r which was left over from when the
code used to print warnings on the console.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoVFS: Export dquot_send_warning
Steven Whitehouse [Mon, 28 Sep 2009 11:35:17 +0000 (12:35 +0100)]
VFS: Export dquot_send_warning

Sending a message to userspace in a generic format to warn
of events (e.g. quota exceeded) in the quota subsystem is
a generically useful feature. This patch makes some minor
changes to the send_message function from dquot.c renaming
it quota_send_message, moving it to quota.c and exporting it
for use by filesystems which do not use the dquot code.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Add set_xquota support
Steven Whitehouse [Wed, 23 Sep 2009 12:50:49 +0000 (13:50 +0100)]
GFS2: Add set_xquota support

This patch adds the ability to set GFS2 quota limit and
warning levels via the XFS quota API.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Add get_xquota support
Steven Whitehouse [Mon, 28 Sep 2009 10:52:16 +0000 (11:52 +0100)]
GFS2: Add get_xquota support

This adds support for viewing the current GFS2 quota settings
via the XFS quota API. The setting of quotas will be addressed
in a later patch. Fields which are not supported here are left
set to zero.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
14 years agoGFS2: Clean up gfs2_adjust_quota() and do_glock()
Steven Whitehouse [Tue, 15 Sep 2009 19:42:56 +0000 (20:42 +0100)]
GFS2: Clean up gfs2_adjust_quota() and do_glock()

Both of these functions contained confusing and in one case
duplicate code. This patch adds a new check in do_glock()
so that we report -ENOENT if we are asked to sync a quota
entry which doesn't exist. Due to the previous patch this is
now reported correctly to userspace.

Also there are a few new comments, and I hope that the code
is easier to understand now.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Remove constant argument from qd_get()
Steven Whitehouse [Tue, 15 Sep 2009 15:30:38 +0000 (16:30 +0100)]
GFS2: Remove constant argument from qd_get()

This function was only ever called with the "create"
argument set to true, so we can remove it.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Remove constant argument from qdsb_get()
Steven Whitehouse [Tue, 15 Sep 2009 15:25:40 +0000 (16:25 +0100)]
GFS2: Remove constant argument from qdsb_get()

The "create" argument to qdsb_get() was only ever set to true,
so this patch removes that argument.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Add proper error reporting to quota sync via sysfs
Steven Whitehouse [Tue, 15 Sep 2009 15:20:30 +0000 (16:20 +0100)]
GFS2: Add proper error reporting to quota sync via sysfs

For some reason, the errors were not making it to userspace.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Add get_xstate quota function
Steven Whitehouse [Fri, 11 Sep 2009 14:57:27 +0000 (15:57 +0100)]
GFS2: Add get_xstate quota function

This allows querying of the quota state via the XFS quota
API.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Remove obsolete code in quota.c
Steven Whitehouse [Fri, 11 Sep 2009 14:21:56 +0000 (15:21 +0100)]
GFS2: Remove obsolete code in quota.c

There is no point in testing for GLF_DEMOTE here, we might as
well always release the glock at that point.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Hook gfs2_quota_sync into VFS via gfs2_quotactl_ops
Steven Whitehouse [Tue, 15 Sep 2009 08:59:02 +0000 (09:59 +0100)]
GFS2: Hook gfs2_quota_sync into VFS via gfs2_quotactl_ops

The plan is to add further operations to the gfs2_quotactl_ops
in future patches. The sync operation is easy, so we start with
that one.

We plan to use the XFS quota control functions because they more
closely match the GFS2 ones.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Alter arguments of gfs2_quota/statfs_sync
Steven Whitehouse [Fri, 11 Sep 2009 13:36:44 +0000 (14:36 +0100)]
GFS2: Alter arguments of gfs2_quota/statfs_sync

These two functions are altered so that gfs2_quota_sync may
in future be called directly from the VFS. The GFS2 superblock
changes to a VFS super block and there is an addition of an int
argument which is currently ignored.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoVFS: Use GFP_NOFS in posix_acl_from_xattr()
Steven Whitehouse [Tue, 29 Sep 2009 15:31:03 +0000 (16:31 +0100)]
VFS: Use GFP_NOFS in posix_acl_from_xattr()

GFS2 needs to call this from under a glock, so we need GFP_NOFS
and I suspect that other filesystems might require this too.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Add cached ACLs support
Steven Whitehouse [Tue, 29 Sep 2009 15:26:23 +0000 (16:26 +0100)]
GFS2: Add cached ACLs support

The other patches in this series have been building towards
being able to support cached ACLs like other filesystems. The
only real difference with GFS2 is that we have to invalidate
the cache when we drop a glock, but that is dealt with in earlier
patches.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Clean up ACLs
Steven Whitehouse [Fri, 2 Oct 2009 11:00:00 +0000 (12:00 +0100)]
GFS2: Clean up ACLs

To prepare for support for caching of ACLs, this cleans up the GFS2
ACL support by pushing the xattr code back into xattr.c and changing
the acl_get function into one which only returns ACLs so that we
can drop the caching function into it shortly.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Use gfs2_set_mode() instead of munge_mode()
Steven Whitehouse [Tue, 29 Sep 2009 11:40:19 +0000 (12:40 +0100)]
GFS2: Use gfs2_set_mode() instead of munge_mode()

These two functions do the same thing, so lets only use
one of them.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoGFS2: Use forget_all_cached_acls()
Steven Whitehouse [Fri, 2 Oct 2009 10:54:39 +0000 (11:54 +0100)]
GFS2: Use forget_all_cached_acls()

Invalidate all the cached ACLs when we drop the glock.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agoVFS: Add forget_all_cached_acls()
Steven Whitehouse [Tue, 29 Sep 2009 11:27:23 +0000 (12:27 +0100)]
VFS: Add forget_all_cached_acls()

This is required for cluster filesystems which want to use
cached ACLs so that they can invalidate the cache when
required.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Alexander Viro <aviro@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
14 years agoGFS2: Fix up system xattrs
Steven Whitehouse [Fri, 2 Oct 2009 10:50:54 +0000 (11:50 +0100)]
GFS2: Fix up system xattrs

This code has been shamelessly stolen from XFS at the suggestion
of Christoph Hellwig. I've not added support for cached ACLs so
far... watch for that in a later patch, although this is designed
in such a way that they should be easy to add.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
14 years agoGFS2: Fix -o meta mounts for subsequent mounts (i.e. all but the first one)
Steven Whitehouse [Mon, 28 Sep 2009 09:30:49 +0000 (10:30 +0100)]
GFS2: Fix -o meta mounts for subsequent mounts (i.e. all but the first one)

We have a long term plan to use the "-o meta" flag to GFS2 mounts to
access the alternate root which is used to store metadata for a GFS2
filesystem. This will allow us to eventually remove support for the
gfs2meta filesystem type (which is in any case just a "front end" to
the gfs2 filesystem type with the meta/master root).

Currently the "-o meta" option is only taken into account on the
initial mount of the filesystem. Subsequent mounts of the same
filesystem (i.e. on the same device) result in basically the same
as bind mounting the root of the original mount.

This patch changes that by using what is more or less a copy
of get_sb_bdev() and extending it so that it will take into
account the alternate root in all cases. The main difference
is that we have to parse the mount options a bit earlier. We can
then use them to select the appropriate root towards the end of
the function.

In addition this also fixes a bug where it was possible (but certainly
not desirable) to set different ro/rw options for the meta root
when mounted via the gfs2meta fs compared with the original mount.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Alexander Viro <aviro@redhat.com>
14 years agoGFS2: Fix potential race in glock code
Steven Whitehouse [Tue, 22 Sep 2009 09:56:16 +0000 (10:56 +0100)]
GFS2: Fix potential race in glock code

We need to be careful of the ordering between clearing the
GLF_LOCK bit and scheduling the workqueue.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
14 years agomutex: Fix missing conditions to build mutex_spin_on_owner()
Frederic Weisbecker [Wed, 2 Dec 2009 19:49:17 +0000 (20:49 +0100)]
mutex: Fix missing conditions to build mutex_spin_on_owner()

We don't need to build mutex_spin_on_owner() if we have
CONFIG_DEBUG_MUTEXES or CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES as
it won't be used under such configs.

Use CONFIG_MUTEX_SPIN_ON_OWNER as it gathers all the necessary
checks before building it.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1259783357-8542-2-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
14 years agomutex: Better control mutex adaptive spinning config
Frederic Weisbecker [Wed, 2 Dec 2009 19:49:16 +0000 (20:49 +0100)]
mutex: Better control mutex adaptive spinning config

Introduce CONFIG_MUTEX_SPIN_ON_OWNER so that we can centralize
in a single place the conditions that determine its definition
and use.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1259783357-8542-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
14 years agox86, Calgary IOMMU quirk: Find nearest matching Calgary while walking up the PCI...
Darrick J. Wong [Wed, 2 Dec 2009 23:05:56 +0000 (15:05 -0800)]
x86, Calgary IOMMU quirk: Find nearest matching Calgary while walking up the PCI tree

On a multi-node x3950M2 system, there's a slight oddity in the
PCI device tree for all secondary nodes:

 30:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
  \-33:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
     \-34:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 1078 (rev 04)

...as compared to the primary node:

 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
  \-01:00.0 VGA compatible controller: ATI Technologies Inc ES1000 (rev 02)
 03:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
  \-04:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 1078 (rev 04)

In both nodes, the LSI RAID controller hangs off a CalIOC2
device, but on the secondary nodes, the BIOS hides the VGA
device and substitutes the device tree ending with the disk
controller.

It would seem that Calgary devices don't necessarily appear at
the top of the PCI tree, which means that the current code to
find the Calgary IOMMU that goes with a particular device is
buggy.

Rather than walk all the way to the top of the PCI
device tree and try to match bus number with Calgary descriptor,
the code needs to examine each parent of the particular device;
if it encounters a Calgary with a matching bus number, simply
use that.

Otherwise, we BUG() when the bus number of the Calgary doesn't
match the bus number of whatever's at the top of the device tree.

Extra note: This patch appears to work correctly for the x3950
that came before the x3950 M2.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jon D. Mason <jdmason@kudzu.us>
Cc: Corinna Schultz <coschult@us.ibm.com>
Cc: <stable@kernel.org>
LKML-Reference: <20091202230556.GG10295@tux1.beaverton.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>