From: Mark Pariente <markpariente@gmail.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: "Filipe Laíns" <lains@riseup.net>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, "Mark Pariente" <markpariente@gmail.com>
Subject: [PATCH v2 1/2] HID: logitech-dj: Don't add Unifying devices from HID++ notifications
Date: Sun, 18 Oct 2026 16:26:53 -0700 [thread overview]
Message-ID: <20261018232654.70571-2-markpariente@gmail.com> (raw)
In-Reply-To: <20261018232654.70571-1-markpariente@gmail.com>
Unifying receivers (recvr_type_dj) announce paired devices through DJ
"device paired" notifications, which carry the full bitmask of reports
the device supports. Before commit 74808f9115ce ("HID: logitech-dj: add
support for non unifying receivers"), HID++ reports for a slot without
a known device were dropped. That commit made HID++ 0x41 "device
connected" notifications for such slots create the device instead, so
that non-DJ receivers, which do not send DJ pairing notifications, can
be supported. This also applies to Unifying receivers.
For Unifying receivers this produces a broken device. The HID++
notification only identifies the device type, and
logi_hidpp_dev_conn_notif_equad() only sets reports for keyboards and
mice. Unifying trackballs, touchpads, numpads and presenters get an
empty report descriptor, so no driver can bind to them, and keyboards
with a built-in touchpad such as the K400 lose their mouse reports.
Since the slot is then populated, the correct DJ pairing notification
for it is ignored until the receiver is unplugged.
This happens whenever such a notification arrives for a slot the driver
does not know about yet, for example after the receiver was probed
while a KVM switch had focus on another host, or after a device was
paired while the receiver was switched away. HID++ connect
notifications are sent when a device reconnects, and when userspace
(e.g. Solaar on startup) asks the receiver to re-announce its devices.
On Unifying receivers, queue the unknown-device work instead, which
enumerates the paired devices through DJ notifications.
Fixes: 74808f9115ce ("HID: logitech-dj: add support for non unifying receivers")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Mark Pariente <markpariente@gmail.com>
---
drivers/hid/hid-logitech-dj.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 6e8db01d27ec..383c762c503f 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -1766,7 +1766,13 @@ static int logi_dj_hidpp_event(struct hid_device *hdev,
if (dj_dev) {
logi_dj_recv_forward_report(dj_dev, data, size);
} else {
- if (hidpp_report->sub_id == REPORT_TYPE_NOTIF_DEVICE_CONNECTED)
+ /*
+ * DJ receivers announce devices through DJ pairing
+ * notifications, which carry the full list of supported
+ * reports, so query those instead.
+ */
+ if (djrcv_dev->type != recvr_type_dj &&
+ hidpp_report->sub_id == REPORT_TYPE_NOTIF_DEVICE_CONNECTED)
logi_hidpp_recv_queue_notif(hdev, hidpp_report);
else
logi_dj_recv_queue_unknown_work(djrcv_dev);
--
2.56.0
next prev parent reply other threads:[~2026-10-18 23:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 22:46 [PATCH] HID: logitech-dj: Re-announce connected devices on reset-resume Mark Pariente
2026-10-18 23:02 ` sashiko-bot
2026-10-18 23:31 ` Mark R. Pariente
2026-10-18 23:26 ` [PATCH v2 0/2] HID: logitech-dj: Restore device configuration after reset-resume Mark Pariente
2026-10-18 23:26 ` Mark Pariente [this message]
2026-10-18 23:26 ` [PATCH v2 2/2] HID: logitech-dj: Re-announce connected devices on reset-resume Mark Pariente
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=20261018232654.70571-2-markpariente@gmail.com \
--to=markpariente@gmail.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=lains@riseup.net \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.