mirror-linux/drivers/hid
Linus Torvalds 919464deec Revert "HID: bpf: allow write access to quirks field in struct hid_device"
This reverts commit 6fd47effe9, and the related self-test update
commit e14e0eaeb0 ("selftests/hid: add test for assigning a given
device to hid-generic").

It results in things like the scroll wheel on Logitech mice not working
after a reboot due to the kernel being confused about the state of the
high-resolution mode.

Quoting Benjamin Tissoires:
 "The idea of 6fd47effe9 was to be able to call hid_bpf_rdesc_fixup()
  once per reprobe of the device.

  However, because the bpf filter can now change the quirk value, the
  call had to be moved before the driver gets bound (which was
  previously ensuring the unicity of the call).

  The net effect is that now, in the case hid-generic gets loaded first
  and then the specific driver gets loaded once the disk is available,
  the value of ->quirks is not reset, but kept to the value that was set
  by hid-generic (HID_QUIRK_INPUT_PER_APP).

  Once hid-logitech-hidpp kicks in, that quirk is now set, which creates
  two inputs for the single mouse: one keyboard for fancy shortcuts, and
  one mouse node.

  However, hid-logitech-hidpp expects only one input node to be attached
  (it stores it into hidpp->input), and when a wheel event is received,
  because there is some processing with high-resolution wheel events,
  the wheel event is injected into hidpp->input.

  And of course, when HID_QUIRK_INPUT_PER_APP is set, hidpp->input gets
  the keyboard node, which doesn't have wheel event type, and the events
  are ignored"

Reported-and-bisected-by: Mike Galbraith <efault@gmx.de>
Link: https://lore.kernel.org/all/CAHk-=wiUkQM3uheit2cNM0Y0OOY5qqspJgC8LkmOkJ2p2LDxcw@mail.gmail.com/
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-11-25 09:21:47 -08:00
..
amd-sfh-hid HID: amd_sfh: Switch to device-managed dmam_alloc_coherent() 2024-10-09 17:18:57 +02:00
bpf Revert "HID: bpf: allow write access to quirks field in struct hid_device" 2024-11-25 09:21:47 -08:00
i2c-hid Merge branch 'for-6.13/i2c-hid' into for-linus 2024-11-18 21:56:39 +01:00
intel-ish-hid Merge branch 'for-6.13/core' into for-linus 2024-11-18 21:58:55 +01:00
surface-hid move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
usbhid Merge branch 'for-6.13/core' into for-linus 2024-11-18 21:58:55 +01:00
.kunitconfig
Kconfig Merge branch 'for-6.13/corsair' into for-linus 2024-11-18 21:58:24 +01:00
Makefile Merge branch 'for-6.13/corsair' into for-linus 2024-11-18 21:58:24 +01:00
hid-a4tech.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-accutouch.c
hid-alps.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-apple.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-appleir.c
hid-asus.c HID: Fix typo in the comment 2024-10-08 08:53:49 +02:00
hid-aureal.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-axff.c
hid-belkin.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-betopff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-bigbenff.c HID: bigbenff: constify fixed up report descriptor 2024-09-05 16:20:56 +02:00
hid-cherry.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-chicony.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-cmedia.c HID: cmedia: constify fixed up report descriptor 2024-08-27 16:30:43 +02:00
hid-core.c Revert "HID: bpf: allow write access to quirks field in struct hid_device" 2024-11-25 09:21:47 -08:00
hid-corsair-void.c HID: corsair-void: Add Corsair Void headset family driver 2024-10-11 12:57:48 +02:00
hid-corsair.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-cougar.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-cp2112.c HID: replace BUG_ON() with WARN_ON() 2024-10-18 12:50:08 +02:00
hid-creative-sb0540.c
hid-cypress.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-debug.c HID: debug: Remove duplicates from 'keys' 2024-10-18 12:24:52 +02:00
hid-dr.c HID: dr: constify fixed up report descriptor 2024-09-05 16:20:56 +02:00
hid-elan.c
hid-elecom.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-elo.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-emsff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-evision.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-ezkey.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-ft260.c
hid-gaff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-gembird.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-generic.c Merge branch 'for-6.13/bpf' into for-linus 2024-11-18 22:02:17 +01:00
hid-gfrm.c
hid-glorious.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-goodix-spi.c HID: hid-goodix-spi: Add OF supports 2024-11-13 10:56:37 +01:00
hid-google-hammer.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-google-stadiaff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-gt683r.c
hid-gyration.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-holtek-kbd.c HID: holtek-kbd: constify fixed up report descriptor 2024-09-05 16:20:56 +02:00
hid-holtek-mouse.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-holtekff.c
hid-hyperv.c HID: hyperv: streamline driver probe to avoid devres issues 2024-11-12 10:15:30 +01:00
hid-icade.c
hid-ids.h Merge branch 'for-6.13/kysona' into for-linus 2024-11-18 21:53:30 +01:00
hid-input-test.c
hid-input.c HID: Ignore battery for all ELAN I2C-HID devices 2024-08-06 08:42:53 +02:00
hid-ite.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-jabra.c
hid-kensington.c HID: Fix spelling mistakes "Kensigton" -> "Kensington" 2024-07-12 18:28:03 +02:00
hid-keytouch.c HID: keytouch: constify fixed up report descriptor 2024-09-05 16:20:56 +02:00
hid-kye.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-kysona.c HID: Kysona: add basic online status 2024-10-18 12:28:40 +02:00
hid-lcpower.c HID: add more missing MODULE_DESCRIPTION() macros 2024-07-10 09:11:27 +02:00
hid-led.c
hid-lenovo.c HID: lenovo: Add support for Thinkpad X1 Tablet Gen 3 keyboard 2024-10-18 12:36:11 +02:00
hid-letsketch.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-lg-g15.c HID: lg-g15: add missing MODULE_DESCRIPTION() macro 2024-06-06 10:52:09 +02:00
hid-lg.c HID: lg: constify fixed up report descriptor 2024-09-06 10:06:02 +02:00
hid-lg.h
hid-lg2ff.c
hid-lg3ff.c HID: hid-lg3ff: remove unused struct lg3ff_device 2024-02-13 11:43:55 +01:00
hid-lg4ff.c HID: replace BUG_ON() with WARN_ON() 2024-10-18 12:50:08 +02:00
hid-lg4ff.h
hid-lgff.c
hid-logitech-dj.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-logitech-hidpp.c Merge branch 'for-6.13/core' into for-linus 2024-11-18 21:58:55 +01:00
hid-macally.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-magicmouse.c HID: magicmouse: Apple Magic Trackpad 2 USB-C driver support 2024-11-11 22:49:28 +01:00
hid-maltron.c HID: maltron: constify fixed up report descriptor 2024-09-05 16:20:56 +02:00
hid-mcp2200.c
hid-mcp2221.c HID: mcp2221: Remove unnecessary semicolon 2024-07-12 18:30:11 +02:00
hid-megaworld.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-mf.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-microsoft.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-monterey.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-multitouch.c HID: multitouch: make mt_set_mode() less cryptic 2024-11-18 21:49:47 +01:00
hid-nintendo.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-nti.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-ntrig.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-nvidia-shield.c HID: nvidia-shield: Add missing check for input_ff_create_memless 2024-05-23 14:17:22 +02:00
hid-ortek.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-penmount.c
hid-petalynx.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-picolcd.h
hid-picolcd_backlight.c HID: picoLCD: Use backlight power constants 2024-09-05 10:55:15 +02:00
hid-picolcd_cir.c
hid-picolcd_core.c - Fix-ups 2024-05-22 10:45:12 -07:00
hid-picolcd_debugfs.c
hid-picolcd_fb.c - Improved handling of LCD power states and interactions with the fbdev subsystem. 2024-11-22 16:29:57 -08:00
hid-picolcd_lcd.c HID: picoLCD: Replace check_fb in favor of struct fb_info.lcd_dev 2024-09-30 16:49:42 +01:00
hid-picolcd_leds.c
hid-pl.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-plantronics.c HID: plantronics: Workaround for an unexcepted opposite volume key 2024-10-08 08:45:17 +02:00
hid-playstation.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-primax.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-prodikeys.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-pxrc.c HID: pxrc: constify fixed up report descriptor 2024-09-05 16:20:57 +02:00
hid-quirks.c HID: Add quirk for Labtec/ODDOR/aikeec handbrake 2023-12-04 16:21:05 +01:00
hid-razer.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-redragon.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-retrode.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-rmi.c
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-isku.h
hid-roccat-kone.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-kone.h
hid-roccat-koneplus.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-koneplus.h
hid-roccat-konepure.c
hid-roccat-kovaplus.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-pyra.h
hid-roccat-ryos.c
hid-roccat-savu.c
hid-roccat-savu.h
hid-roccat.c
hid-saitek.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-samsung.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-semitek.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-sensor-custom.c HID: Fix typo in the comment 2024-10-08 08:53:49 +02:00
hid-sensor-hub.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-sigmamicro.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-sjoy.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-sony.c HID: replace BUG_ON() with WARN_ON() 2024-10-18 12:50:08 +02:00
hid-speedlink.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-steam.c HID: Fix typo in the comment 2024-10-08 08:53:49 +02:00
hid-steelseries.c HID: steelseries: Add capacity_level mapping 2024-11-06 15:10:32 +01:00
hid-sunplus.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-thrustmaster.c
hid-tivo.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-tmff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-topre.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-topseed.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-twinhan.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-u2fzero.c
hid-uclogic-core-test.c
hid-uclogic-core.c HID: uclogic: constify fixed up report descriptor 2024-09-05 16:20:57 +02:00
hid-uclogic-params-test.c
hid-uclogic-params.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-uclogic-params.h HID: uclogic: constify fixed up report descriptor 2024-09-05 16:20:57 +02:00
hid-uclogic-rdesc-test.c HID: uclogic: Avoid linking common code into multiple modules 2024-06-19 16:33:10 +02:00
hid-uclogic-rdesc.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-uclogic-rdesc.h HID: uclogic: constify fixed up report descriptor 2024-09-05 16:20:57 +02:00
hid-udraw-ps3.c
hid-viewsonic.c HID: viewsonic: constify fixed up report descriptor 2024-09-05 16:20:57 +02:00
hid-vivaldi-common.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-vivaldi-common.h
hid-vivaldi.c
hid-vrc2.c HID: vrc2: constify fixed up report descriptor 2024-09-05 16:20:57 +02:00
hid-waltop.c HID: waltop: constify fixed up report descriptor 2024-09-05 16:20:57 +02:00
hid-wiimote-core.c
hid-wiimote-debug.c
hid-wiimote-modules.c
hid-wiimote.h
hid-winwing.c HID: winwing: constify read-only structs 2024-08-27 18:25:53 +02:00
hid-xiaomi.c HID: xiaomi: constify fixed up report descriptor 2024-09-05 16:20:57 +02:00
hid-xinmo.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-zpff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-zydacron.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hidraw.c HID: hidraw: add HIDIOCREVOKE ioctl 2024-08-29 10:39:37 +02:00
uhid.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
wacom.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
wacom_sys.c HID: wacom: Do not register input devices until after hid_hw_start 2024-02-06 16:12:07 +01:00
wacom_wac.c Merge branch 'for-6.13/wacom' into for-linus 2024-11-18 21:29:33 +01:00
wacom_wac.h HID: wacom: Set eraser status when either 'Eraser' or 'Invert' usage is set 2024-10-18 12:48:35 +02:00