Restore imon mce default proto modparam

Signed-off-by: Jarod Wilson <jarod@redhat.com>
This commit is contained in:
Jarod Wilson 2011-01-10 15:24:58 -05:00
parent f0f13be684
commit 49ee500dd9
2 changed files with 60 additions and 2 deletions

View File

@ -0,0 +1,52 @@
From: Jarod Wilson <jarod@redhat.com>
Date: Sat, 23 Oct 2010 14:54:06 -0400
Subject: [PATCH] imon: add back modparam for default protocol
The latest imon devices support both imon and mce remotes, but we
default to using the imon native protocol. Upstream, ir-keytable
can be used to change protocol and upload the mce keytable, but it
isn't functional with the input layer interfaces in 2.6.35. As a
work-around for now, add back a modparam so people can have the
driver load the mce keytable by default.
Note, this patch won't be going upstream. Upstream, we're moving
towards all keytables being in userspace, uploaded at driver init
time by ir-keytable (triggered by udev events).
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
drivers/media/rc/imon.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
Index: linux-2.6.35.x86_64/drivers/media/rc/imon.c
===================================================================
--- linux-2.6.35.x86_64.orig/drivers/media/rc/imon.c
+++ linux-2.6.35.x86_64/drivers/media/rc/imon.c
@@ -328,6 +328,17 @@ MODULE_PARM_DESC(pad_stabilize, "Apply s
"presses in arrow key mode. 0=disable, 1=enable (default).");
/*
+ * The latest imon devices support both imon and mce remotes, but we default
+ * to using the imon native protocol. Rather than require people to have and
+ * run ir-keytable to switch every module load, they can add mce=1 to their
+ * modparams to default to mce/rc6 instead.
+ */
+static bool mce;
+module_param(mce, bool, S_IRUGO);
+MODULE_PARM_DESC(mce, "Configure for mce/rc6 protocol instead of imon native, "
+ "if supported: 0=no, 1=yes (default: no)");
+
+/*
* In certain use cases, mouse mode isn't really helpful, and could actually
* cause confusion, so allow disabling it when the IR device is open.
*/
@@ -1851,6 +1862,9 @@ static struct rc_dev *imon_init_rdev(str
imon_set_display_type(ictx);
+ if (mce && ((rdev->allowed_protos & RC_TYPE_RC6) == RC_TYPE_RC6))
+ ictx->rc_type = RC_TYPE_RC6;
+
if (ictx->rc_type == RC_TYPE_RC6)
rdev->map_name = RC_MAP_IMON_MCE;
else

View File

@ -48,7 +48,7 @@ Summary: The Linux kernel
# reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec).
# scripts/rebase.sh should be made to do that for you, actually.
#
%global baserelease 76
%global baserelease 77
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -723,6 +723,7 @@ Patch2899: linux-2.6-v4l-dvb-update.patch
Patch2900: linux-2.6-v4l-dvb-fixes.patch
Patch2901: linux-2.6-v4l-dvb-experimental.patch
Patch2917: hdpvr-ir-enable.patch
Patch2918: imon-default-proto-modparam.patch
Patch2950: linux-2.6-via-velocity-dma-fix.patch
@ -1432,6 +1433,9 @@ ApplyOptionalPatch linux-2.6-v4l-dvb-update.patch
ApplyOptionalPatch linux-2.6-v4l-dvb-fixes.patch
ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch
# one-off non-upstream patch, since ir-keytable doesn't work yet
ApplyPatch imon-default-proto-modparam.patch
# bz #575873
ApplyPatch flexcop-fix-xlate_proc_name-warning.patch
@ -2120,9 +2124,11 @@ fi
# and build.
%changelog
* Mon Jan 10 2011 Jarod Wilson <jarod@redhat.com>
* Mon Jan 10 2011 Jarod Wilson <jarod@redhat.com> 2.6.35.10-77
- Add support for local rebuild config option overrides
- Add missing --with/--without pae build flag support
- Restore imon mce default proto modparam, since ir-keytable currently
won't work with the 2.6.35.x input layer ioctls
* Mon Jan 10 2011 Chuck Ebbert <cebbert@redhat.com>
- CVE-2010-4668: kernel panic with 0-length IOV