]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 May 2013 16:38:50 +0000 (09:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 May 2013 16:38:50 +0000 (09:38 -0700)
added patches:
cpufreq-longhaul-disable-driver-by-default.patch

queue-3.4/cpufreq-longhaul-disable-driver-by-default.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/cpufreq-longhaul-disable-driver-by-default.patch b/queue-3.4/cpufreq-longhaul-disable-driver-by-default.patch
new file mode 100644 (file)
index 0000000..7abd245
--- /dev/null
@@ -0,0 +1,56 @@
+From b5811bc469c0dbebb4f947800b9b234a9c0a68dc Mon Sep 17 00:00:00 2001
+From: Rafał Bilski <rafalbilski@interia.pl>
+Date: Sat, 15 Dec 2012 00:45:02 +0100
+Subject: cpufreq / Longhaul: Disable driver by default
+
+From: Rafał Bilski <rafalbilski@interia.pl>
+
+commit b5811bc469c0dbebb4f947800b9b234a9c0a68dc upstream.
+
+This is only solution I can think of. User decides if he wants this
+driver on his machine. I don't have enough knowledge and time to find
+the reason why same code works on some machines and doesn't on others
+which use the same, or very similar, chipset and processor.
+
+Signed-off-by: Rafał Bilski <rafalbilski@interia.pl>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/cpufreq/longhaul.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/cpufreq/longhaul.c
++++ b/drivers/cpufreq/longhaul.c
+@@ -77,7 +77,7 @@ static unsigned int longhaul_index;
+ static int scale_voltage;
+ static int disable_acpi_c3;
+ static int revid_errata;
+-
++static int enable;
+ /* Clock ratios multiplied by 10 */
+ static int mults[32];
+@@ -965,6 +965,10 @@ static int __init longhaul_init(void)
+       if (!x86_match_cpu(longhaul_id))
+               return -ENODEV;
++      if (!enable) {
++              printk(KERN_ERR PFX "Option \"enable\" not set. Aborting.\n");
++              return -ENODEV;
++      }
+ #ifdef CONFIG_SMP
+       if (num_online_cpus() > 1) {
+               printk(KERN_ERR PFX "More than 1 CPU detected, "
+@@ -1021,6 +1025,10 @@ MODULE_PARM_DESC(scale_voltage, "Scale v
+  * such. */
+ module_param(revid_errata, int, 0644);
+ MODULE_PARM_DESC(revid_errata, "Ignore CPU Revision ID");
++/* By default driver is disabled to prevent incompatible
++ * system freeze. */
++module_param(enable, int, 0644);
++MODULE_PARM_DESC(enable, "Enable driver");
+ MODULE_AUTHOR("Dave Jones <davej@redhat.com>");
+ MODULE_DESCRIPTION("Longhaul driver for VIA Cyrix processors.");
index e4c1f404cfab57cbad55aa75a5b45a9e8488b5c0..e16c18f4e0231ce17eb254cb6bf3b73431c11ec8 100644 (file)
@@ -8,3 +8,4 @@ xhci-don-t-warn-on-empty-ring-for-suspended-devices.patch
 ipvs-ip_vs_sip_fill_param-bug-bad-check-of-return-value.patch
 ext4-add-check-for-inodes_count-overflow-in-new-resize-ioctl.patch
 r8169-fix-8168evl-frame-padding.patch
+cpufreq-longhaul-disable-driver-by-default.patch