From: Greg Kroah-Hartman Date: Sat, 18 Sep 2010 17:58:18 +0000 (-0700) Subject: .27 patches X-Git-Tag: v2.6.27.54~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=594a932286719bce1b70712ae461041ba643dfa7;p=thirdparty%2Fkernel%2Fstable-queue.git .27 patches --- diff --git a/queue-2.6.27/apm_power-add-missing-break-statement.patch b/queue-2.6.27/apm_power-add-missing-break-statement.patch new file mode 100644 index 00000000000..0ff6f973787 --- /dev/null +++ b/queue-2.6.27/apm_power-add-missing-break-statement.patch @@ -0,0 +1,30 @@ +From 1d220334d6a8a711149234dc5f98d34ae02226b8 Mon Sep 17 00:00:00 2001 +From: Anton Vorontsov +Date: Wed, 8 Sep 2010 00:10:26 +0400 +Subject: apm_power: Add missing break statement + +From: Anton Vorontsov + +commit 1d220334d6a8a711149234dc5f98d34ae02226b8 upstream. + +The missing break statement causes wrong capacity calculation for +batteries that report energy. + +Reported-by: d binderman +Signed-off-by: Anton Vorontsov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/power/apm_power.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/power/apm_power.c ++++ b/drivers/power/apm_power.c +@@ -233,6 +233,7 @@ static int calculate_capacity(enum apm_s + empty_design_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN; + now_prop = POWER_SUPPLY_PROP_ENERGY_NOW; + avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG; ++ break; + case SOURCE_VOLTAGE: + full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX; + empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN; diff --git a/queue-2.6.27/hwmon-f75375s-do-not-overwrite-values-read-from-registers.patch b/queue-2.6.27/hwmon-f75375s-do-not-overwrite-values-read-from-registers.patch new file mode 100644 index 00000000000..2161d5cea3a --- /dev/null +++ b/queue-2.6.27/hwmon-f75375s-do-not-overwrite-values-read-from-registers.patch @@ -0,0 +1,42 @@ +From c3b327d60bbba3f5ff8fd87d1efc0e95eb6c121b Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Fri, 17 Sep 2010 17:24:12 +0200 +Subject: hwmon: (f75375s) Do not overwrite values read from registers + +From: Guillem Jover + +commit c3b327d60bbba3f5ff8fd87d1efc0e95eb6c121b upstream. + +All bits in the values read from registers to be used for the next +write were getting overwritten, avoid doing so to not mess with the +current configuration. + +Signed-off-by: Guillem Jover +Cc: Riku Voipio +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/f75375s.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/hwmon/f75375s.c ++++ b/drivers/hwmon/f75375s.c +@@ -298,7 +298,7 @@ static int set_pwm_enable_direct(struct + return -EINVAL; + + fanmode = f75375_read8(client, F75375_REG_FAN_TIMER); +- fanmode = ~(3 << FAN_CTRL_MODE(nr)); ++ fanmode &= ~(3 << FAN_CTRL_MODE(nr)); + + switch (val) { + case 0: /* Full speed */ +@@ -350,7 +350,7 @@ static ssize_t set_pwm_mode(struct devic + + mutex_lock(&data->update_lock); + conf = f75375_read8(client, F75375_REG_CONFIG1); +- conf = ~(1 << FAN_CTRL_LINEAR(nr)); ++ conf &= ~(1 << FAN_CTRL_LINEAR(nr)); + + if (val == 0) + conf |= (1 << FAN_CTRL_LINEAR(nr)) ; diff --git a/queue-2.6.27/hwmon-f75375s-shift-control-mode-to-the-correct-bit-position.patch b/queue-2.6.27/hwmon-f75375s-shift-control-mode-to-the-correct-bit-position.patch new file mode 100644 index 00000000000..f8cb520bd77 --- /dev/null +++ b/queue-2.6.27/hwmon-f75375s-shift-control-mode-to-the-correct-bit-position.patch @@ -0,0 +1,33 @@ +From 96f3640894012be7dd15a384566bfdc18297bc6c Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Fri, 17 Sep 2010 17:24:11 +0200 +Subject: hwmon: (f75375s) Shift control mode to the correct bit position + +From: Guillem Jover + +commit 96f3640894012be7dd15a384566bfdc18297bc6c upstream. + +The spec notes that fan0 and fan1 control mode bits are located in bits +7-6 and 5-4 respectively, but the FAN_CTRL_MODE macro was making the +bits shift by 5 instead of by 4. + +Signed-off-by: Guillem Jover +Cc: Riku Voipio +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/f75375s.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/hwmon/f75375s.c ++++ b/drivers/hwmon/f75375s.c +@@ -79,7 +79,7 @@ I2C_CLIENT_INSMOD_2(f75373, f75375); + #define F75375_REG_PWM2_DROP_DUTY 0x6C + + #define FAN_CTRL_LINEAR(nr) (4 + nr) +-#define FAN_CTRL_MODE(nr) (5 + ((nr) * 2)) ++#define FAN_CTRL_MODE(nr) (4 + ((nr) * 2)) + + /* + * Data structures and manipulation thereof diff --git a/queue-2.6.27/series b/queue-2.6.27/series index a36e6f51b8e..315c66d024c 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -5,4 +5,7 @@ irda-off-by-one.patch bounce-call-flush_dcache_page-after-bounce_copy_vec.patch x86-64-compat-test-rax-for-the-syscall-number-not-eax.patch compat-make-compat_alloc_user_space-incorporate-the-access_ok.patch +hwmon-f75375s-shift-control-mode-to-the-correct-bit-position.patch +hwmon-f75375s-do-not-overwrite-values-read-from-registers.patch +apm_power-add-missing-break-statement.patch x86-64-compat-retruncate-rax-after-ia32-syscall-entry-tracing.patch