From: Sanjay Govind <sanjay.govind9@gmail.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: Rosalie Wanders <rosalie@mailbox.org>,
Brenton Simpson <appsforartists@google.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Sanjay Govind <sanjay.govind9@gmail.com>
Subject: [PATCH] HID: sony: fix RB3 Pro full report poke timer on 32-bit
Date: Sun, 15 Nov 2026 16:05:06 +1300 [thread overview]
Message-ID: <20261115030505.633497-2-sanjay.govind9@gmail.com> (raw)
Rock Band 3 Pro instruments need a feature request before they send full
reports, and rb3_pro_instrument_raw_event() rate limits that request
with time_after(jiffies, sc->rb3_pro_poke_jiffies). sony_probe()
initialises rb3_pro_poke_jiffies to 0 so that the first navigation
report triggers the request.
jiffies starts at INITIAL_JIFFIES, which on 32-bit kernels is
-300 * HZ. time_after(jiffies, 0) is therefore false until jiffies
wraps five minutes after boot, so an instrument connected during that
time stays in navigation-only mode until then. 64-bit kernels are not
affected, as INITIAL_JIFFIES is positive there.
Initialise rb3_pro_poke_jiffies to the current jiffies instead, so the
request is sent as soon as navigation reports arrive after probe,
regardless of the jiffies value.
Fixes: 7245b0017d12 ("HID: sony: add support for more instruments")
Signed-off-by: Sanjay Govind <sanjay.govind9@gmail.com>
---
Notes:
Reported by the Sashiko AI review bot as a pre-existing issue while
reviewing "HID: sony: fix sleeping in atomic context in RB3 Pro raw
event handler". Built with W=1 on x86_64. The 32-bit early boot case
was found by reading include/linux/jiffies.h and was not reproduced.
The fix and changelog were written with the help of an AI coding
assistant (Claude Opus 5.5).
drivers/hid/hid-sony.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 50f5ad6bbeb4..8f19d3cc73b1 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2392,7 +2392,7 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
}
if (sc->quirks & RB3_PRO_INSTRUMENT)
- sc->rb3_pro_poke_jiffies = 0;
+ sc->rb3_pro_poke_jiffies = jiffies;
if (sc->quirks & (GHL_GUITAR_PS3WIIU | GHL_GUITAR_PS4)) {
if (!hid_is_usb(hdev)) {
--
2.56.0
reply other threads:[~2026-11-15 3:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261115030505.633497-2-sanjay.govind9@gmail.com \
--to=sanjay.govind9@gmail.com \
--cc=appsforartists@google.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rosalie@mailbox.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