Bug 14340 - speedstep-ich driver not working in 2.6.31
Summary: speedstep-ich driver not working in 2.6.31
Alias: None
Product: Power Management
Classification: Unclassified
Component: cpufreq (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: cpufreq
: 14492 (view as bug list)
Depends on:
Blocks: 13615
  Show dependency tree
Reported: 2009-10-07 08:16 UTC by dave.mueller
Modified: 2011-07-30 06:39 UTC (History)
5 users (show)

See Also:
Kernel Version: 2.6.31
Regression: Yes
Bisected commit-id:

Patch to fix regression (Use correct parameter for speedstep_get_frequency() call) (563 bytes, patch)
2009-10-10 08:41 UTC, dave.mueller
Details | Diff

Description dave.mueller 2009-10-07 08:16:26 UTC
It looks like commit 394122ab144dae4b276d74644a2f11c44a60ac5c broke the speedstep-ich driver.

The problem seems to be that speedstep-lib.c:speedstep_get_frequency() is called with a wrong value as "processor" parameter by the code below, resulting in a return value of 0. The "processor" parameter should be the value returned by "speedstep_detect_processor()"

static void get_freq_data(void *_data)
        struct get_freq_data *data = _data;

        data->speed = speedstep_get_frequency(data->processor);
Comment 1 dave.mueller 2009-10-10 08:41:09 UTC
Created attachment 23325 [details]
Patch to fix regression (Use correct parameter for speedstep_get_frequency() call)

Tested on IBM ThinkPad T23
Comment 2 Éric Piel 2009-10-13 13:50:50 UTC
This is a regression from 2.6.30 -> 2.6.31, so I'm cc'ing Rafael.

Thanks Dave for reporting and writing a path, I think one of my laptops was also affected (I'll try to find so time to check this solves the regression here as well).
Comment 3 Rafael J. Wysocki 2009-10-13 20:26:24 UTC
Handled-By : Eric Pielbug <e.a.b.piel@tudelft.nl>
Patch : http://bugzilla.kernel.org/attachment.cgi?id=23325
Comment 4 Andrew Morton 2009-10-13 21:33:45 UTC
Thanks, but please don't send patches via bugzilla in the future - it's a huge pita and I basically had to type everything in myself.

Always email, please.
Comment 5 Rafael J. Wysocki 2009-10-26 17:25:23 UTC
Handled-By : Rusty Russell <rusty@rustcorp.com.au>
Patch : http://patchwork.kernel.org/patch/54672/
Comment 6 Rafael J. Wysocki 2009-10-26 17:26:00 UTC
Ignore-Patch : http://bugzilla.kernel.org/attachment.cgi?id=23325
Comment 7 Rafael J. Wysocki 2009-10-27 21:03:23 UTC
*** Bug 14492 has been marked as a duplicate of this bug. ***
Comment 8 Joerg-Volker Peetz 2009-10-28 10:24:19 UTC
Thank you all for working on this regression and thank you to leading me to this bug report.
The patch of Dave Mueller fixed the problem and speedstep-ich is working again.
The patch of Rusty Russell alone doesn't solve the problem.
Comment 9 dave.mueller 2009-10-28 18:13:43 UTC
Unfortunately the communication thread here is incomplete, so most probably you are missing the 1st part of Rusty Russell' patch (http://patchwork.kernel.org/patch/54671/).
Comment 10 Rafael J. Wysocki 2009-10-28 18:32:25 UTC
Patch : http://patchwork.kernel.org/patch/54671/
Comment 11 Joerg-Volker Peetz 2009-10-28 19:28:47 UTC
Thank you Dave for the clarification.
This patch http://patchwork.kernel.org/patch/54671/ of Rusty Russell indeed works.
Comment 12 Len Brown 2011-07-30 06:39:57 UTC
closed by:

commit 8dca15e40889e5d5e9655b03ba79c26200f760ce
Author: Rusty Russell <rusty@rustcorp.com.au>
Date:   Mon Nov 2 23:35:30 2009 -0800

    [CPUFREQ] speedstep-ich: fix error caused by 394122ab144dae4b276d74644a2f11c44a60ac5c
    "[CPUFREQ] cpumask: avoid playing with cpus_allowed in speedstep-ich.c"
    changed the code to mistakenly pass the current cpu as the "processor"
    argument of speedstep_get_frequency(), whereas it should be the type of
    the processor.
    Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14340
    Based on a patch by Dave Mueller.
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Acked-by: Dominik Brodowski <linux@brodo.de>
    Reported-by: Dave Mueller <dave.mueller@gmx.ch>
    Cc: <stable@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Dave Jones <davej@redhat.com>

Note You need to log in before you can comment on or make changes to this bug.