Message ID | 1523643502-28643-1-git-send-email-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | fan: cur_state == -1 is valid for intel_powerclamp | expand |
On 13/04/18 19:18, Alex Hung wrote: > In Documentation/thermal/intel_powerclamp.txt, it states that the > "When idle injection is disabled, reading cur_state returns value -1 > instead of 0 which is to avoid confusing 100% busy state with the > disabled state". > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/fan/fan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c > index f6e9399..298d3a1 100644 > --- a/src/acpi/fan/fan.c > +++ b/src/acpi/fan/fan.c > @@ -154,7 +154,7 @@ static int fan_test1(fwts_framework *fw) > fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanMaxState", > "Fan %s present but has no max_state present.", > info->name); > - if (info->cur_state == -1) > + if (info->cur_state == -1 && strcmp(info->type, "intel_powerclamp")) > fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanCurState", > "Fan %s present but has no cur_state present.", > info->name); > Acked-by: Colin Ian King <colin.king@canonical.com>
On 04/14/2018 02:18 AM, Alex Hung wrote: > In Documentation/thermal/intel_powerclamp.txt, it states that the > "When idle injection is disabled, reading cur_state returns value -1 > instead of 0 which is to avoid confusing 100% busy state with the > disabled state". > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/fan/fan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c > index f6e9399..298d3a1 100644 > --- a/src/acpi/fan/fan.c > +++ b/src/acpi/fan/fan.c > @@ -154,7 +154,7 @@ static int fan_test1(fwts_framework *fw) > fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanMaxState", > "Fan %s present but has no max_state present.", > info->name); > - if (info->cur_state == -1) > + if (info->cur_state == -1 && strcmp(info->type, "intel_powerclamp")) > fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanCurState", > "Fan %s present but has no cur_state present.", > info->name); > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c index f6e9399..298d3a1 100644 --- a/src/acpi/fan/fan.c +++ b/src/acpi/fan/fan.c @@ -154,7 +154,7 @@ static int fan_test1(fwts_framework *fw) fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanMaxState", "Fan %s present but has no max_state present.", info->name); - if (info->cur_state == -1) + if (info->cur_state == -1 && strcmp(info->type, "intel_powerclamp")) fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanCurState", "Fan %s present but has no cur_state present.", info->name);
In Documentation/thermal/intel_powerclamp.txt, it states that the "When idle injection is disabled, reading cur_state returns value -1 instead of 0 which is to avoid confusing 100% busy state with the disabled state". Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/acpi/fan/fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)