Re: [PATCH] HID: nintendo: fix rumble starved by the input report cadence gate

[email protected] Sat, 01 Aug 2026 09:16:19 +0000
Newsgroups org.kernel.vger.linux-input
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Premature registration of input device before capabilities are fully configured.
--

--- Patch [1]: [PATCH] HID: nintendo: fix rumble starved by the input report cadence gate ---
commit b0ec0e9322fbf2a41d6005445efd2343b058fb43
Author: Alexandre Derumier <[email protected]>

    HID: nintendo: fix rumble starved by the input report cadence gate

    Rumble on third-party controllers speaking the Switch protocol is weak
    and intermittent over bluetooth, and absent on some units. This commit
    adds a fallback to the legacy subcommand throttle when the controller
    fails to meet the strict cadence requirements.

> [ ... ]

This is a pre-existing issue, but looking at joycon_input_create() in
drivers/hid/hid-nintendo.c:

drivers/hid/hid-nintendo.c:joycon_input_create() {
...
	ret = input_register_device(ctlr->input);
	if (ret)
		return ret;

	if (joycon_type_is_right_joycon(ctlr)) {
		joycon_config_right_stick(ctlr->input);
		joycon_config_buttons(ctlr->input, right_joycon_button_mappings);
...
}

[Severity: High]
Does this code register the input device before its capabilities (such as
buttons, axes, and force-feedback) are fully configured?

Registering before configuration completes can lead to undersized event
buffers and incorrect udev or Wayland classification since the capabilities
are checked at registration time.

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1