| Age | Commit message (Collapse) | Author | Files | Lines |
|
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.
auto-generated by the following:
for i in `git grep -l -w asm/unaligned.h`; do
sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
|
|
syzbot is reporting uninitialized value at iforce_init_device() [1], for
commit 6ac0aec6b0a6 ("Input: iforce - allow callers supply data buffer
when fetching device IDs") is checking that valid length is shorter than
bytes to read. Since iforce_get_id_packet() stores valid length when
returning 0, the caller needs to check that valid length is longer than or
equals to bytes to read.
Reported-by: syzbot <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
Fixes: 6ac0aec6b0a6 ("Input: iforce - allow callers supply data buffer when fetching device IDs")
Link: https://lore.kernel.org/r/[email protected]
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Add a new iforce_device entry to support the Boeder Force Feedback Wheel
device.
Signed-off-by: Greg Tulli <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
syzbot is reporting hung task at __input_unregister_device() [1], for
iforce_close() waiting at wait_event_interruptible() with dev->mutex held
is blocking input_disconnect_device() from __input_unregister_device().
It seems that the cause is simply that commit c2b27ef672992a20 ("Input:
iforce - wait for command completion when closing the device") forgot to
call wake_up() after clear_bit().
Fix this problem by introducing a helper that calls clear_bit() followed
by wake_up_all().
Reported-by: syzbot <[email protected]>
Fixes: c2b27ef672992a20 ("Input: iforce - wait for command completion when closing the device")
Tested-by: syzbot <[email protected]>
Suggested-by: Fabio M. De Francesco <[email protected]>
Co-developed-by: Hillf Danton <[email protected]>
Signed-off-by: Hillf Danton <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
USB control-message timeouts are specified in milliseconds and should
specifically not vary with CONFIG_HZ.
Fixes: 487358627825 ("Input: iforce - use DMA-safe buffer when getting IDs from USB")
Signed-off-by: Johan Hovold <[email protected]>
Cc: [email protected] # 5.3
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
The endpoint type should also be checked before a device
is accepted.
Reported-by: [email protected]
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Those are remnants of the SPDX identifier migration, which haven't been
removed properly.
Signed-off-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Sync up with mainline to resolve conflicts in iforce driver.
|
|
This is added based on the fact that this is an iforce-based device and
that the Windows driver for the R440 works for the Logitech WingMan Formula
Force after replacing the device/vendor IDs.
Signed-off-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Instead of open-coding conversion from/to little-endian, let's
use proper accessors.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Transport initialization code now deals mostly with transport-specific
data, so we can drop couple of temporary variables.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
It is not needed anymore as behavior is controlled by the transport
operations set up for given device.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
USB transport has to use cache line-aligned buffers for transfers to avoid
DMA issues; serio doe snot have such restrictions. Let's move "data_in"
buffer from main driver structure into transport modules and make sure USB
requirements are respected.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
We want to move buffer handling into transport layers as the properties of
buffers (DMA-safety, alignment, etc) are different for different
transports. To allow this, let's allow caller to specify their own buffers
for the results of iforce_get_id_packet() and let transport drivers to
figure what buffers they need to use for transfers.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
It is excessive to check if device is fully initialized in
iforce_process_packet(), as for USB-conected devices we do not start
collecting reports until the device is fully initialized.
Let's change serio transport code to not call iforce_process_packet()
until device initialization is done.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Signalling command completion from iforce_process_packet() does
not make sense, as not all transport use the same data path for
both commands and motion data form the device, that is why USB
code already has to signal command completion iforce_usb_out().
Let's move signalling completion into individual transport
modules.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Current code combines packet type and data length into single argument to
iforce_process_packet() and then has to untangle it. It is much clearer to
simply use separate arguments.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
This makes code clearer a bit.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
According to our coding style case labels in switch statements should
be aligned with the switch keyword.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
When working with USB devices we need to use DMA-safe buffers,
and iforce->edata is not one. Let's rework the code to allocate
temporary buffer (iforce_get_id() is called only during initialization
so there is no reason to have permanent buffer) and use it. While at it,
let's utilize usb_control_msg() API which simplifies code.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Now that we have moved enough transport details into separate source files
we can change them into transport modules so that they are only loaded when
needed.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
This moves transport-specific data from main iforce structure into
transport modules.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Note that the parent device for the USB-connected controllers is now
USB interface instead of USB device.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Add start_io() and stop_io() transport methods so that core
does not have to know the details.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Continue teasing apart protocol-specific bits from core into transport
modules. This time move RS232-specific command completion handling
from core to iforce-serio module.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
To avoid #ifdef-ing out parts of the code and having conditionals in normal
control flow, let's define "get_id" transport method and move
implementation into respective transport modules.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
In order to tease apart the driver into core and transport modules, let's
introduce transport operations and make "xmit" the very first one such
operation.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
The kernel is supposed to handle multiple devices, static flags
in packet handling code will never work.
Tested-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1334 file(s).
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Reviewed-by: Richard Fontana <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:
GPL-2.0-only
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
- a new driver for Rohm BU21029 touch controller
- new bitmap APIs: bitmap_alloc, bitmap_zalloc and bitmap_free
- updates to Atmel, eeti. pxrc and iforce drivers
- assorted driver cleanups and fixes.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits)
MAINTAINERS: Add PhoenixRC Flight Controller Adapter
Input: do not use WARN() in input_alloc_absinfo()
Input: mark expected switch fall-throughs
Input: raydium_i2c_ts - use true and false for boolean values
Input: evdev - switch to bitmap API
Input: gpio-keys - switch to bitmap_zalloc()
Input: elan_i2c_smbus - cast sizeof to int for comparison
bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
md: Avoid namespace collision with bitmap API
dm: Avoid namespace collision with bitmap API
Input: pm8941-pwrkey - add resin entry
Input: pm8941-pwrkey - abstract register offsets and event code
Input: iforce - reorganize joystick configuration lists
Input: atmel_mxt_ts - move completion to after config crc is updated
Input: atmel_mxt_ts - don't report zero pressure from T9
Input: atmel_mxt_ts - zero terminate config firmware file
Input: atmel_mxt_ts - refactor config update code to add context struct
Input: atmel_mxt_ts - config CRC may start at T71
Input: atmel_mxt_ts - remove unnecessary debug on ENOMEM
Input: atmel_mxt_ts - remove duplicate setup of ABS_MT_PRESSURE
...
|
|
* btn_avb_pegasus and btn_avb_tw are the same. Unify them
into btn_joystick_avb.
* btn_wheel is an exact copy of btn_joystick, so remove it.
Rename btn_avb_wheel into btn_wheel since it is the only
sane configuration for a wheel.
* Assign the (new) btn_wheel configuration to the "AVB Top
Shot Force Feedback Racing Wheel", because the previous
configuration was meant for a joystick.
Signed-off-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Move BTN_DEAD into the arrays with the specific button sets
instead of assigning it for every iforce device.
BTN_DEAD represents an optical sensor which detects if the
user is interacting with the device. On devices without that
optical sensor BTN_DEAD is repeatedly causing false inputs
on every status update of the joystick.
Signed-off-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Previously, packets that have been dumped are shown in the
kernel log like this:
drivers/input/joystick/iforce/iforce-packets.c: info cmd = ff04, data =
56
02
04
00
Use dev_dbg to dump the packages only when requested and to list
the parent device as well. Use printf logic to generate the hexdump
instead of looping through every char that needs to be printed (which
in turn fixes the unnecessary newlines and looks more clean in general).
The resulting package dump output does now look like this:
usb 2-8: iforce_dump_packet info cmd = ff04, data = 56 02 04 00
Signed-off-by: Tim Schumacher <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
I do not think Vojtech wants snail mail these days (and he mentioned that
nobody has ever sent him snail mail), and the address is not even valid
anymore, so let's remove snail-mail instructions from the sources.
Acked-by: Vojtech Pavlik <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
iforce_get_id_packet() invokes wait_event_interruptible_timeout() which
means it has to be in non-atomic context at that point, thus we can use
GFP_KERNEL instead of GFP_ATOMIC.
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
The script:
./scripts/documentation-file-ref-check --fix
Gives multiple hints for broken references on some files.
Manually use the one that applies for some files.
Acked-by: Steven Rostedt (VMware) <[email protected]>
Acked-by: James Morris <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Acked-by: Jonathan Corbet <[email protected]>
|
|
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Make sure to check the number of endpoints to avoid dereferencing a
NULL-pointer or accessing memory that lie beyond the end of the endpoint
array should a malicious device lack the expected endpoints.
Signed-off-by: Johan Hovold <[email protected]>
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to. So converted it to use that instead.
Cc: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.
Cc: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We should always reference the input device for dev_err(), not the USB
device. Fix up the places where I got this wrong.
Reported-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
err() was a very old USB-specific macro that I thought had gone away.
This patch removes it from being used in the driver and uses dev_err()
instead.
Cc: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use <module>-y notation to specify list of objects comprising iforce
module and conditionally pull in USB and RS232 support.
Also remove custom compiler flags and rely on general makefile rules
for enabling warnings.
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
USB ID entry for "Guillemot Jet Leader 3D" in iforce-main.c did not match
one used in iforce-usb.c
Signed-off-by: Marek Vasut <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
This device features a RUDDER on the knob.
Signed-off-by: Marek Vasut <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
We need to wait for the command to disable FF effects to complete before
continuing with closing the device.
Tested-by: Johannes Ebke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
Do not try to free iforce device when we closing input device; disconnect
is the only place where it should be deleted.
Reported-by: Johannes Ebke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|