[kernel/f15] Revert 2.6.38.8 patch that broke magicmouse (#714381)

Chuck Ebbert cebbert at fedoraproject.org
Fri Jun 24 12:52:33 UTC 2011


commit 1412b6df72a6ad0c7c51310c119dcb28d5b80d78
Author: Chuck Ebbert <cebbert at redhat.com>
Date:   Fri Jun 24 08:53:02 2011 -0400

    Revert 2.6.38.8 patch that broke magicmouse (#714381)

 ...e-ignore-ivalid-report-id-while-switching.patch |   53 ++++++++++++++++++++
 kernel.spec                                        |    8 ++-
 2 files changed, 59 insertions(+), 2 deletions(-)
---
diff --git a/hid-magicmouse-ignore-ivalid-report-id-while-switching.patch b/hid-magicmouse-ignore-ivalid-report-id-while-switching.patch
new file mode 100644
index 0000000..db1b483
--- /dev/null
+++ b/hid-magicmouse-ignore-ivalid-report-id-while-switching.patch
@@ -0,0 +1,53 @@
+From 23746a66d7d9e73402c68ef00d708796b97ebd72 Mon Sep 17 00:00:00 2001
+From: Jiri Kosina <jkosina at suse.cz>
+Date: Thu, 19 May 2011 17:58:07 +0200
+Subject: HID: magicmouse: ignore 'ivalid report id' while switching
+ modes
+
+From: Jiri Kosina <jkosina at suse.cz>
+
+commit 23746a66d7d9e73402c68ef00d708796b97ebd72 upstream.
+
+The device reponds with 'invalid report id' when feature report switching it
+into multitouch mode is sent to it.
+
+This has been silently ignored before 0825411ade ("HID: bt: Wait for ACK
+on Sent Reports"), but since this commit, it propagates -EIO from the _raw
+callback .
+
+So let the driver ignore -EIO as response to 0xd7,0x01 report, as that's
+how the device reacts in normal mode.
+
+Sad, but following reality.
+
+This fixes https://bugzilla.kernel.org/show_bug.cgi?id=35022
+
+Tested-by: Chase Douglas <chase.douglas at canonical.com>
+Signed-off-by: Jiri Kosina <jkosina at suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+
+---
+ drivers/hid/hid-magicmouse.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/hid/hid-magicmouse.c
++++ b/drivers/hid/hid-magicmouse.c
+@@ -501,9 +501,17 @@ static int magicmouse_probe(struct hid_d
+ 	}
+ 	report->size = 6;
+ 
++	/*
++	 * The device reponds with 'invalid report id' when feature
++	 * report switching it into multitouch mode is sent to it.
++	 *
++	 * This results in -EIO from the _raw low-level transport callback,
++	 * but there seems to be no other way of switching the mode.
++	 * Thus the super-ugly hacky success check below.
++	 */
+ 	ret = hdev->hid_output_raw_report(hdev, feature, sizeof(feature),
+ 			HID_FEATURE_REPORT);
+-	if (ret != sizeof(feature)) {
++	if (ret != -EIO) {
+ 		hid_err(hdev, "unable to request touch data (%d)\n", ret);
+ 		goto err_stop_hw;
+ 	}
diff --git a/kernel.spec b/kernel.spec
index cf07879..98d3330 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -649,6 +649,8 @@ Patch394: linux-2.6-acpi-debug-infinite-loop.patch
 
 Patch450: linux-2.6-input-kill-stupid-messages.patch
 Patch452: linux-2.6.30-no-pcspkr-modalias.patch
+# revert 2.6.38.8 patch that broke magicmouse
+Patch453: hid-magicmouse-ignore-ivalid-report-id-while-switching.patch
 
 Patch460: linux-2.6-serial-460800.patch
 
@@ -1309,12 +1311,13 @@ ApplyPatch hda_intel-prealloc-4mb-dmabuffer.patch
 # Misc fixes
 # The input layer spews crap no-one cares about.
 ApplyPatch linux-2.6-input-kill-stupid-messages.patch
+ApplyPatch linux-2.6.30-no-pcspkr-modalias.patch
+# Revert 2.6.38.8 patch that broke magicmouse
+ApplyPatch hid-magicmouse-ignore-ivalid-report-id-while-switching.patch -R
 
 # stop floppy.ko from autoloading during udev...
 ApplyPatch die-floppy-die.patch
 
-ApplyPatch linux-2.6.30-no-pcspkr-modalias.patch
-
 # Allow to use 480600 baud on 16C950 UARTs
 ApplyPatch linux-2.6-serial-460800.patch
 
@@ -2045,6 +2048,7 @@ fi
   fix potential oops introduced in 2.6.38.8
 - ahci-add-another-pci-id-for-marvell.patch (#705960)
 - CVE-2011-2183: ksm: race between ksmd and exiting task
+- Revert 2.6.38.8 patch that broke magicmouse (#714381)
 
 * Thu Jun 23 2011 Dave Airlie <airlied at redhat.com> 2.6.38.8-34
 - drm-i915-snb-irq-stalls-fix.patch: fix Sandybridge IRQ stalls


More information about the scm-commits mailing list