- 22 9月, 2020 1 次提交
-
-
由 Colin Ian King 提交于
There is an if statement that is indented too deeply, fix this by removing the extraneous tab. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 09 9月, 2020 2 次提交
-
-
由 Hans de Goede 提交于
The Acer One S1003 2-in-1 keyboard dock uses a Synaptics S910xx touchpad which is connected to an ITE 8910 USB keyboard controller chip. This keyboard has the same quirk for its rfkill / airplane mode hotkey as other keyboards with ITE keyboard chips, it only sends a single release event when pressed and released, it never sends a press event. This commit adds this keyboards USB id to the hid-ite id-table, fixing the rfkill key not working on this keyboard. Note that like for the Acer Aspire Switch 10 (SW5-012) the id-table entry matches on the HID_GROUP_GENERIC generic group so that hid-ite only binds to the keyboard interface and the mouse/touchpad interface is left untouched so that hid-multitouch can bind to it. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Dan Carpenter 提交于
This code doesn't check if "settings->startup_profile" is within bounds and that could result in an out of bounds array access. What the code does do is it checks if the settings can be written to the firmware, so it's possible that the firmware has a bounds check? It's safer and easier to verify when the bounds checking is done in the kernel. Fixes: 14bf62cd ("HID: add driver for Roccat Kone gaming mouse") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 01 9月, 2020 3 次提交
-
-
由 Marc Zyngier 提交于
When calling into hid_map_usage(), the passed event code is blindly stored as is, even if it doesn't fit in the associated bitmap. This event code can come from a variety of sources, including devices masquerading as input devices, only a bit more "programmable". Instead of taking the event code at face value, check that it actually fits the corresponding bitmap, and if it doesn't: - spit out a warning so that we know which device is acting up - NULLify the bitmap pointer so that we catch unexpected uses Code paths that can make use of untrusted inputs can now check that the mapping was indeed correct and bail out if not. Cc: stable@vger.kernel.org Signed-off-by: NMarc Zyngier <maz@kernel.org> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
-
由 Marc Zyngier 提交于
It appears that a ReportSize value of zero is legal, even if a bit non-sensical. Most of the HID code seems to handle that gracefully, except when computing the total size in bytes. When fed as input to memset, this leads to some funky outcomes. Detect the corner case and correctly compute the size. Cc: stable@vger.kernel.org Signed-off-by: NMarc Zyngier <maz@kernel.org> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
-
由 Dinghao Liu 提交于
When input_mt_init_slots() fails, input should be freed to prevent memleak. When input_register_device() fails, we should call input_mt_destroy_slots() to free memory allocated by input_mt_init_slots(). Signed-off-by: NDinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 31 8月, 2020 2 次提交
-
-
由 Nicholas Miell 提交于
When operating in XInput mode, the 8bitdo SN30 Pro+ requires the same quirk as the official Xbox One Bluetooth controllers for rumble to function. Other controllers like the N30 Pro 2, SF30 Pro, SN30 Pro, etc. probably also need this quirk, but I do not have the hardware to test. Signed-off-by: NNicholas Miell <nmiell@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Nirenjan Krishnan 提交于
The Saitek X52 family of joysticks has a pair of axes that were originally (by the Windows driver) used as mouse pointer controls. The corresponding usage page is the Game Controls page, which is not recognized by the generic HID driver, and therefore, both axes get mapped to ABS_MISC. The quirk makes the second axis get mapped to ABS_MISC+1, and therefore made available separately. One Saitek X52 device is already fixed. This patch fixes the other two known devices with VID/PID 06a3:0255 and 06a3:0762. Signed-off-by: NNirenjan Krishnan <nirenjan@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 8月, 2020 1 次提交
-
-
由 Jiri Kosina 提交于
This reverts commit d3132792. This patch causes a regression with quite a few devices, as probing fails because of the race where the first IRQ is dropped on the floor (after hid_device_io_start() happens, but before the 50ms timeout passess), and report descriptor never gets parsed and populated. As this is just a boot time micro-optimization, let's revert the patch for 5.9 now, and fix this properly eventually for next merge window. Link: https://bugzilla.kernel.org/show_bug.cgi?id=208935Reported-by: NJohannes Hirte <johannes.hirte@datenkhaos.de> Reported-by: NMarius Zachmann <mail@mariuszachmann.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 8月, 2020 5 次提交
-
-
由 Peilin Ye 提交于
`uref->usage_index` is not always being properly checked, causing hiddev_ioctl_usage() to go out of bounds under some cases. Fix it. Reported-by: syzbot+34ee1b45d88571c2fa8b@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=f2aebe90b8c56806b050a20b36f51ed6acabe802Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NPeilin Ye <yepeilin.cs@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Sebastian Parschauer 提交于
The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. One Lenovo PixArt mouse is already fixed. Got two references for 17ef:602e and three references for 17ef:6019 misbehaving like this. Got one direct bug report for 17ef:6093 from Wyatt Ward (wyatt8740). So add HID_QUIRK_ALWAYS_POLL for all of them. Link: https://github.com/sriemer/fix-linux-mouse issue 22 Signed-off-by: NSebastian Parschauer <s.parschauer@gmx.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Hans de Goede 提交于
Before this commit i2c_hid_parse() consists of the following steps: 1. Send power on cmd 2. usleep_range(1000, 5000) 3. Send reset cmd 4. Wait for reset to complete (device interrupt, or msleep(100)) 5. Send power on cmd 6. Try to read HID descriptor Notice how there is an usleep_range(1000, 5000) after the first power-on command, but not after the second power-on command. Testing has shown that at least on the BMAX Y13 laptop's i2c-hid touchpad, not having a delay after the second power-on command causes the HID descriptor to read as all zeros. In case we hit this on other devices too, the descriptor being all zeros can be recognized by the following message being logged many, many times: hid-generic 0018:0911:5288.0002: unknown main item tag 0x0 At the same time as the BMAX Y13's touchpad issue was debugged, Kai-Heng was working on debugging some issues with Goodix i2c-hid touchpads. It turns out that these need a delay after a PWR_ON command too, otherwise they stop working after a suspend/resume cycle. According to Goodix a delay of minimal 60ms is needed. Having multiple cases where we need a delay after sending the power-on command, seems to indicate that we should always sleep after the power-on command. This commit fixes the mentioned issues by moving the existing 1ms sleep to the i2c_hid_set_power() function and changing it to a 60ms sleep. Cc: stable@vger.kernel.org BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208247Reported-by: NKai-Heng Feng <kai.heng.feng@canonical.com> Reported-and-tested-by: NAndrea Borgia <andrea@borgia.bo.it> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Rikard Falkeborn 提交于
macally_id_table is not modified and can be made const to allow the compiler to put it in read-only memory. Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Rikard Falkeborn 提交于
cougar_id_table[] is not changed and can be made const to allow the compiler to put it in read-only memory. Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 21 7月, 2020 1 次提交
-
-
由 Ikjoon Jang 提交于
Add HID_QUIRK_NOGET for Logitech GROUP device. Logitech GROUP is a compound with camera and audio. When the HID interface in an audio device is requested to get specific report id, all following control transfers are stalled and never be restored back. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=203419Signed-off-by: NIkjoon Jang <ikjn@chromium.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 7月, 2020 3 次提交
-
-
由 Alexander A. Klimov 提交于
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: NAlexander A. Klimov <grandmaster@al2klimov.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Alexander A. Klimov 提交于
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: NAlexander A. Klimov <grandmaster@al2klimov.de> Acked-by: NBastien Nocera <hadess@hadess.net> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Alexander A. Klimov 提交于
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: NAlexander A. Klimov <grandmaster@al2klimov.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 14 7月, 2020 1 次提交
-
-
由 Grant Likely 提交于
Some devices, particularly the 3DConnexion Spacemouse wireless 3D controllers, return more than just the battery capacity in the battery report. The Spacemouse devices return an additional byte with a device specific field. However, hidinput_query_battery_capacity() only requests a 2 byte transfer. When a spacemouse is connected via USB (direct wire, no wireless dongle) and it returns a 3 byte report instead of the assumed 2 byte battery report the larger transfer confuses and frightens the USB subsystem which chooses to ignore the transfer. Then after 2 seconds assume the device has stopped responding and reset it. This can be reproduced easily by using a wired connection with a wireless spacemouse. The Spacemouse will enter a loop of resetting every 2 seconds which can be observed in dmesg. This patch solves the problem by increasing the transfer request to 4 bytes instead of 2. The fix isn't particularly elegant, but it is simple and safe to backport to stable kernels. A further patch will follow to more elegantly handle battery reports that contain additional data. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Darren Hart <darren@dvhart.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: stable@vger.kernel.org Tested-by: NDarren Hart <dvhart@infradead.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 07 7月, 2020 9 次提交
-
-
由 Hans de Goede 提交于
The Ultrabook Keyboard sends a spurious F23 key-press when resuming from suspend. GNOME uses F23 to toggle the touchpad on/off so this causes the OSD graphics for the touchpad toggle to show on resume. The keyboard does not actually have a F23 key, se we can simple fix it by marking the 0x00070072 HID usage, which normally is F23, to be ignored. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Hans de Goede 提交于
Add support for setting the Fn lock value of the ThinkPad 10 Ultrabook Keyboard through sysfs, re-using the fn_lock sysfs attribute read/write helpers from the existing ThinkPad Compact Keyboard with TrackPoint support. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Hans de Goede 提交于
Some of the function keys special functions all use the same 0x000c0001 usage code, add a mapping for these based on the usage_index; And add support for the Speaker and Mic mute LEDs integrated into the F1 and F4 keys. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Hans de Goede 提交于
Except for a single call, there is nothing keyboard-model specific about the cptkbd fn_lock sysfs attr handlers, rename them dropping the cptkbd post-/pre-fix, so that they can be re-used for supporting Fn-lock on the Thinkpad 10 ultrabook kbd. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Hans de Goede 提交于
Factor out the generic parts of the tpkbd LED code, so that they can be re-used for supporting the LEDs on the Thinkpad 10 ultrabook kbd. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Hans de Goede 提交于
Merge the tpkbd and cptkbd data structures, into a single unified structure instead of having a separate data structure per keyboard type. This is a preparation patch for making the tpkbd LED functions more generic, so that they can be re-used for supporting the LEDs on the Thinkpad 10 ultrabook keyboard. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Maciej S. Szmigiero 提交于
These messages appear each time the mouse wakes from sleep, in my case (Logitech M705), every minute or so. Let's downgrade them to the "debug" level so they don't fill the kernel log by default. While we are at it, let's make clear that this is a wheel multiplier (and not, for example, XY movement multiplier). Fixes: 4435ff2f ("HID: logitech: Enable high-resolution scrolling on Logitech mice") Cc: stable@vger.kernel.org Signed-off-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name> Reviewed-by: NHarry Cutts <hcutts@chromium.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Mazin Rezk 提交于
Some parts of hid-logitech-dj explicitly referred to 0xff for the receiver index. This patch changes those references to the HIDPP_RECEIVER_INDEX definition. Signed-off-by: NMazin Rezk <mnrzk@protonmail.com> Reviewed-by: NFilipe Laíns <lains@archlinux.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Kai-Heng Feng 提交于
PCI_DEV_FLAGS_NO_D3 should not be used outside of PCI core. Instead, we can use pci_save_state() to hint PCI core that the device should stay at D0 during suspend. By doing so, PCI core will let the upstream bridges also stays at D0 so the entire hierarchy is in the correct power state as PCI spec mandates. Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com> Acked-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 24 6月, 2020 2 次提交
-
-
由 James Hilliard 提交于
As this is a cypress HID->COM RS232 style device that is handled by the cypress_M8 driver we also need to add it to the ignore list in hid-quirks. Cc: stable <stable@vger.kernel.org> Signed-off-by: NJames Hilliard <james.hilliard1@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Hans de Goede 提交于
The Maxxter KB-BT-001 Bluetooth keyboard, which looks somewhat like the Apple Wireless Keyboard, is using the vendor and product IDs (05AC:0239) of the Apple Wireless Keyboard (2009 ANSI version) <sigh>. But its F1 - F10 keys are marked as sending F1 - F10, not the special functions hid-apple.c maps them too; and since its descriptors do not contain the HID_UP_CUSTOM | 0x0003 usage apple-hid looks for for the Fn-key, apple_setup_input() never gets called, so F1 - F6 are mapped to key-codes which have not been set in the keybit array causing them to not send any events at all. The lack of a usage code matching the Fn key in the clone is actually useful as this allows solving this problem in a generic way. This commits adds a fn_found flag and it adds a input_configured callback which checks if this flag is set once all usages have been mapped. If it is not set, then assume this is a clone and clear the quirks bitmap so that the hid-apple code does not add any special handling to this keyboard. This fixes F1 - F6 not sending anything at all and F7 - F12 sending the wrong codes on the Maxxter KB-BT-001 Bluetooth keyboard and on similar clones. Cc: Joao Moreno <mail@joaomoreno.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 6月, 2020 2 次提交
-
-
由 Daniel G. Morse 提交于
The controllers from the Super Nintendo Classic Edition (AKA the SNES Mini) appear as a Classic Controller Pro when connected to a Wii Remote. All the buttons work as the same, with the d-pad being mapped the same as the d-pad on the Classic Controller Pro. This differs from the behaviour of most controllers with d-pads and no analogue sticks, where the d-pad maps to ABS_HAT1X for left and right, and ABS_HAT1Y for up and down. This patch adds an option to the hid-wiimote module to make the Super Nintendo Classic Controller behave this way. The patch has been tested with a Super Nintendo Classic Controller plugged into a Wii Remote in both with the option both enabled and disabled. When enabled the d-pad acts as the analogue control, and when disabled it acts as it did before the patch was applied. This patch has not been tested with e Wii Classic Controller (either the original or the pro version) as I do not have one of these controllers. Although I have not tested it with these controllers, I think it is likely this patch will also work with the NES Classic Edition Controllers. Signed-off-by: NDaniel G. Morse <dmorse@speedfox.co.uk> Reviewed-by: NDavid Rheinsberg <david.rheinsberg@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Rodrigo Rivas Costa 提交于
Using uhid and KASAN this driver crashed because it was getting several connection events where it only expected one. Then the device was added several times to the static device list and it got corrupted. This patch checks if the device is already in the list before adding it. Signed-off-by: NRodrigo Rivas Costa <rodrigorivascosta@gmail.com> Tested-by: NSiarhei Vishniakou <svv@google.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 16 6月, 2020 7 次提交
-
-
由 Dmitry Torokhov 提交于
Neither the trackpad, nor the mouse want input core to generate autorepeat events for their buttons, so let's reset the bit (as hid-input sets it for these devices based on the usage vendor code). Cc: stable@vger.kernel.org Reported-by: NYariv <oigevald+kernel@gmail.com> Tested-by: NYariv <oigevald+kernel@gmail.com> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Caiyuan Xie 提交于
Add support for devices which that have reports with id == 2 Signed-off-by: NCaiyuan Xie <caiyuan.xie@cn.alps.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Sebastian Parschauer 提交于
The Obins Anne Pro 2 keyboard (04d9:a293) disconnects after a few minutes of inactivity when using it wired and typing does not result in any input events any more. This is a common firmware flaw. So add the ALWAYS_POLL quirk for this device. GitHub user Dietrich Moerman (dietrichm) tested the quirk and requested my help in my project https://github.com/sriemer/fix-linux-mouse issue 22 to provide this patch. Link: https://www.reddit.com/r/AnnePro/comments/gruzcb/anne_pro_2_linux_cant_type_after_inactivity/Signed-off-by: NSebastian Parschauer <s.parschauer@gmx.de> Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Peter Hutterer 提交于
hid-multitouch currently runs GET_REPORT for Contact Max and again to retrieve the Win8 blob. If both are within the same report, the Resolution Multiplier code calls GET_FEATURE again and this time, possibly due to timing, it causes the ILITEK-TP device interpret the GET_FEATURE as an instruction to change the mode and effectively stop the device from functioning as expected. Notably: the device doesn't even have a Resolution Multiplier so it shouldn't be affected by any of this at all. Fix this by making sure we only execute GET_REPORT if there is a Resolution Multiplier in the respective report. Where the HID_QUIRK_NO_INIT_REPORTS field is set we just bail out immediately. This shouldn't be triggered by any real device anyway. Signed-off-by: NPeter Hutterer <peter.hutterer@who-t.net> Tested-by: NWen He <wen.he_1@nxp.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Federico Ricchiuto 提交于
The Mediacom FlexBook edge13 uses the SIPODEV SP1064 touchpad, which does not supply descriptors, so it has to be added to the override list. Signed-off-by: NFederico Ricchiuto <fed.ricchiuto@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Colin Ian King 提交于
The variable retval is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Dmitry Torokhov 提交于
usbhid tries to give the device 50 milliseconds to drain its queues when opening the device, but does it naively by simply sleeping in open handler, which slows down device probing (and thus may affect overall boot time). However we do not need to sleep as we can instead mark a point of time in the future when we should start processing the events. Reported-by: NNicolas Boichat <drinkcat@chromium.org> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NGuenter Roeck <groeck@chromium.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 14 6月, 2020 1 次提交
-
-
由 Masahiro Yamada 提交于
Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over '---help---'"), the number of '---help---' has been gradually decreasing, but there are still more than 2400 instances. This commit finishes the conversion. While I touched the lines, I also fixed the indentation. There are a variety of indentation styles found. a) 4 spaces + '---help---' b) 7 spaces + '---help---' c) 8 spaces + '---help---' d) 1 space + 1 tab + '---help---' e) 1 tab + '---help---' (correct indentation) f) 1 tab + 1 space + '---help---' g) 1 tab + 2 spaces + '---help---' In order to convert all of them to 1 tab + 'help', I ran the following commend: $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/' Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
-