* [GIT PULL] HID for 6.13
@ 2024-11-18 21:16 Jiri Kosina
2024-11-18 22:37 ` Jiri Kosina
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Jiri Kosina @ 2024-11-18 21:16 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Benjamin Tissoires, linux-kernel
Linus,
please pull from
git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-linus-2024111801
to receive HID subsystem queue for 6.13 merge window.
Please note: there is one SHA that you might notice was not present in
linux-next, and that's e8a0581914bd ("HID: multitouch: make mt_set_mode()
less cryptic").
The reason for this is that there was a hiccup when merging this patch
originally, and the topic branch was based on some random state of the
for-next branch, so it contained a lot of unrelated churn. And I've
noticed that only now, when preparing the pull request. The end result is
identical on a code level, but I didn't want to send you the branch with
git merge history that makes no sense [1], so I've created [2] instead,
and that's the one present in this pull request.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.13/multitouch
Highlights:
=====
- improvement of the way hid-bpf coexists with specific drivers
(others than hid-generic) that are already bound to devices (Benjamin
Tissoires)
- removal of three way-too-aggressive BUG_ON()s from HID drivers (He
Lugang)
- assorted cleanups and small code fixes to HID core (Dmitry Torokhov, Yan
Zhen, Nathan Chancellor, Andy Shevchenko)
- support for Corsair Void headset family (Stuart Hayhurst)
- Support for Goodix GT7986U SPI (Charles Wang)
- initial vendor-specific driver for Kysona, currently adding support for
Kysona M600 (Lode Willems)
- other assorted code cleanups and small bugfixes all over the place
=====
Thanks!
----------------------------------------------------------------
Andy Shevchenko (1):
HID: debug: Remove duplicates from 'keys'
Bastien Nocera (3):
HID: logitech-hidpp: Remove feature_type from hidpp_root_get_feature()
HID: steelseries: Fix battery requests stopping after some time
HID: steelseries: Add capacity_level mapping
Benjamin Tissoires (12):
HID: bpf: move HID-BPF report descriptor fixup earlier
HID: core: save one kmemdup during .probe()
HID: core: remove one more kmemdup on .probe()
HID: bpf: allow write access to quirks field in struct hid_device
selftests/hid: add dependency on hid_common.h
selftests/hid: cleanup C tests by adding a common struct uhid_device
selftests/hid: allow to parametrize bus/vid/pid/rdesc on the test device
HID: add per device quirk to force bind to hid-generic
selftests/hid: add test for assigning a given device to hid-generic
HID: bpf: Fix NKRO on Mistel MD770
HID: bpf: Fix Rapoo M50 Plus Silent side buttons
HID: bpf: drop use of Logical|Physical|UsageRange
Callahan Kovacs (1):
HID: magicmouse: Apple Magic Trackpad 2 USB-C driver support
Charles Wang (4):
HID: hid-goodix: Return 0 when receiving an empty HID feature package
HID: hid-goodix: Fix HID get/set feature operation overwritten problem
dt-bindings: input: Goodix GT7986U SPI HID Touchscreen
HID: hid-goodix-spi: Add OF supports
Dmitry Torokhov (4):
HID: simplify code in fetch_item()
HID: simplify snto32()
HID: stop exporting hid_snto32()
HID: multitouch: make mt_set_mode() less cryptic
Erick Archer (1):
HID: ishtp-hid-client: replace fake-flex arrays with flex-array members
He Lugang (1):
HID: replace BUG_ON() with WARN_ON()
Jason Gerecke (2):
HID: wacom: Set eraser status when either 'Eraser' or 'Invert' usage is set
HID: wacom: Interpret tilt data from Intuos Pro BT as signed values
Lode Willems (4):
HID: Add IDs for Kysona
HID: Kysona: Add basic battery reporting for Kysona M600
HID: Kysona: check battery status every 5s using a workqueue
HID: Kysona: add basic online status
Nathan Chancellor (1):
HID: Remove default case statement in fetch_item()
Stuart Hayhurst (1):
HID: corsair-void: Add Corsair Void headset family driver
Uwe Kleine-König (1):
HID: i2c-hid-of: Drop explicit initialization of struct i2c_device_id::driver_data to 0
Vincent Huang (1):
HID: rmi: Add select RMI4_F3A in Kconfig
Vitaly Kuznetsov (1):
HID: hyperv: streamline driver probe to avoid devres issues
Yan Zhen (1):
HID: Fix typo in the comment
Zhang Lixu (1):
HID: intel-ish-hid: Add firmware version sysfs attributes
.../ABI/testing/sysfs-driver-hid-corsair-void | 38 +
.../bindings/input/goodix,gt7986u-spifw.yaml | 69 ++
drivers/hid/Kconfig | 13 +
drivers/hid/Makefile | 3 +-
drivers/hid/bpf/hid_bpf_dispatch.c | 9 +-
drivers/hid/bpf/hid_bpf_struct_ops.c | 1 +
drivers/hid/bpf/progs/Huion__Dial-2.bpf.c | 66 +-
drivers/hid/bpf/progs/Huion__Inspiroy-2-S.bpf.c | 60 +-
drivers/hid/bpf/progs/Mistel__MD770.bpf.c | 154 ++++
drivers/hid/bpf/progs/Rapoo__M50-Plus-Silent.bpf.c | 148 ++++
drivers/hid/bpf/progs/hid_report_helpers.h | 36 +-
drivers/hid/hid-asus.c | 2 +-
drivers/hid/hid-core.c | 182 +++--
drivers/hid/hid-corsair-void.c | 829 +++++++++++++++++++++
drivers/hid/hid-cp2112.c | 3 +-
drivers/hid/hid-debug.c | 9 +-
drivers/hid/hid-generic.c | 3 +
drivers/hid/hid-goodix-spi.c | 35 +-
drivers/hid/hid-hyperv.c | 58 +-
drivers/hid/hid-ids.h | 5 +
drivers/hid/hid-kysona.c | 248 ++++++
drivers/hid/hid-lg4ff.c | 3 +-
drivers/hid/hid-logitech-hidpp.c | 74 +-
drivers/hid/hid-magicmouse.c | 56 +-
drivers/hid/hid-multitouch.c | 30 +-
drivers/hid/hid-picolcd_fb.c | 2 +-
drivers/hid/hid-sensor-custom.c | 2 +-
drivers/hid/hid-sony.c | 3 +-
drivers/hid/hid-steam.c | 2 +-
drivers/hid/hid-steelseries.c | 19 +-
drivers/hid/i2c-hid/i2c-hid-of.c | 6 +-
drivers/hid/intel-ish-hid/ipc/pci-ish.c | 45 ++
drivers/hid/intel-ish-hid/ishtp-fw-loader.c | 2 +-
drivers/hid/intel-ish-hid/ishtp-hid-client.c | 25 +-
drivers/hid/intel-ish-hid/ishtp-hid.h | 11 +-
drivers/hid/intel-ish-hid/ishtp/client.c | 2 +-
drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h | 12 +
drivers/hid/intel-ish-hid/ishtp/loader.c | 35 +-
drivers/hid/intel-ish-hid/ishtp/loader.h | 34 +
drivers/hid/usbhid/hid-core.c | 2 +-
drivers/hid/wacom_wac.c | 11 +-
drivers/hid/wacom_wac.h | 2 +-
include/linux/hid.h | 21 +-
include/linux/hid_bpf.h | 11 +-
tools/testing/selftests/hid/Makefile | 2 +-
tools/testing/selftests/hid/hid_bpf.c | 151 ++--
tools/testing/selftests/hid/hid_common.h | 112 ++-
tools/testing/selftests/hid/hidraw.c | 36 +-
tools/testing/selftests/hid/progs/hid.c | 12 +
.../testing/selftests/hid/progs/hid_bpf_helpers.h | 6 +-
50 files changed, 2288 insertions(+), 412 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-corsair-void
create mode 100644 Documentation/devicetree/bindings/input/goodix,gt7986u-spifw.yaml
create mode 100644 drivers/hid/bpf/progs/Mistel__MD770.bpf.c
create mode 100644 drivers/hid/bpf/progs/Rapoo__M50-Plus-Silent.bpf.c
create mode 100644 drivers/hid/hid-corsair-void.c
create mode 100644 drivers/hid/hid-kysona.c
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-18 21:16 [GIT PULL] HID for 6.13 Jiri Kosina
@ 2024-11-18 22:37 ` Jiri Kosina
2024-11-20 22:56 ` pr-tracker-bot
2024-11-22 20:13 ` Linus Torvalds
2 siblings, 0 replies; 13+ messages in thread
From: Jiri Kosina @ 2024-11-18 22:37 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Benjamin Tissoires, linux-kernel
On Mon, 18 Nov 2024, Jiri Kosina wrote:
> Linus,
>
> please pull from
>
> git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-linus-2024111801
>
> to receive HID subsystem queue for 6.13 merge window.
>
> Please note: there is one SHA that you might notice was not present in
> linux-next, and that's e8a0581914bd ("HID: multitouch: make mt_set_mode()
> less cryptic").
>
> The reason for this is that there was a hiccup when merging this patch
> originally, and the topic branch was based on some random state of the
> for-next branch, so it contained a lot of unrelated churn. And I've
> noticed that only now, when preparing the pull request. The end result is
> identical on a code level, but I didn't want to send you the branch with
> git merge history that makes no sense [1], so I've created [2] instead,
> and that's the one present in this pull request.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.13/multitouch
[2] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-6.13/multitouch-v2
is of course the missing reference.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-18 21:16 [GIT PULL] HID for 6.13 Jiri Kosina
2024-11-18 22:37 ` Jiri Kosina
@ 2024-11-20 22:56 ` pr-tracker-bot
2024-11-22 20:13 ` Linus Torvalds
2 siblings, 0 replies; 13+ messages in thread
From: pr-tracker-bot @ 2024-11-20 22:56 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Linus Torvalds, Benjamin Tissoires, linux-kernel
The pull request you sent on Mon, 18 Nov 2024 22:16:01 +0100 (CET):
> git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-linus-2024111801
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/b57807cbbf36f17448cdb42e69a949aa76605440
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-18 21:16 [GIT PULL] HID for 6.13 Jiri Kosina
2024-11-18 22:37 ` Jiri Kosina
2024-11-20 22:56 ` pr-tracker-bot
@ 2024-11-22 20:13 ` Linus Torvalds
2024-11-22 20:23 ` Jiri Kosina
` (2 more replies)
2 siblings, 3 replies; 13+ messages in thread
From: Linus Torvalds @ 2024-11-22 20:13 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Benjamin Tissoires, linux-kernel
On Mon, 18 Nov 2024 at 13:16, Jiri Kosina <jikos@kernel.org> wrote:
>
> please pull from
>
> git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-linus-2024111801
>
> to receive HID subsystem queue for 6.13 merge window.
Hmm. There's something odd going on here. My mouse scroll-wheel
stopped working (Logitech MX Anywhere 3), and this pull would look
like the prime suspect.
The mouse otherwise works, so it's not that the mouse isn't found,
it's literally just the scroll-wheel functionality that doesn't work.
Oddly enough, if I remove and re-insert the Logitech wireless dongle,
the scroll wheel works again. So it's not some kind of complete
breakage - but it also wasn't a one-time fluke thing, in that it
happened twice in a row when rebooting into a new kernel.
Any ideas? Does this make anybody go "Hmm, maybe ..."
Linus
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-22 20:13 ` Linus Torvalds
@ 2024-11-22 20:23 ` Jiri Kosina
2024-11-23 16:42 ` Benjamin Tissoires
2024-11-24 8:01 ` Mike Galbraith
2 siblings, 0 replies; 13+ messages in thread
From: Jiri Kosina @ 2024-11-22 20:23 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Benjamin Tissoires, linux-kernel
On Fri, 22 Nov 2024, Linus Torvalds wrote:
> > please pull from
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-linus-2024111801
> >
> > to receive HID subsystem queue for 6.13 merge window.
>
> Hmm. There's something odd going on here. My mouse scroll-wheel
> stopped working (Logitech MX Anywhere 3), and this pull would look
> like the prime suspect.
>
> The mouse otherwise works, so it's not that the mouse isn't found,
> it's literally just the scroll-wheel functionality that doesn't work.
>
> Oddly enough, if I remove and re-insert the Logitech wireless dongle,
> the scroll wheel works again. So it's not some kind of complete
> breakage - but it also wasn't a one-time fluke thing, in that it
> happened twice in a row when rebooting into a new kernel.
>
> Any ideas? Does this make anybody go "Hmm, maybe ..."
Interesting, in this round the only patch to the Logitech driver
(fb6c0583a1435) should really be pretty much nop, so it might be something
slightly more subtle.
How do
/proc/bus/input/devices
and
/sys/kernel/debug/hid/<device>/rdesc
entries look like for this device in working and non-working case? Are
they the same?
Does scrolling the wheel produce any output in
cat /sys/kernel/debug/hid/<device>/events
?
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-22 20:13 ` Linus Torvalds
2024-11-22 20:23 ` Jiri Kosina
@ 2024-11-23 16:42 ` Benjamin Tissoires
2024-11-23 17:17 ` Linus Torvalds
2024-11-24 8:01 ` Mike Galbraith
2 siblings, 1 reply; 13+ messages in thread
From: Benjamin Tissoires @ 2024-11-23 16:42 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Jiri Kosina, linux-kernel
On Nov 22 2024, Linus Torvalds wrote:
> On Mon, 18 Nov 2024 at 13:16, Jiri Kosina <jikos@kernel.org> wrote:
> >
> > please pull from
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-linus-2024111801
> >
> > to receive HID subsystem queue for 6.13 merge window.
>
> Hmm. There's something odd going on here. My mouse scroll-wheel
> stopped working (Logitech MX Anywhere 3), and this pull would look
> like the prime suspect.
>
> The mouse otherwise works, so it's not that the mouse isn't found,
> it's literally just the scroll-wheel functionality that doesn't work.
>
> Oddly enough, if I remove and re-insert the Logitech wireless dongle,
> the scroll wheel works again. So it's not some kind of complete
> breakage - but it also wasn't a one-time fluke thing, in that it
> happened twice in a row when rebooting into a new kernel.
>
> Any ideas? Does this make anybody go "Hmm, maybe ..."
>
IMO the suspect might be 526748b925185e95f1415900ee13c2469d4b64cc.
My idea is that if you reboot without completely stopping the pc the
mouse stays connected in the "high res" wheel mode which hid-multitouch
can not handle. However I don't think the bolt receiver is supported in
either hid-logitech-dj.ko nor hid-logitech-hidpp.ko.
In addition to Jiri's requests, could you also post the dmesg after the
fresh (and broken) reboot, and after unplug/replug the dongle? We would
get more information on to which kernel modules are involved this way.
Cheers,
Benjamin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-23 16:42 ` Benjamin Tissoires
@ 2024-11-23 17:17 ` Linus Torvalds
2024-11-23 19:05 ` Benjamin Tissoires
0 siblings, 1 reply; 13+ messages in thread
From: Linus Torvalds @ 2024-11-23 17:17 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: Jiri Kosina, linux-kernel
On Sat, 23 Nov 2024 at 08:42, Benjamin Tissoires <bentiss@kernel.org> wrote:
>
> IMO the suspect might be 526748b925185e95f1415900ee13c2469d4b64cc.
I'll try reverting it when I have more time (which is probably end of
next week.. merge window).
> In addition to Jiri's requests, could you also post the dmesg after the
> fresh (and broken) reboot, and after unplug/replug the dongle? We would
> get more information on to which kernel modules are involved this way.
All I get for a unplug/replug is
usb 5-4.2.2: USB disconnect, device number 10
usb 5-4.2.2: new full-speed USB device number 11 using xhci_hcd
usb 5-4.2.2: New USB device found, idVendor=046d, idProduct=c52b,
bcdDevice=24.11
usb 5-4.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 5-4.2.2: Product: USB Receiver
usb 5-4.2.2: Manufacturer: Logitech
and then
logitech-djreceiver 0003:046D:C52B.0019: hiddev100,hidraw9: USB HID
v1.11 Device [Logitech USB Receiver] on usb-0000:46:00.1-4.2.2/input2
input: Logitech MX Anywhere 3 as
/devices/pci0000:40/0000:40:01.1/0000:41:00.0/0000:42:08.0/0000:46:00.1/usb5/5-4/5-4.2/5-4.2.2/5-4.2.2:1.2/0003:046D:C52B.0019/0003:046D:4090.001A/input/input36
logitech-hidpp-device 0003:046D:4090.001A: input,hidraw10: USB HID
v1.11 Mouse [Logitech MX Anywhere 3] on
usb-0000:46:00.1-4.2.2/input2:1
logitech-hidpp-device 0003:046D:4090.001A: HID++ 4.5 device connected.
but doing some grepping, at bootup time I also see a line line
hid-generic 0003:046D:4090.000E: input,hidraw10: USB HID v1.11 Mouse
[Logitech Wireless Device PID:4090] on usb-0000:46:00.1-4.2.2/input2:1
which does not happen at replug. There's a few other boot-time
messages that seem to be about module init stuff too, ie
input: Logitech USB Receiver as /devices/...
input: Logitech USB Receiver Mouse as /devices/...
input: Logitech USB Receiver Consumer Control as /devices/...
input: Logitech USB Receiver System Control as /devices/...
input: Logitech Wireless Device PID:4090 Mouse as /devices/...
and that only happens once and then never again. Some module loading
thing? I have
CONFIG_HID=y
CONFIG_HID_BATTERY_STRENGTH=y
CONFIG_HIDRAW=y
CONFIG_HID_GENERIC=y
but then the Logitech part is modules:
CONFIG_HID_LOGITECH=m
CONFIG_HID_LOGITECH_DJ=m
CONFIG_HID_LOGITECH_HIDPP=m
which I think is all normal (ie I have my own local config, but that
part matches the default distro kernel config)
Linus
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-23 17:17 ` Linus Torvalds
@ 2024-11-23 19:05 ` Benjamin Tissoires
2024-11-23 19:58 ` Linus Torvalds
0 siblings, 1 reply; 13+ messages in thread
From: Benjamin Tissoires @ 2024-11-23 19:05 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Jiri Kosina, linux-kernel
On Nov 23 2024, Linus Torvalds wrote:
> On Sat, 23 Nov 2024 at 08:42, Benjamin Tissoires <bentiss@kernel.org> wrote:
> >
> > IMO the suspect might be 526748b925185e95f1415900ee13c2469d4b64cc.
>
> I'll try reverting it when I have more time (which is probably end of
> next week.. merge window).
No need to bother with this one then, because your receiver is the
0xc52b, which is the old (and well known) unifying receiver, when this
commit touches teh bolt receiver, which is 0xc548. So a revert would
have no impact.
>
> > In addition to Jiri's requests, could you also post the dmesg after the
> > fresh (and broken) reboot, and after unplug/replug the dongle? We would
> > get more information on to which kernel modules are involved this way.
>
> All I get for a unplug/replug is
>
> usb 5-4.2.2: USB disconnect, device number 10
> usb 5-4.2.2: new full-speed USB device number 11 using xhci_hcd
> usb 5-4.2.2: New USB device found, idVendor=046d, idProduct=c52b,
> bcdDevice=24.11
> usb 5-4.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> usb 5-4.2.2: Product: USB Receiver
> usb 5-4.2.2: Manufacturer: Logitech
>
> and then
>
> logitech-djreceiver 0003:046D:C52B.0019: hiddev100,hidraw9: USB HID
> v1.11 Device [Logitech USB Receiver] on usb-0000:46:00.1-4.2.2/input2
> input: Logitech MX Anywhere 3 as
> /devices/pci0000:40/0000:40:01.1/0000:41:00.0/0000:42:08.0/0000:46:00.1/usb5/5-4/5-4.2/5-4.2.2/5-4.2.2:1.2/0003:046D:C52B.0019/0003:046D:4090.001A/input/input36
> logitech-hidpp-device 0003:046D:4090.001A: input,hidraw10: USB HID
> v1.11 Mouse [Logitech MX Anywhere 3] on
> usb-0000:46:00.1-4.2.2/input2:1
> logitech-hidpp-device 0003:046D:4090.001A: HID++ 4.5 device connected.
>
> but doing some grepping, at bootup time I also see a line line
>
> hid-generic 0003:046D:4090.000E: input,hidraw10: USB HID v1.11 Mouse
> [Logitech Wireless Device PID:4090] on usb-0000:46:00.1-4.2.2/input2:1
What would be interesting to know is if the line
logitech-hidpp-device 0003:046D:4090.001A: HID++ 4.5 device connected.
ever happens on a fresh reboot (before the unplus/replug).
Anyway, this confirms my theory that the mouse wheel is set to high
resolution mode by the previous boot and that the next one (using
hid-generic) is actually not handling properly: I bet that if you scroll
long enough in the same direction (can't remember exactly the actual
multiplier) you'll eventually get one scroll event. Not convenient I
agree :)
>
> which does not happen at replug. There's a few other boot-time
> messages that seem to be about module init stuff too, ie
>
> input: Logitech USB Receiver as /devices/...
> input: Logitech USB Receiver Mouse as /devices/...
> input: Logitech USB Receiver Consumer Control as /devices/...
> input: Logitech USB Receiver System Control as /devices/...
> input: Logitech Wireless Device PID:4090 Mouse as /devices/...
>
> and that only happens once and then never again. Some module loading
> thing? I have
>
> CONFIG_HID=y
> CONFIG_HID_BATTERY_STRENGTH=y
> CONFIG_HIDRAW=y
> CONFIG_HID_GENERIC=y
>
> but then the Logitech part is modules:
>
> CONFIG_HID_LOGITECH=m
> CONFIG_HID_LOGITECH_DJ=m
> CONFIG_HID_LOGITECH_HIDPP=m
>
> which I think is all normal (ie I have my own local config, but that
> part matches the default distro kernel config)
>
Yep all normal.
The problem seems to be that hid-generic is not letting
hid-logitech-hidpp taking over (or that the driver is not properly
loaded at boot time once the disk is ready). I have some suspicions on
some core changes I made in hid-core for handling a new quirk, but I
should be able to reproduce next week with all of that information.
Sorry for the trouble.
Cheers,
Benjamin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-23 19:05 ` Benjamin Tissoires
@ 2024-11-23 19:58 ` Linus Torvalds
0 siblings, 0 replies; 13+ messages in thread
From: Linus Torvalds @ 2024-11-23 19:58 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: Jiri Kosina, linux-kernel
On Sat, 23 Nov 2024 at 11:05, Benjamin Tissoires <bentiss@kernel.org> wrote:
>
> What would be interesting to know is if the line
>
> logitech-hidpp-device 0003:046D:4090.001A: HID++ 4.5 device connected.
>
> ever happens on a fresh reboot (before the unplus/replug).
It does happen, at boot too, although it happens a bit later:
[ 4.905196] input: Logitech USB Receiver Mouse as /devices/...
[ 4.905276] input: Logitech USB Receiver Consumer Control as /devices/...
[ 4.956062] input: Logitech USB Receiver System Control as /devices/...
...
[ 5.265096] input: Logitech MX Anywhere 3 Mouse as /devices/..
...
[ 24.330052] logitech-hidpp-device 0003:046D:4090.000E: HID++ 4.5
device connected.
while at unplug/replug it happens immediately.
The bootup delay isn't because this is a horribly slow machine, it's
probably me typing in the encrypted disk password etc, so there's at
least 10s due to that, but there's probably other boot time stuff
going on too.
In the systemd logs, that HID++ comes within a second after
systemd[1]: Reached target graphical.target - Graphical Interface.
so I suspect it has something to do with X (or Wayland, I guess)
opening the mouse device?
> Anyway, this confirms my theory that the mouse wheel is set to high
> resolution mode by the previous boot and that the next one (using
> hid-generic) is actually not handling properly: I bet that if you scroll
> long enough in the same direction (can't remember exactly the actual
> multiplier) you'll eventually get one scroll event. Not convenient I
> agree :)
Yeah, that doesn't sound like a great user experience, but might match
what I see. I just didn't scroll enough.
> The problem seems to be that hid-generic is not letting
> hid-logitech-hidpp taking over (or that the driver is not properly
> loaded at boot time once the disk is ready). I have some suspicions on
> some core changes I made in hid-core for handling a new quirk, but I
> should be able to reproduce next week with all of that information.
Thanks,
Linus
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-22 20:13 ` Linus Torvalds
2024-11-22 20:23 ` Jiri Kosina
2024-11-23 16:42 ` Benjamin Tissoires
@ 2024-11-24 8:01 ` Mike Galbraith
2024-11-25 2:01 ` Mike Galbraith
2024-11-25 14:08 ` Benjamin Tissoires
2 siblings, 2 replies; 13+ messages in thread
From: Mike Galbraith @ 2024-11-24 8:01 UTC (permalink / raw)
To: Linus Torvalds, Jiri Kosina; +Cc: Benjamin Tissoires, linux-kernel
On Fri, 2024-11-22 at 12:13 -0800, Linus Torvalds wrote:
> On Mon, 18 Nov 2024 at 13:16, Jiri Kosina <jikos@kernel.org> wrote:
> >
> > please pull from
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-linus-2024111801
> >
> > to receive HID subsystem queue for 6.13 merge window.
>
> Hmm. There's something odd going on here. My mouse scroll-wheel
> stopped working (Logitech MX Anywhere 3), and this pull would look
> like the prime suspect.
>
> The mouse otherwise works, so it's not that the mouse isn't found,
> it's literally just the scroll-wheel functionality that doesn't work.
>
> Oddly enough, if I remove and re-insert the Logitech wireless dongle,
> the scroll wheel works again. So it's not some kind of complete
> breakage - but it also wasn't a one-time fluke thing, in that it
> happened twice in a row when rebooting into a new kernel.
>
> Any ideas? Does this make anybody go "Hmm, maybe ..."
No, but my M215 had the same issue, it bisected to 6fd47effe92b, and
revert via patch confirmed it.
-Mike
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-24 8:01 ` Mike Galbraith
@ 2024-11-25 2:01 ` Mike Galbraith
2024-11-25 14:08 ` Benjamin Tissoires
1 sibling, 0 replies; 13+ messages in thread
From: Mike Galbraith @ 2024-11-25 2:01 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: Linus Torvalds, Jiri Kosina, linux-kernel
On Sun, 2024-11-24 at 09:01 +0100, Mike Galbraith wrote:
> On Fri, 2024-11-22 at 12:13 -0800, Linus Torvalds wrote:
> >
> > Any ideas? Does this make anybody go "Hmm, maybe ..."
>
> No, but my M215 had the same issue, it bisected to 6fd47effe92b, and
> revert via patch confirmed it.
Hopefully useful diag.
[ 3.769593] hid-generic 0003:046D:C52B.0003: HID-BPF toggled quirks on the device: 0800
[ 3.892715] hid-generic 0003:046D:C52B.0004: HID-BPF toggled quirks on the device: 0800
[ 3.895211] hid-generic 0003:046D:C52B.0005: HID-BPF toggled quirks on the device: 0800
[ 4.193277] hid-generic 0003:046D:401B.0006: HID-BPF toggled quirks on the device: 0800
[ 4.604769] hid-generic 0003:046D:4016.0007: HID-BPF toggled quirks on the device: 0800
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 81d6c734c8bc..3ae0eef2bb9b 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2710,6 +2710,18 @@ static int __hid_device_probe(struct hid_device *hdev, struct hid_driver *hdrv)
if (quirks ^ hdev->quirks)
hid_info(hdev, "HID-BPF toggled quirks on the device: %04x",
quirks ^ hdev->quirks);
+ } else {
+ unsigned int quirks = hid_lookup_quirk(hdev);
+
+ /*
+ * hdev->bpf_rsize became non-zero above, quirks set to 0, and we're
+ * back with quirks = HID_QUIRK_INPUT_PER_APP.. which terrifies mice?
+ */
+ if (quirks ^ hdev->quirks) {
+ hid_info(hdev, "HID-BPF toggled quirks on the device: %04x",
+ quirks ^ hdev->quirks);
+ hdev->quirks = quirks;
+ }
}
if (!hid_check_device_match(hdev, hdrv, &id))
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-24 8:01 ` Mike Galbraith
2024-11-25 2:01 ` Mike Galbraith
@ 2024-11-25 14:08 ` Benjamin Tissoires
2024-11-25 17:20 ` Linus Torvalds
1 sibling, 1 reply; 13+ messages in thread
From: Benjamin Tissoires @ 2024-11-25 14:08 UTC (permalink / raw)
To: Mike Galbraith, Linus Torvalds; +Cc: Jiri Kosina, linux-kernel
On Nov 24 2024, Mike Galbraith wrote:
> On Fri, 2024-11-22 at 12:13 -0800, Linus Torvalds wrote:
> > On Mon, 18 Nov 2024 at 13:16, Jiri Kosina <jikos@kernel.org> wrote:
> > >
> > > please pull from
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git tags/hid-for-linus-2024111801
> > >
> > > to receive HID subsystem queue for 6.13 merge window.
> >
> > Hmm. There's something odd going on here. My mouse scroll-wheel
> > stopped working (Logitech MX Anywhere 3), and this pull would look
> > like the prime suspect.
> >
> > The mouse otherwise works, so it's not that the mouse isn't found,
> > it's literally just the scroll-wheel functionality that doesn't work.
> >
> > Oddly enough, if I remove and re-insert the Logitech wireless dongle,
> > the scroll wheel works again. So it's not some kind of complete
> > breakage - but it also wasn't a one-time fluke thing, in that it
> > happened twice in a row when rebooting into a new kernel.
> >
> > Any ideas? Does this make anybody go "Hmm, maybe ..."
>
> No, but my M215 had the same issue, it bisected to 6fd47effe92b, and
> revert via patch confirmed it.
>
Thanks a lot for the bisect (and the logs in the followup message).
I was puzzled at first but after a few tests today I think I found out
the reason (I'll detail it below).
So I am currently contemplating 3 options:
1. just revert 6fd47effe92b (and e14e0eaeb040, the matching selftests
addition), quick and easy, and postpone the inclusion of a fixed
6fd47effe92b in 6.14
2. try to generically fix 6fd47effe92b (in hid-core), but it will likely
won't be done today as I'm just back from sick leave and have 3 weeks of
pending emails to process too and this requires some more brain than
just a "let's try this"
3. fix hid-logitech-hidpp as it assumes it can only have one input per
node attached to it (again, not easy as probably some testing is
required).
So, Linus, depending on how much annoying this bug is for you, feel free
to revert 6fd47effe92b right now in your tree or wait a few more days
for me to find an appropriate fix for 2. or 3.
---
Reason of this bug:
The idea of 6fd47effe92b, 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 2
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.
---
Clearly, hid-logitech-hidpp would require a fix too, but OTOH, it might
not be the only driver confused by an extra quirk being set depending of
if hid-generic ever handled the device or not.
So the more I think of it, the more the revert makes sense to me.
Please tell me if you want me to send the revert or if you'll just apply
it yourself.
Cheers,
Benjamin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL] HID for 6.13
2024-11-25 14:08 ` Benjamin Tissoires
@ 2024-11-25 17:20 ` Linus Torvalds
0 siblings, 0 replies; 13+ messages in thread
From: Linus Torvalds @ 2024-11-25 17:20 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: Mike Galbraith, Jiri Kosina, linux-kernel
On Mon, 25 Nov 2024 at 06:08, Benjamin Tissoires <bentiss@kernel.org> wrote:
>
> Please tell me if you want me to send the revert or if you'll just apply
> it yourself.
I might as well just revert it myself since I see the problem on my machine.
Linus
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-11-25 17:21 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-18 21:16 [GIT PULL] HID for 6.13 Jiri Kosina
2024-11-18 22:37 ` Jiri Kosina
2024-11-20 22:56 ` pr-tracker-bot
2024-11-22 20:13 ` Linus Torvalds
2024-11-22 20:23 ` Jiri Kosina
2024-11-23 16:42 ` Benjamin Tissoires
2024-11-23 17:17 ` Linus Torvalds
2024-11-23 19:05 ` Benjamin Tissoires
2024-11-23 19:58 ` Linus Torvalds
2024-11-24 8:01 ` Mike Galbraith
2024-11-25 2:01 ` Mike Galbraith
2024-11-25 14:08 ` Benjamin Tissoires
2024-11-25 17:20 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox