Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux_4_18: HID: core: fix grouping by application #46061

Merged
merged 1 commit into from Sep 5, 2018

Conversation

kalbasit
Copy link
Member

@kalbasit kalbasit commented Sep 4, 2018

Motivation for this change

This patch fixes #45165

commit f07b3c1da92d ("HID: generic: create one input report per
application type") was effectively the same as MULTI_INPUT:
hidinput->report was never set, so hidinput_match_application()
always returned null.

Fix that by testing against the real application.

Note that this breaks some old eGalax touchscreens that expect MULTI_INPUT
instead of HID_QUIRK_INPUT_PER_APP. Enable this quirk for backward
compatibility on all non-Win8 touchscreens.

link: https://bugzilla.kernel.org/show_bug.cgi?id=200847
link: https://bugzilla.kernel.org/show_bug.cgi?id=200849
link: https://bugs.archlinux.org/task/59699
link: #45165

Cc: stable@vger.kernel.org # v4.18+
Signed-off-by: Benjamin Tissoires benjamin.tissoires@redhat.com

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

cc @NeQuissimus

@kalbasit kalbasit changed the title [WIP] linux_4_18: HID: core: fix grouping by application linux_4_18: HID: core: fix grouping by application Sep 4, 2018
@kalbasit
Copy link
Member Author

kalbasit commented Sep 4, 2018

@GrahamcOfBorg build linux_4_18

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: linux_4_18

Partial log (click to expand)

wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
cannot find section .dynamic
/nix/store/xhb05k5q9j6g22g1i4l7q1cpsrnh85kh-linux-4.18.5

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: linux_4_18

Partial log (click to expand)

  CC [M]  drivers/usb/usbip/stub_dev.o
  CC [M]  drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.o
  CC [M]  drivers/usb/serial/sierra.o
  CC [M]  drivers/usb/usbip/stub_main.o
  CC [M]  drivers/staging/rtl8723bs/hal/odm.o
  CC [M]  drivers/usb/serial/usb-serial-simple.o
  CC [M]  drivers/usb/usbip/stub_rx.o
  CC [M]  drivers/usb/serial/spcp8x5.o
building of '/nix/store/j1wkjn2dhcyx62iqkgj2lg8wppivhb9k-linux-4.18.5.drv' timed out after 1800 seconds
error: build of '/nix/store/j1wkjn2dhcyx62iqkgj2lg8wppivhb9k-linux-4.18.5.drv' failed

@kalbasit kalbasit force-pushed the nixpkgs_fix-issue-45165 branch 2 times, most recently from 563ab47 to 9a9d396 Compare September 4, 2018 22:15
This patch fixes NixOS#45165

commit f07b3c1da92d ("HID: generic: create one input report per
application type") was effectively the same as MULTI_INPUT:
hidinput->report was never set, so hidinput_match_application()
always returned null.

Fix that by testing against the real application.

Note that this breaks some old eGalax touchscreens that expect MULTI_INPUT
instead of HID_QUIRK_INPUT_PER_APP. Enable this quirk for backward
compatibility on all non-Win8 touchscreens.

link: https://bugzilla.kernel.org/show_bug.cgi?id=200847
link: https://bugzilla.kernel.org/show_bug.cgi?id=200849
link: https://bugs.archlinux.org/task/59699
link: NixOS#45165

Cc: stable@vger.kernel.org # v4.18+
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
patch = fetchpatch {
name = name + ".patch";
# https://patchwork.kernel.org/patch/10587369/
url = https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git/patch/?id=0d6c3011409135ea84e2a231b013a22017ff999a;
Copy link
Member Author

@kalbasit kalbasit Sep 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch can be fetched through either https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git/patch/?id=0d6c3011409135ea84e2a231b013a22017ff999a or https://patchwork.kernel.org/patch/10587369/raw/ I'm not sure which one is better to use here as I'm afraid the patchwork link might change over time, and I'm not sure this direct commit link will remain available. The checksum of the URLs differs due to the change in the comments in the header of the patch. @NeQuissimus thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're unsure, just bring the patch into the tree, so we have a local versions. I would imagine the git.kernel.org version to be the preferable solution, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NeQuissimus How about we push it as is for now? It should land in an upstream release soon anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: linux_4_18

Partial log (click to expand)

wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
cannot find section .dynamic
/nix/store/3rm6q01fxx377gbjbqshad3ivrjimzbv-linux-4.18.5

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: linux_4_18

Partial log (click to expand)

  CC      drivers/cpuidle/sysfs.o
  CC      drivers/cpuidle/poll_state.o
  AR      drivers/cpuidle/built-in.a
  CC [M]  drivers/crypto/cavium/nitrox/nitrox_main.o
  CC [M]  drivers/crypto/cavium/nitrox/nitrox_isr.o
  CC [M]  drivers/crypto/cavium/nitrox/nitrox_lib.o
  CC [M]  drivers/crypto/cavium/nitrox/nitrox_hal.o
  CC [M]  drivers/crypto/cavium/nitrox/nitrox_reqmgr.o
building of '/nix/store/07jpgxrj0dv5d5pvndnzbvpj8mrz7j1x-linux-4.18.5.drv' timed out after 3600 seconds
error: build of '/nix/store/07jpgxrj0dv5d5pvndnzbvpj8mrz7j1x-linux-4.18.5.drv' failed

@NeQuissimus
Copy link
Member

@grahamc Is the 1800s timeout a hard limit? Needs a good amount of steam to build a kernel in 30 mins :D

@kalbasit
Copy link
Member Author

kalbasit commented Sep 4, 2018

@NeQuissimus it's controlled by the package's meta, See Chromium. We can probably increase it to a few hours in a separate PR.

EDIT: It should probably be done here.

@NeQuissimus
Copy link
Member

Ah, good find, did not know about this!

@NeQuissimus NeQuissimus merged commit 107de74 into NixOS:master Sep 5, 2018
@kalbasit
Copy link
Member Author

kalbasit commented Sep 5, 2018

@NeQuissimus I filed #46073 for increasing the timeout.

@kalbasit kalbasit deleted the nixpkgs_fix-issue-45165 branch September 5, 2018 00:12
@NeQuissimus
Copy link
Member

I saw :D

@kalbasit
Copy link
Member Author

kalbasit commented Sep 5, 2018

nice! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

linuxPackages_4_18 mouse pointer does not move when using USB mouse
3 participants