summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@fedoraproject.org>2016-01-29 15:21:39 -0500
committerJosh Boyer <jwboyer@fedoraproject.org>2016-01-29 15:21:49 -0500
commit8d728edd00f4b1920dce4fbf10509ea14a4a0312 (patch)
tree9ee18ef32f5c3f02fc74bd80da1a877a5984565a
parent51a47249db335b16750a3a702808530ba0c01d4b (diff)
downloadkernel-8d728edd00f4b1920dce4fbf10509ea14a4a0312.tar.gz
kernel-8d728edd00f4b1920dce4fbf10509ea14a4a0312.tar.xz
kernel-8d728edd00f4b1920dce4fbf10509ea14a4a0312.zip
Backport HID sony patch to fix some gamepads (rhbz 1255235)
-rw-r--r--HID-sony-do-not-bail-out-when-the-sixaxis-refuses-th.patch49
-rw-r--r--kernel.spec6
2 files changed, 55 insertions, 0 deletions
diff --git a/HID-sony-do-not-bail-out-when-the-sixaxis-refuses-th.patch b/HID-sony-do-not-bail-out-when-the-sixaxis-refuses-th.patch
new file mode 100644
index 000000000..b1a789e84
--- /dev/null
+++ b/HID-sony-do-not-bail-out-when-the-sixaxis-refuses-th.patch
@@ -0,0 +1,49 @@
+From 954d6154959c8c196fa4b89fc98a4fb377c6a38d Mon Sep 17 00:00:00 2001
+From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Date: Fri, 8 Jan 2016 17:58:49 +0100
+Subject: [PATCH] HID: sony: do not bail out when the sixaxis refuses the
+ output report
+
+When setting the operational mode, some third party (Speedlink Strike-FX)
+gamepads refuse the output report. Failing here means we refuse to
+initialize the gamepad while this should be harmless.
+
+The weird part is that the initial commit that added this: a7de9b8
+("HID: sony: Enable Gasia third-party PS3 controllers") mentions this
+very same controller as one requiring this output report.
+Anyway, it's broken for one user at least, so let's change it.
+We will report an error, but at least the controller should work.
+
+And no, these devices present themselves as legacy Sony controllers
+(VID:PID of 054C:0268, as in the official ones) so there are no ways
+of discriminating them from the official ones.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1255325
+
+Reported-and-tested-by: Max Fedotov <thesourcehim@gmail.com>
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+---
+ drivers/hid/hid-sony.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
+index 661f94f8ab8b..11f91c0c2458 100644
+--- a/drivers/hid/hid-sony.c
++++ b/drivers/hid/hid-sony.c
+@@ -1411,8 +1411,10 @@ static int sixaxis_set_operational_usb(struct hid_device *hdev)
+ }
+
+ ret = hid_hw_output_report(hdev, buf, 1);
+- if (ret < 0)
+- hid_err(hdev, "can't set operational mode: step 3\n");
++ if (ret < 0) {
++ hid_info(hdev, "can't set operational mode: step 3, ignoring\n");
++ ret = 0;
++ }
+
+ out:
+ kfree(buf);
+--
+2.5.0
+
diff --git a/kernel.spec b/kernel.spec
index 9567bea9a..7ff9d8c78 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -631,6 +631,9 @@ Patch643: media-ivtv-avoid-going-past-input-audio-array.patch
Patch644: wext-fix-message-delay-ordering.patch
Patch645: cfg80211-wext-fix-message-ordering.patch
+#rhbz 1255325
+Patch646: HID-sony-do-not-bail-out-when-the-sixaxis-refuses-th.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -2074,6 +2077,9 @@ fi
#
#
%changelog
+* Fri Jan 29 2016 Josh Boyer <jwboyer@fedoraproject.org>
+- Backport HID sony patch to fix some gamepads (rhbz 1255235)
+
* Thu Jan 28 2016 Josh Boyer <jwboyer@fedoraproject.org>
- Fix issues with ivtv driver on PVR350 devices (rhbz 1278942)
- Add patches to fix suprious NEWLINK netlink messages (rhbz 1302037)