From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: "Oleg Makarenko" <oleg@makarenk.ooo>,
"Oliver Roundtree" <oroundtree1@gmail.com>,
"Ryno Kotzé" <lemon.xah@gmail.com>,
"Jiri Kosina" <jkosina@suse.com>,
"Sasha Levin" <sashal@kernel.org>
Subject: [PATCH 6.12.y 4/4] HID: pidff: Use correct effect type in effect update
Date: Fri, 17 Jul 2026 15:24:03 -0400 [thread overview]
Message-ID: <20260717192403.2131944-4-sashal@kernel.org> (raw)
In-Reply-To: <20260717192403.2131944-1-sashal@kernel.org>
From: Oleg Makarenko <oleg@makarenk.ooo>
[ Upstream commit b251598b8bf37300510868f739a79e07800d41ce ]
When updating an existing effect, the effect type from the last created
effect was sent to the device instead of the updated one.
This caused incorrect reports when a game creates multiple different
effects and updates only one that is not the last created.
Fixes FFB in multiple games that create multiple simultaneous effects
(Forza Horizon 5/6).
Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices")
Cc: stable@vger.kernel.org
Tested-by: Oliver Roundtree <oroundtree1@gmail.com>
Co-developed-by: Ryno Kotzé <lemon.xah@gmail.com>
Signed-off-by: Ryno Kotzé <lemon.xah@gmail.com>
Signed-off-by: Oleg Makarenko <oleg@makarenk.ooo>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/usbhid/hid-pidff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c
index 2dfe44de4c4c74..0e653b104b5259 100644
--- a/drivers/hid/usbhid/hid-pidff.c
+++ b/drivers/hid/usbhid/hid-pidff.c
@@ -460,7 +460,7 @@ static void pidff_set_effect_report(struct pidff_device *pidff,
pidff->set_effect[PID_EFFECT_BLOCK_INDEX].value[0] =
pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0];
pidff->set_effect_type->value[0] =
- pidff->create_new_effect_type->value[0];
+ pidff_get_effect_type_id(pidff, effect);
pidff_set_duration(&pidff->set_effect[PID_DURATION],
effect->replay.length);
--
2.53.0
prev parent reply other threads:[~2026-07-17 19:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 14:55 FAILED: patch "[PATCH] HID: pidff: Use correct effect type in effect update" failed to apply to 6.12-stable tree gregkh
2026-07-17 19:24 ` [PATCH 6.12.y 1/4] HID: pidff: Fix missing blank lines after declarations Sasha Levin
2026-07-17 19:24 ` [PATCH 6.12.y 2/4] HID: pidff: Add missing spaces Sasha Levin
2026-07-17 19:24 ` [PATCH 6.12.y 3/4] HID: pidff: Rework pidff_upload_effect Sasha Levin
2026-07-17 19:24 ` Sasha Levin [this message]
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=20260717192403.2131944-4-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=jkosina@suse.com \
--cc=lemon.xah@gmail.com \
--cc=oleg@makarenk.ooo \
--cc=oroundtree1@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox