]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: speedstep-smi: enable interrupts when waiting
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 9 Feb 2015 18:38:17 +0000 (13:38 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 12 Feb 2015 01:02:52 +0000 (02:02 +0100)
commitad588c6b008817ab6fab3ca6ac0daf5e694c055a
tree26b68b8c7413e3bf9503a101414e9fd2f6fecf12
parent3e6a3497c77ab7cff808a4ab05976ef0c4431947
cpufreq: speedstep-smi: enable interrupts when waiting

On Dell Latitude C600 laptop with Pentium 3 850MHz processor, the
speedstep-smi driver sometimes loads and sometimes doesn't load with
"change to state X failed" message.

The hardware sometimes refuses to change frequency and in this case, we
need to retry later. I found out that we need to enable interrupts while
waiting. When we enable interrupts, the hardware blockage that prevents
frequency transition resolves and the transition is possible. With
disabled interrupts, the blockage doesn't resolve (no matter how long do
we wait). The exact reasons for this hardware behavior are unknown.

This patch enables interrupts in the function speedstep_set_state that can
be called with disabled interrupts. However, this function is called with
disabled interrupts only from speedstep_get_freqs, so it shouldn't cause
any problem.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com
Cc: All applicable <stable@vger.kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/speedstep-lib.c
drivers/cpufreq/speedstep-smi.c