mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Benjamin Tissoires <bentiss@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jiri Kosina <jikos@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] HID for 6.13
Date: Mon, 25 Nov 2024 03:01:02 +0100	[thread overview]
Message-ID: <e3142efe46edaced3e50c1dc1ea99bd970551209.camel@gmx.de> (raw)
In-Reply-To: <ac800b7930c473f2653d9bdc5be0781a08d8bb58.camel@gmx.de>

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))


  reply	other threads:[~2024-11-25  2:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 21:16 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 [this message]
2024-11-25 14:08     ` Benjamin Tissoires
2024-11-25 17:20       ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3142efe46edaced3e50c1dc1ea99bd970551209.camel@gmx.de \
    --to=efault@gmx.de \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®