Dmitry Torokhov [Tue, 16 Dec 2014 04:32:42 +0000 (20:32 -0800)]
Merge branch 'next' into for-linus
Prepare input updates for 3.19.
Fabio Estevam [Sat, 13 Dec 2014 19:02:08 +0000 (11:02 -0800)]
Input: gpio_keys - fix warning regarding uninitialized 'button' variable
Commit
af906faabcf91eb1 ("Input: gpio_keys - fix warning regarding uninitialized
'irq' variable") introduced the following build warning:
drivers/input/keyboard/gpio_keys.c:625:16: warning: 'button' may be used uninitialized in this function [-Wmaybe-uninitialized]
Move the 'button' initialization to a proper location to avoid such warning.
Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Scott Liu [Thu, 20 Nov 2014 01:26:44 +0000 (17:26 -0800)]
Input: add support for Elan eKTH I2C touchscreens
This driver supports Elan eKTH I2C touchscreen controllers. Note that these
are using custom protocol, as opposed to other Elan parts that use
HID-over-I2C and are supported by the standard HID-multitouch driver.
Signed-off-by: Scott Liu <scott.liu@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Mon, 8 Dec 2014 06:42:45 +0000 (22:42 -0800)]
Input: gpio_keys - fix warning regarding uninitialized 'irq' variable
Commit
f2d347ff70be453e ("Input: gpio_keys - add device tree support for
interrupt only keys") caused the following build warning:
drivers/input/keyboard/gpio_keys.c: In function 'gpio_keys_probe':
drivers/input/keyboard/gpio_keys.c:647:15: warning: 'irq' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/input/keyboard/gpio_keys.c:622:7: note: 'irq' was declared here
Move button->irq initialization into proper branch and get rid of the
temporary.
Reported-by: Olof's autobuilder <build@lixom.net>
Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dudley Du [Thu, 4 Dec 2014 15:00:03 +0000 (07:00 -0800)]
Input: cyapa - use 'error' for error codes
Let's use 'error' variable instead of 'ret' when we need to store erro
codes.
Signed-off-by: Dudley Du <dudley.dulixin@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dudley Du [Wed, 3 Dec 2014 23:29:34 +0000 (15:29 -0800)]
Input: cyapa - fix resuming the device
Chage
b1cfa7b4388285c0f0b486f152ab0cb18612c779 tried to get away form using
irq in cyapa structure and use client->irq instead, but missed a couple of
spots making the touchpad inoperative after resume.
Reported-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Dudley Du <dudley.dulixin@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Alexander Stein [Tue, 25 Nov 2014 19:53:45 +0000 (11:53 -0800)]
Input: gpio_keys - add device tree support for interrupt only keys
This features already exists for board config setups. Add support for
device tree based systems.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Geert Uytterhoeven [Wed, 3 Dec 2014 22:59:49 +0000 (14:59 -0800)]
Input: amikbd - allocate temporary keymap buffer on the stack
Allocate the temporary buffer needed for initialization of the console
keyboard maps (512 bytes, as NR_KEYS = 256) on the stack instead of
statically, to reduce kernel size.
add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-512 (-512)
function old new delta
temp_map 512 - -512
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Geert Uytterhoeven [Wed, 3 Dec 2014 22:52:58 +0000 (14:52 -0800)]
Input: amikbd - fix build if !CONFIG_HW_CONSOLE
If CONFIG_HW_CONSOLE is not set:
drivers/built-in.o: In function `amikbd_probe':
amikbd.c:(.init.text+0x3e4e): undefined reference to `key_maps'
amikbd.c:(.init.text+0x3dd4): undefined reference to `key_maps'
To fix this, extract the initialization of the console keyboard maps
into amikbd_init_console_keymaps(), protected by #ifdef
CONFIG_HW_CONSOLE.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dan Carpenter [Wed, 3 Dec 2014 05:55:53 +0000 (21:55 -0800)]
Input: lm8323 - missing error check in lm8323_set_disable()
The missing error handling here is not especially harmful but static
checkers complain that "i" can be used uninitialized.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Aniroop Mathur [Wed, 3 Dec 2014 22:27:42 +0000 (14:27 -0800)]
Input: initialize device counter variables with -1
Let's initialize atomic_t variables keeping track of number of various
devices created so far with -1 in order to avoid extra subtraction
operation.
Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Aniroop Mathur [Tue, 2 Dec 2014 23:22:28 +0000 (15:22 -0800)]
Input: initialize input_no to -1 to avoid subtraction
Let's initializes input_no to -1 in order to avoid extra subtraction
operation performed every time we allocate an input device.
Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Todor Minchev [Tue, 2 Dec 2014 23:16:39 +0000 (15:16 -0800)]
Input: i8042 - do not try to load on Intel NUC D54250WYK
The Intel NUC D54250WYK has no PS/2 controller, however the DSDT declares
PS/2 devices which trigger the loading of the i8042 driver.
Signed-off-by: Todor Minchev <todor.minchev@intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Greg Kroah-Hartman [Tue, 25 Nov 2014 08:38:17 +0000 (00:38 -0800)]
Input: xpad - use proper endpoint type
The xpad wireless endpoint is not a bulk endpoint on my devices, but
rather an interrupt one, so the USB core complains when it is submitted.
I'm guessing that the author really did mean that this should be an
interrupt urb, but as there are a zillion different xpad devices out
there, let's cover out bases and handle both bulk and interrupt
endpoints just as easily.
Signed-off-by: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Thu, 20 Nov 2014 07:33:07 +0000 (23:33 -0800)]
Input: elantech - trust firmware about trackpoint presence
Only try to parse data as coming from trackpoint if firmware told us that
trackpoint is present.
Fixes commit
caeb0d37fa3e387eb0dd22e5d497523c002033d1
Reported-and-tested-by: Marcus Overhagen <marcus.overhagen@gmail.com>
Reported-and-tested-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Stefan Brüns [Mon, 17 Nov 2014 02:16:12 +0000 (18:16 -0800)]
Input: atkbd - correct MSC_SCAN events for force_release keys
Without the change either no scancode would be reported on release of
force_release keys, or - if the key is marked as force_release erroneously
- the release event and the scancode would be reported in separate reports
to the input layer.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ben Sagal [Mon, 17 Nov 2014 01:23:40 +0000 (17:23 -0800)]
Input: synaptics - adjust min/max on Thinkpad E540
The LEN2006 Synaptics touchpad (as found in Thinkpad E540) returns wrong
min max values.
touchpad-edge-detector output:
> Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6
> Move one finger around the touchpad to detect the actual edges
> Kernel says: x [1472..5674], y [1408..4684]
> Touchpad sends: x [1264..5675], y [1171..4688]
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88211
Cc: stable@vger.kernel.org
Signed-off-by: Binyamin Sagal <bensagal@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ulrik De Bie [Fri, 14 Nov 2014 01:48:06 +0000 (17:48 -0800)]
Input: elantech - update the documentation
A chapter is added to describe the trackpoint packets.
A section is added to describe the behaviour of the knob crc_enabled in
sysfs.
The introduction of the documentation only mentioned v1/v2, but in the
last part it already contains explanation of v3 and v4. The introduction
is updated.
Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ulrik De Bie [Fri, 14 Nov 2014 01:47:04 +0000 (17:47 -0800)]
Input: elantech - provide a sysfs knob for crc_enabled
The detection of crc_enabled is known to fail for Fujitsu H730. A DMI
blacklist is added for that, but it can be expected that other laptops will
pop up with this.
Here a sysfs knob is provided to alter the behaviour of crc_enabled.
Writing 0 or 1 to it sets the variable to 0 or 1. Reading it will show the
crc_enabled variable (0 or 1).
Reported-by: Stefan Valouch <stefan@valouch.com>
Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ulrik De Bie [Fri, 14 Nov 2014 01:45:12 +0000 (17:45 -0800)]
Input: elantech - report the middle button of the touchpad
In the past, no elantech was known with 3 touchpad mouse buttons.
Fujitsu H730 is the first known elantech with a middle button. This commit
enables this middle button. For backwards compatibility, the Fujitsu is
detected via DMI, and only for this one 3 buttons will be announced.
Reported-by: Stefan Valouch <stefan@valouch.com>
Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Pali Rohár [Sun, 9 Nov 2014 07:36:09 +0000 (23:36 -0800)]
Input: alps - ignore bad data on Dell Latitudes E6440 and E7440
Sometimes on Dell Latitude laptops psmouse/alps driver receive invalid ALPS
protocol V3 packets with bit7 set in last byte. More often it can be
reproduced on Dell Latitude E6440 or E7440 with closed lid and pushing
cover above touchpad.
If bit7 in last packet byte is set then it is not valid ALPS packet. I was
told that ALPS devices never send these packets. It is not know yet who
send those packets, it could be Dell EC, bug in BIOS and also bug in
touchpad firmware...
With this patch alps driver does not process those invalid packets, but
instead of reporting PSMOUSE_BAD_DATA, getting into out of sync state,
getting back in sync with the next byte and spam dmesg we return
PSMOUSE_FULL_PACKET. If driver is truly out of sync we'll fail the checks
on the next byte and report PSMOUSE_BAD_DATA then.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dudley Du [Sun, 9 Nov 2014 20:36:34 +0000 (12:36 -0800)]
Input: cyapa - switch to using managed resources
Use of managed resources simplifies error handling and device removal code.
Signed-off-by: Dudley Du <dudl@cypress.com>
[Dmitry: added open/close methods so cyapa_remove is no longer needed.]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Chen Gang [Sun, 9 Nov 2014 21:31:11 +0000 (13:31 -0800)]
Input: lifebook - use "static inline" instead of "inline" in lifebook.h
For functions defined in header files we should use static inline rather
than inline, which breaks under the latest upstream gcc (which is really
gcc issue, but static inline is better suited regardless).
The related error (with allmodconfig under tile):
MODPOST 4002 modules
ERROR: "lifebook_detect" [drivers/input/mouse/psmouse.ko] undefined!
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Pali Rohár [Sat, 8 Nov 2014 20:58:57 +0000 (12:58 -0800)]
Input: alps - allow up to 2 invalid packets without resetting device
On some Dell Latitude laptops ALPS device or Dell EC send one invalid byte
in 6 bytes ALPS packet. In this case psmouse driver enter out of sync
state. It looks like that all other bytes in packets are valid and also
device working properly. So there is no need to do full device reset, just
need to wait for byte which match condition for first byte (start of
packet). Because ALPS packets are bigger (6 or 8 bytes) default limit is
small.
This patch increase number of invalid bytes to size of 2 ALPS packets which
psmouse driver can drop before do full reset.
Resetting ALPS devices take some time and when doing reset on some Dell
laptops touchpad, trackstick and also keyboard do not respond. So it is
better to do it only if really necessary.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Pali Rohár [Sat, 8 Nov 2014 20:45:23 +0000 (12:45 -0800)]
Input: alps - ignore potential bare packets when device is out of sync
5th and 6th byte of ALPS trackstick V3 protocol match condition for first
byte of PS/2 3 bytes packet. When driver enters out of sync state and ALPS
trackstick is sending data then driver match 5th, 6th and next 1st bytes as
PS/2.
It basically means if user is using trackstick when driver is in out of
sync state driver will never resync. Processing these bytes as 3 bytes PS/2
data cause total mess (random cursor movements, random clicks) and make
trackstick unusable until psmouse driver decide to do full device reset.
Lot of users reported problems with ALPS devices on Dell Latitude E6440,
E6540 and E7440 laptops. ALPS device or Dell EC for unknown reason send
some invalid ALPS PS/2 bytes which cause driver out of sync. It looks like
that i8042 and psmouse/alps driver always receive group of 6 bytes packets
so there are no missing bytes and no bytes were inserted between valid
ones.
This patch does not fix root of problem with ALPS devices found in Dell
Latitude laptops but it does not allow to process some (invalid)
subsequence of 6 bytes ALPS packets as 3 bytes PS/2 when driver is out of
sync.
So with this patch trackstick input device does not report bogus data when
also driver is out of sync, so trackstick should be usable on those
machines.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ulrik De Bie [Sat, 8 Nov 2014 07:57:34 +0000 (23:57 -0800)]
Input: elantech - fix crc_enabled for Fujitsu H730
The Fujitsu H730 does not work with crc_enabled = 0, even though the
crc_enabled bit in the firmware version indicated it would. When switching
this value to crc_enabled to 1, the touchpad works. This patch uses DMI to
detect H730.
Reported-by: Stefan Valouch <stefan@valouch.com>
Tested-by: Stefan Valouch <stefan@valouch.com>
Tested-by: Alfredo Gemma <alfredo.gemma@gmail.com>
Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Ulrik De Bie [Sat, 8 Nov 2014 07:51:34 +0000 (23:51 -0800)]
Input: elantech - use elantech_report_trackpoint for hardware v4 too
The Fujitsu H730 has hardware v4 with a trackpoint. This enables the
elantech_report_trackpoint for v4.
Reported-by: Stefan Valouch <stefan@valouch.com>
Tested-by: Stefan Valouch <stefan@valouch.com>
Tested-by: Alfredo Gemma <alfredo.gemma@gmail.com>
Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
NeilBrown [Fri, 7 Nov 2014 23:46:56 +0000 (15:46 -0800)]
Input: twl4030-pwrbutton - ensure a wakeup event is recorded.
This button is treated as a wakeup source, so we need to initialise it
correctly.
Without the device_init_wakeup() call, dev->power.wakeup will
be NULL, and pm_wakeup_event() will do nothing.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Takashi Iwai [Thu, 6 Nov 2014 17:27:11 +0000 (09:27 -0800)]
Input: synaptics - add min/max quirk for Lenovo T440s
The new Lenovo T440s laptop has a different PnP ID "LEN0039", and it
needs the similar min/max quirk to make its clickpad working.
BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=903748
Reported-and-tested-by: Joschi Brauchle <joschibrauchle@gmx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Jingoo Han [Sun, 2 Nov 2014 07:04:14 +0000 (00:04 -0700)]
Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resume
Use __maybe_unused instead of ifdef guards around suspend/resume
functions, in order to increase build coverage and fix build warnings.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Jingoo Han [Sun, 2 Nov 2014 07:03:37 +0000 (00:03 -0700)]
Input: mouse - use __maybe_unused instead of ifdef around suspend/resume
Use __maybe_unused instead of ifdef guards around suspend/resume
functions, in order to increase build coverage and fix build warnings.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Jingoo Han [Sun, 2 Nov 2014 07:02:46 +0000 (00:02 -0700)]
Input: misc - use __maybe_unused instead of ifdef around suspend/resume
Use __maybe_unused instead of ifdef guards around suspend/resume
functions, in order to increase build coverage and fix build warnings.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Matt Ranostay [Sat, 1 Nov 2014 03:02:08 +0000 (20:02 -0700)]
Input: cap11xx - support for irq-active-high option
Some applications need to use the irq-active-high push-pull option.
This allows it be enabled in the device tree child node.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Matt Ranostay [Sat, 1 Nov 2014 03:01:37 +0000 (20:01 -0700)]
Input: cap11xx - add support for various cap11xx devices
There are variants of the cap11xx device with a varying number of
capacitance detection channels.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Matt Ranostay [Sat, 1 Nov 2014 03:00:13 +0000 (20:00 -0700)]
Input: rename cap1106 driver to cap11xx
There are several devices in cap11xx family besides cap1106. The driver can
be made to support all of them, so let's give it more generic name.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tobias Klauser [Fri, 31 Oct 2014 16:16:51 +0000 (09:16 -0700)]
Input: altera_ps2 - switch to using managed resources
Use them devm_ managed resources API to simplify error handling in
altera_ps2_probe() and to reduce the size of altera_ps2_remove() and the
ps2if struct.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Bastien Nocera [Fri, 31 Oct 2014 16:26:16 +0000 (09:26 -0700)]
Input: add driver for the Goodix touchpanel
Add a driver for the Goodix touchscreen panel found in Onda v975w tablets.
The driver is based off the Android driver gt9xx.c found in some Android
code dumps, but now bears no resemblance to the original driver.
The driver was tested on the aforementioned tablet.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Fri, 31 Oct 2014 16:35:53 +0000 (09:35 -0700)]
Revert "Input: i8042 - disable active multiplexing by default"
This reverts commit
68da166491655bc54051bf04c78ce648e2e33508.
It turns out that the assertion about scope of regressions due to
always keeping keyboard controller in legacy mode was proven wrong.
There are laptops, such as Clevo W650SH, that only have internal
touchpad (no external PS/2 ports), that require active multiplexing
mode to switch the touchpad (Elantech) into native mode instead of
basic PS/2 emulation.
Reported-by: Roel Aaij <roel.aaij@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tobias Klauser [Fri, 31 Oct 2014 16:16:41 +0000 (09:16 -0700)]
Input: altera_ps2 - use correct type for irq return value
The irq function altera_ps2_rxint returns an irqreturn_t, so use the
same type for variable storing the return value.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tobias Klauser [Fri, 31 Oct 2014 16:16:19 +0000 (09:16 -0700)]
Input: altera_ps2 - write to correct register when disabling interrupts
In altera_ps2_close, the data register (offset 0) is written instead of
the control register (offset 4), leading to the RX interrupt not being
disabled. Fix this by calling writel() with the offset for the proper
register.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Tue, 28 Oct 2014 16:27:58 +0000 (09:27 -0700)]
Input: max77693-haptic - fix potential overflow
Expression haptic->pwm_dev->period * haptic->magnitude is of type
'unsigned int' and may overflow. We need to convert one of the operands
to u64 before multiplying, instead of casting result (potentially
overflown) to u64.
Reported by Coverity: CID
1248753
Acked-by : Jaewon Kim <jaewon02.kim@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Sat, 25 Oct 2014 00:20:27 +0000 (17:20 -0700)]
Input: psmouse - remove unneeded check in psmouse_reconnect()
psmouse_reconnect() will not be called if psmouse driver is not bound to
the serio port, so there is no point in checking that. Also, as coded, it
introduces potential NULL dereference in psmouse_dbg() in case psmouse is
indeed NULL. Let's just remove it.
Detected by Coverity: CID 146528
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Fri, 24 Oct 2014 22:33:53 +0000 (15:33 -0700)]
Input: vsxxxaa - fix code dropping bytes from queue
I believe the intent of the code was to drop oldest bytes from the queue,
not the latest if we drop one byte and both latest and some oldest of we
are dropping more than one.
Acked-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Fri, 24 Oct 2014 22:10:47 +0000 (15:10 -0700)]
Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store()
Coverity pointed out that at return point error is always 0 so the
conditional is not needed.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Fri, 24 Oct 2014 21:27:25 +0000 (14:27 -0700)]
Input: opencores-kbd - fix error handling
When I was adjusting patch in
848d479361793edb79aa68140cb64d4ec9032d88 to
use devm_ioremap_resource() I messed it up.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Eremin-Solenikov [Fri, 24 Oct 2014 22:34:39 +0000 (15:34 -0700)]
Input: wm97xx - adapt parameters to tosa touchscreen.
Sharp SL-6000 (tosa) touchscreen needs wider limits to properly map all
points on the screen. Expand ranges in abs_x and abs_y arrays according
to the touchscreen area.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Hans de Goede [Fri, 24 Oct 2014 21:55:24 +0000 (14:55 -0700)]
Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook AH544
These models need i8042.notimeout, otherwise the touchpad will not work.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=69731
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1111138
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Linus Walleij [Fri, 24 Oct 2014 21:36:54 +0000 (14:36 -0700)]
Input: stmpe-keypad - fix valid key line bitmask
The bitmask comment says it will enable GPIO 8-14 and 16-20 for keypad use,
but it actually enables GPIO 8-11 and 13-20 due to a bit error.
Instead of masking of the "hole" at GPIO 12 (which is used for keypad
output 4) mask of the proper "hole" at GPIO 15.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Alexandre Courbot [Thu, 23 Oct 2014 15:53:13 +0000 (08:53 -0700)]
Input: soc_button_array - update calls to gpiod_get*()
Add the new flags argument to calls of (devm_)gpiod_get*().
Currently both forms (with or without the flags argument) are valid thanks
to transitional macros in <linux/gpio/consumer.h>. These macros will be
removed once all consumers are updated and the flags argument will become
compulsory.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Duson Lin [Fri, 3 Oct 2014 20:24:27 +0000 (13:24 -0700)]
Input: add driver for Elan I2C/SMbus touchpad
This driver supports Elan I2C/SMbus touchpads found in some laptops and
also in many Chromebooks.
Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Pramod Gurav [Wed, 8 Oct 2014 18:26:29 +0000 (11:26 -0700)]
Input: lpc32xx-keys - switch to using managed resources
This change switches to using devm_* managed resources APIs to
request the resources in probe to simplify probe error path and
module unloading.
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Pramod Gurav [Wed, 8 Oct 2014 18:19:43 +0000 (11:19 -0700)]
Input: pxa27x_keypad - switch to using managed resources
This change switches ithe driver to use devm_* APIs to allocate resources.
This helps to simplify failure path in probe function and module unloading
and does away with remove function.
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Pramod Gurav [Wed, 8 Oct 2014 18:14:10 +0000 (11:14 -0700)]
Input: mpr121 - switch to using managed resources
This change switches the driver to use devm_* managed resources APIs to
request the resources in probe to simplify probe error path and module
unloading and does away with remove function.
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tommi Rantala [Thu, 16 Oct 2014 21:02:07 +0000 (14:02 -0700)]
Input: xpad - add Thrustmaster as Xbox 360 controller vendor
Add Thrustmaster as Xbox 360 controller vendor. This is required for
example to make the GP XID (044f:b326) gamepad work.
Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tommi Rantala [Thu, 16 Oct 2014 21:01:43 +0000 (14:01 -0700)]
Input: xpad - add USB ID for Thrustmaster Ferrari 458 Racing Wheel
Add the USB ID for the Xbox 360 Thrustmaster Ferrari 458 Racing Wheel.
Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Jaewon Kim [Thu, 16 Oct 2014 20:56:52 +0000 (13:56 -0700)]
Input: max77693-haptic - fix state check in imax77693_haptic_disable()
The check to see whether the device is already disabled in
max77693_haptic_disable() was inversed, this change corrects it.
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Chang Huaixin [Thu, 16 Oct 2014 20:33:24 +0000 (13:33 -0700)]
Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
xenkbd_disconnect_backend doesn't free grant table entry. This bug affects
live migration.
xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref to handle
grant table entry which doesn't really free an entry.
Thus every time we do xenkbd_resume, grant table entry increses by one. As
an grant table entry occupies 8 bytes, an grant table page has at most 512
entries. Every 512 times we do xenkdb_resume, grant table pages increses by
one.
After around 3500 times of live migration, grant table pages will increase
by 7, causing too many pages to populate and hitting max_pages limit when
assigning pages.Thus assign_pages will fail, so will live migration.
Signed-off-by: Chang Huaixin <huaixin.chx@alibaba-inc.com>
Acked-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Andreas Bosch [Wed, 15 Oct 2014 17:44:50 +0000 (10:44 -0700)]
Input: alps - fix v4 button press recognition
Since the change to struct input_mt_pos some variables are now bitfields
instead of integers. Automatic conversion from integer to bitfield entry
destroys information, therefore enforce boolean interpretation instead.
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1114768
Fixes:
02d04254a5df ("Input: alps - use struct input_mt_pos to track coordinates")
Signed-off-by: Andreas Bosch <linux@progandy.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Sat, 11 Oct 2014 18:41:19 +0000 (11:41 -0700)]
Merge branch 'next' into for-linus
Prepare second round of input updates for 3.18.
Dmitry Torokhov [Fri, 10 Oct 2014 19:19:03 +0000 (12:19 -0700)]
Input: i8042 - disable active multiplexing by default
Active multiplexing is a nice feature as it allows several pointing devices
(such as touchpad and external mouse) use their native protocols at the
same time. Unfortunately many manufacturers do not implement the feature
properly even though they advertise it. The problematic implementations are
never fixed, since Windows by default does not use this mode, and move from
one BIOS/model of laptop to another. When active multiplexing is broken
turning it on usually results in touchpad, keyboard, or both unresponsive.
With PS/2 usage on decline (most of PS/2 devices in use nowadays are
internal laptop touchpads), I expect number of users who have laptops with
working MUX implementation, docking stations with external PS/2 ports, and
who are still using external PS/2 mice, to be rather small. Let's flip the
default to be OFF and allow activating it through i8042.nomux=0 kernel
option. We'll also keep DMI table where we can record known good models.
Acked-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Hans de Goede [Sat, 11 Oct 2014 18:27:37 +0000 (11:27 -0700)]
Input: i8042 - add noloop quirk for Asus X750LN
Without this the aux port does not get detected, and consequently the
touchpad will not work.
https://bugzilla.redhat.com/show_bug.cgi?id=
1110011
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Tue, 2 Sep 2014 16:49:18 +0000 (09:49 -0700)]
Input: synaptics - gate forcepad support by DMI check
Unfortunately, ForcePad capability is not actually exported over PS/2, so
we have to resort to DMI checks.
Cc: stable@vger.kernel.org
Reported-by: Nicole Faerber <nicole.faerber@kernelconcepts.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Sat, 11 Oct 2014 18:34:07 +0000 (11:34 -0700)]
Merge tag 'v3.17' into next
Synchronize with mainline to bring in changes to Synaptics and i8042
drivers.
Christian Gmeiner [Wed, 8 Oct 2014 16:22:54 +0000 (09:22 -0700)]
Input: Add Microchip AR1021 i2c touchscreen
This patch adds support for the ar1021 i2c based touchscreen.
The driver is quite simple and only supports the Touch
Reporting Protocol.
This is the final version for an RFC patch send a while ago.
http://www.spinics.net/lists/linux-input/msg29419.html
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Sjoerd Simons [Wed, 8 Oct 2014 18:38:21 +0000 (11:38 -0700)]
Input: cros_ec_keyb - add of match table
To enable the cros_ec_keyb driver to be auto-loaded when build as
module add an of match table (and export it) to match the modalias
information passed on to userspace as the Cros EC MFD driver registers
the MFD subdevices with an of_compatibility string.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Richard Leitner [Wed, 8 Oct 2014 22:21:32 +0000 (15:21 -0700)]
Input: serio - avoid negative serio device numbers
Fix the format string for serio device name generation to avoid negative
device numbers when the id exceeds the maximum signed integer value.
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Richard Leitner [Wed, 8 Oct 2014 21:24:15 +0000 (14:24 -0700)]
Input: avoid negative input device numbers
Fix the format string for input device name generation to avoid negative
device numbers when the id exceeds the maximum signed integer value.
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Wed, 8 Oct 2014 16:28:32 +0000 (09:28 -0700)]
Input: automatically set EV_ABS bit in input_set_abs_params
Let's automatically set EV_ABS bit in device's event type list when calling
input_set_abs_params() so that drivers do not have to do it explicitly.
These calls are never in a hot paths so we won't lose much time by setting
the same bit several times.
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Pramod Gurav [Tue, 7 Oct 2014 16:33:16 +0000 (09:33 -0700)]
Input: adp5588-keys - cancel workqueue in failure path
In case we start with the device not fully quiesced we should make sure we
cancel the workqueue after freeing interrupt.
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Pramod Gurav [Tue, 7 Oct 2014 16:06:31 +0000 (09:06 -0700)]
Input: opencores-kbd - switch to using managed resources
This change switch to managed resources to simplifies error handling
and module unloading and does away with platform_driver remove function.
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Dmitry Torokhov [Mon, 6 Oct 2014 17:55:49 +0000 (10:55 -0700)]
Input: evdev - fix EVIOCG{type} ioctl
The 'max' size passed into the function is measured in number of bits
(KEY_MAX, LED_MAX, etc) so we need to convert it accordingly before trying
to copy the data out, otherwise we will try copying too much and end up
with up with a page fault.
Reported-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Linus Torvalds [Sun, 5 Oct 2014 19:23:04 +0000 (12:23 -0700)]
Linux 3.17
Linus Torvalds [Sun, 5 Oct 2014 17:16:11 +0000 (10:16 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is a set of two small fixes, both to code which went in during
the merge window: cxgb4i has a scheduling in atomic bug in its new
ipv6 code and uas fails to work properly with the new scsi-mq code"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] uas: disable use of blk-mq I/O path
[SCSI] cxgb4i: avoid holding mutex in interrupt context
Linus Torvalds [Sat, 4 Oct 2014 16:32:47 +0000 (09:32 -0700)]
Merge tag 'tiny/kconfig-for-3.17' of https://git./linux/kernel/git/josh/linux
Pull kconfig fixes for tiny setups from Josh Triplett:
"Two Kconfig bugfixes for 3.17 related to tinification. These fixes
make the Kconfig "General Setup" menu much more usable"
* tag 'tiny/kconfig-for-3.17' of https://git.kernel.org/pub/scm/linux/kernel/git/josh/linux:
init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu
init/Kconfig: Hide printk log config if CONFIG_PRINTK=n
Josh Triplett [Fri, 3 Oct 2014 23:19:24 +0000 (16:19 -0700)]
init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu
commit
03b8c7b623c80af264c4c8d6111e5c6289933666 ("futex: Allow
architectures to skip futex_atomic_cmpxchg_inatomic() test") added the
HAVE_FUTEX_CMPXCHG symbol right below FUTEX. This placed it right in
the middle of the options for the EXPERT menu. However,
HAVE_FUTEX_CMPXCHG does not depend on EXPERT or FUTEX, so Kconfig stops
placing items in the EXPERT menu, and displays the remaining several
EXPERT items (starting with EPOLL) directly in the General Setup menu.
Since both users of HAVE_FUTEX_CMPXCHG only select it "if FUTEX", make
HAVE_FUTEX_CMPXCHG itself depend on FUTEX. With this change, the
subsequent items display as part of the EXPERT menu again; the EMBEDDED
menu now appears as the next top-level item in the General Setup menu,
which makes General Setup much shorter and more usable.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Cc: stable <stable@vger.kernel.org>
Josh Triplett [Fri, 3 Oct 2014 23:00:54 +0000 (16:00 -0700)]
init/Kconfig: Hide printk log config if CONFIG_PRINTK=n
The buffers sized by CONFIG_LOG_BUF_SHIFT and
CONFIG_LOG_CPU_MAX_BUF_SHIFT do not exist if CONFIG_PRINTK=n, so don't
ask about their size at all.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Cc: stable <stable@vger.kernel.org>
Linus Torvalds [Fri, 3 Oct 2014 21:20:44 +0000 (14:20 -0700)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:
"Two i2c driver bugfixes"
* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: qup: Fix order of runtime pm initialization
i2c: rk3x: fix 0 length write transfers
Linus Torvalds [Fri, 3 Oct 2014 20:31:57 +0000 (13:31 -0700)]
Merge tag 'trace-fixes-v3.17-rc7' of git://git./linux/kernel/git/rostedt/linux-trace
Pull trace ring buffer iterator fix from Steven Rostedt:
"While testing some new changes for 3.18, I kept hitting a bug every so
often in the ring buffer. At first I thought it had to do with some
of the changes I was working on, but then testing something else I
realized that the bug was in 3.17 itself. I ran several bisects as
the bug was not very reproducible, and finally came up with the commit
that I could reproduce easily within a few minutes, and without the
change I could run the tests over an hour without issue. The change
fit the bug and I figured out a fix. That bad commit was:
Commit
651e22f2701b "ring-buffer: Always reset iterator to reader page"
This commit fixed a bug, but in the process created another one. It
used the wrong value as the cached value that is used to see if things
changed while an iterator was in use. This made it look like a change
always happened, and could cause the iterator to go into an infinite
loop"
* tag 'trace-fixes-v3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
ring-buffer: Fix infinite spin in reading buffer
Linus Torvalds [Fri, 3 Oct 2014 20:09:57 +0000 (13:09 -0700)]
Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs/smb3 fixes from Steve French:
"Fix for CIFS/SMB3 oops on reconnect during readpages (3.17 regression)
and for incorrectly closing file handle in symlink error cases"
* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
CIFS: Fix readpages retrying on reconnects
Fix problem recognizing symlinks
Dmitry Torokhov [Fri, 3 Oct 2014 18:24:46 +0000 (11:24 -0700)]
Merge branch 'next' into for-linus
Prepare first round of input updates for 3.18.
Linus Torvalds [Fri, 3 Oct 2014 15:40:37 +0000 (08:40 -0700)]
Merge tag 'md/3.17-final-fix' of git://neil.brown.name/md
Pull raid5 discard fix from Neil Brown:
"One fix for raid5 discard issue"
* tag 'md/3.17-final-fix' of git://neil.brown.name/md:
md/raid5: disable 'DISCARD' by default due to safety concerns.
Linus Torvalds [Fri, 3 Oct 2014 15:31:14 +0000 (08:31 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"Nothing too major or scary.
One i915 regression fix, nouveau has a tmds regression fix, along with
a regression fix for the runtime pm code for optimus laptops not
restoring the display hw correctly"
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/nouveau: make sure display hardware is reinitialised on runtime resume
drm/nouveau: punt fbcon resume out to a workqueue
drm/nouveau: fix regression on original nv50 board
drm/nv50/disp: fix dpms regression on certain boards
drm/i915: Flush the PTEs after updating them before suspend
Christoph Hellwig [Fri, 3 Oct 2014 08:47:09 +0000 (01:47 -0700)]
[SCSI] uas: disable use of blk-mq I/O path
The uas driver uses the block layer tag for USB3 stream IDs. With
blk-mq we can get larger tag numbers that the queue depth, which breaks
this assumption. A fix is under way for 3.18, but sits on top of
large changes so can't easily be backported. Set the disable_blk_mq
path so that a uas device can't easily crash the system when using
blk-mq for SCSI.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Linus Torvalds [Fri, 3 Oct 2014 01:47:28 +0000 (18:47 -0700)]
Merge tag 'pm+acpi-3.17-final' of git://git./linux/kernel/git/rafael/linux-pm
Pull ACPI and power management fixes from Rafael Wysocki:
"These are three regression fixes (cpufreq core, pcc-cpufreq, i915 /
ACPI) and one trivial fix for a callback return value mismatch in the
cpufreq integrator driver.
Specifics:
- A recent cpufreq core fix went too far and introduced a regression
in the system suspend code path. Fix from Viresh Kumar.
- An ACPI-related commit in the i915 driver that fixed backlight
problems for some Thinkpads inadvertently broke a Dell machine (in
3.16). Fix from Aaron Lu.
- The pcc-cpufreq driver was broken during the 3.15 cycle by a commit
that put wait_event() under a spinlock by mistake. Fix that
(Rafael J Wysocki).
- The return value type of integrator_cpufreq_remove() is void, but
should be int. Fix from Arnd Bergmann"
* tag 'pm+acpi-3.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: update 'cpufreq_suspended' after stopping governors
ACPI / i915: Update the condition to ignore firmware backlight change request
cpufreq: integrator: fix integrator_cpufreq_remove return type
cpufreq: pcc-cpufreq: Fix wait_event() under spinlock
Dave Airlie [Fri, 3 Oct 2014 01:38:16 +0000 (11:38 +1000)]
Merge tag 'drm-intel-fixes-2014-10-02' of git://anongit.freedesktop.org/drm-intel into drm-fixes
final regression fix for 3.17.
* tag 'drm-intel-fixes-2014-10-02' of git://anongit.freedesktop.org/drm-intel:
drm/i915: Flush the PTEs after updating them before suspend
Andy Gross [Mon, 29 Sep 2014 22:00:51 +0000 (17:00 -0500)]
i2c: qup: Fix order of runtime pm initialization
The runtime pm calls need to be done before populating the children via the
i2c_add_adapter call. If this is not done, a child can run into issues trying
to do i2c read/writes due to the pm_runtime_sync failing.
Signed-off-by: Andy Gross <agross@codeaurora.org>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Alexandru M Stan [Wed, 1 Oct 2014 17:40:41 +0000 (10:40 -0700)]
i2c: rk3x: fix 0 length write transfers
i2cdetect -q was broken (everything was a false positive, and no transfers were
actually being sent over i2c). The way it works is by sending a 0 length write
request and checking for NACK. This patch fixes the 0 length writes and actually
sends them.
Reported-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Tested-by: Max Schwarz <max.schwarz@online.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
Rafael J. Wysocki [Fri, 3 Oct 2014 01:10:07 +0000 (03:10 +0200)]
Merge branches 'pm-cpufreq' and 'acpi-video'
* pm-cpufreq:
cpufreq: update 'cpufreq_suspended' after stopping governors
cpufreq: integrator: fix integrator_cpufreq_remove return type
cpufreq: pcc-cpufreq: Fix wait_event() under spinlock
* acpi-video:
ACPI / i915: Update the condition to ignore firmware backlight change request
Linus Torvalds [Thu, 2 Oct 2014 23:29:19 +0000 (16:29 -0700)]
Merge branch 'akpm' (fixes from Andrew Morton)
Merge fixes from Andrew Morton:
"5 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm: page_alloc: fix zone allocation fairness on UP
perf: fix perf bug in fork()
MAINTAINERS: change git URL for mpc5xxx tree
mm: memcontrol: do not iterate uninitialized memcgs
ocfs2/dlm: should put mle when goto kill in dlm_assert_master_handler
Johannes Weiner [Thu, 2 Oct 2014 23:21:10 +0000 (16:21 -0700)]
mm: page_alloc: fix zone allocation fairness on UP
The zone allocation batches can easily underflow due to higher-order
allocations or spills to remote nodes. On SMP that's fine, because
underflows are expected from concurrency and dealt with by returning 0.
But on UP, zone_page_state will just return a wrapped unsigned long,
which will get past the <= 0 check and then consider the zone eligible
until its watermarks are hit.
Commit
3a025760fc15 ("mm: page_alloc: spill to remote nodes before
waking kswapd") already made the counter-resetting use
atomic_long_read() to accomodate underflows from remote spills, but it
didn't go all the way with it.
Make it clear that these batches are expected to go negative regardless
of concurrency, and use atomic_long_read() everywhere.
Fixes:
81c0a2bb515f ("mm: page_alloc: fair zone allocator policy")
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Reported-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: <stable@vger.kernel.org> [3.12+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Peter Zijlstra [Thu, 2 Oct 2014 23:17:02 +0000 (16:17 -0700)]
perf: fix perf bug in fork()
Oleg noticed that a cleanup by Sylvain actually uncovered a bug; by
calling perf_event_free_task() when failing sched_fork() we will not yet
have done the memset() on ->perf_event_ctxp[] and will therefore try and
'free' the inherited contexts, which are still in use by the parent
process. This is bad..
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Sylvain 'ythier' Hitier <sylvain.hitier@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anatolij Gustschin [Thu, 2 Oct 2014 23:16:59 +0000 (16:16 -0700)]
MAINTAINERS: change git URL for mpc5xxx tree
The repository for mpc5xxx has been moved, update git URL to new
location.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Johannes Weiner [Thu, 2 Oct 2014 23:16:57 +0000 (16:16 -0700)]
mm: memcontrol: do not iterate uninitialized memcgs
The cgroup iterators yield css objects that have not yet gone through
css_online(), but they are not complete memcgs at this point and so the
memcg iterators should not return them. Commit
d8ad30559715 ("mm/memcg:
iteration skip memcgs not yet fully initialized") set out to implement
exactly this, but it uses CSS_ONLINE, a cgroup-internal flag that does
not meet the ordering requirements for memcg, and so the iterator may
skip over initialized groups, or return partially initialized memcgs.
The cgroup core can not reasonably provide a clear answer on whether the
object around the css has been fully initialized, as that depends on
controller-specific locking and lifetime rules. Thus, introduce a
memcg-specific flag that is set after the memcg has been initialized in
css_online(), and read before mem_cgroup_iter() callers access the memcg
members.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Tejun Heo <tj@kernel.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Hugh Dickins <hughd@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: <stable@vger.kernel.org> [3.12+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
alex chen [Thu, 2 Oct 2014 23:16:55 +0000 (16:16 -0700)]
ocfs2/dlm: should put mle when goto kill in dlm_assert_master_handler
In dlm_assert_master_handler, the mle is get in dlm_find_mle, should be
put when goto kill, otherwise, this mle will never be released.
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Reviewed-by: joyce.xue <xuejiufei@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 2 Oct 2014 23:10:38 +0000 (16:10 -0700)]
Merge tag 'media/v3.17-rc8' of git://git./linux/kernel/git/mchehab/linux-media
Pull media fix from Mauro Carvalho Chehab:
"One last time regression fix at em28xx. The removal of .reset_resume
broke suspend/resume on this driver for some devices.
There are more fixes to be done for em28xx suspend/resume to be better
handled, but I'm opting to let them to stay for a while at the media
devel tree, in order to get more tests. So, for now, let's just
revert this patch"
* tag 'media/v3.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
Revert "[media] media: em28xx - remove reset_resume interface"
Steven Rostedt (Red Hat) [Thu, 2 Oct 2014 20:51:18 +0000 (16:51 -0400)]
ring-buffer: Fix infinite spin in reading buffer
Commit
651e22f2701b "ring-buffer: Always reset iterator to reader page"
fixed one bug but in the process caused another one. The reset is to
update the header page, but that fix also changed the way the cached
reads were updated. The cache reads are used to test if an iterator
needs to be updated or not.
A ring buffer iterator, when created, disables writes to the ring buffer
but does not stop other readers or consuming reads from happening.
Although all readers are synchronized via a lock, they are only
synchronized when in the ring buffer functions. Those functions may
be called by any number of readers. The iterator continues down when
its not interrupted by a consuming reader. If a consuming read
occurs, the iterator starts from the beginning of the buffer.
The way the iterator sees that a consuming read has happened since
its last read is by checking the reader "cache". The cache holds the
last counts of the read and the reader page itself.
Commit
651e22f2701b changed what was saved by the cache_read when
the rb_iter_reset() occurred, making the iterator never match the cache.
Then if the iterator calls rb_iter_reset(), it will go into an
infinite loop by checking if the cache doesn't match, doing the reset
and retrying, just to see that the cache still doesn't match! Which
should never happen as the reset is suppose to set the cache to the
current value and there's locks that keep a consuming reader from
having access to the data.
Fixes:
651e22f2701b "ring-buffer: Always reset iterator to reader page"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Linus Torvalds [Thu, 2 Oct 2014 19:23:10 +0000 (12:23 -0700)]
Merge branch 'parisc-3.17-8' of git://git./linux/kernel/git/deller/parisc-linux
Pull parisc fix from Helge Deller:
"One late but trivial patch to fix the serial console on parisc
machines which got broken during the 3.17 release cycle"
* 'parisc-3.17-8' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Fix serial console for machines with serial port on superio chip
Pavel Shilovsky [Thu, 2 Oct 2014 16:13:35 +0000 (20:13 +0400)]
CIFS: Fix readpages retrying on reconnects
If we got a reconnect error from async readv we re-add pages back
to page_list and continue loop. That is wrong because these pages
have been already added to the pagecache but page_list has pages that
have not been added to the pagecache yet. This ends up with a general
protection fault in put_pages after readpages. Fix it by not retrying
the read of these pages and falling back to readpage instead.
Fixes debian bug 762306
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Steve French [Thu, 25 Sep 2014 06:26:55 +0000 (01:26 -0500)]
Fix problem recognizing symlinks
Changeset
eb85d94bd introduced a problem where if a cifs open
fails during query info of a file we
will still try to close the file (happens with certain types
of reparse points) even though the file handle is not valid.
In addition for SMB2/SMB3 we were not mapping the return code returned
by Windows when trying to open a file (like a Windows NFS symlink)
which is a reparse point.
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
CC: stable <stable@vger.kernel.org> #v3.13+
Linus Torvalds [Thu, 2 Oct 2014 18:57:52 +0000 (11:57 -0700)]
Merge branch 'numa-migration-fixes' (fixes from Mel Gorman)
Merge NUMA balancing related fixlets from Mel Gorman:
"There were a few minor changes so am resending just the two patches
that are mostly likely to affect the bug Dave and Sasha saw and marked
them for stable.
I'm less confident it will address Sasha's problem because while I
have not kept up to date, I believe he's also seeing memory corruption
issues in next from an unknown source. Still, it would be nice to see
how they affect trinity testing.
I'll send the MPOL_MF_LAZY patch separately because it's not urgent"
* emailed patches from Mel Gorman <mgorman@suse.de>:
mm: numa: Do not mark PTEs pte_numa when splitting huge pages
mm: migrate: Close race between migration completion and mprotect