Skip to contentSkip to conversation

HID: sony: fix RB3 Pro full report poke timer on 32-bit

PATCH New Sanjay Govind 1 participant 1 message Nov 15 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: sony: fix RB3 Pro full report poke timer on 32-bit

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

---

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(-)
drivers/hid/hid-sony.c +1 -1
index 50f5ad6bbeb4..8f19d3cc73b1 100644
@@ -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)) {
Signature · 1 line
2.56.0