Show
Ignore:
Timestamp:
08/22/10 18:07:22 (4 years ago)
Author:
khali
Message:

When looking for pwm/fan correlations, sample all fans before returning
a given PWM output to full speed. The code used to only sample the first
fan before doing so, so correlation with other fans could be missed.
Problem reported by Charles Pillar. This closes ticket #2380.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/pwm/pwmconfig

    r5770 r5855  
    438438                exit 1 
    439439        fi 
     440 
     441        # Sample all current fan speeds at once, so that we can quickly 
     442        # disable PWM and return all fans to full speed 
     443        CURRENT_SPEEDS="`cat $GOODFAN`" 
     444        pwmdisable $i 
     445 
    440446        let pwmactivecount=0 
    441447        let count=1 
     
    443449        do 
    444450                OS=`echo $SPEEDS | cut -d' ' -f$count` 
    445                 # this will return the first field if there's only one (sysfs) 
    446                 S=`cat $j | cut -d' ' -f2` 
     451                S=`echo $CURRENT_SPEEDS | cut -d' ' -f$count` 
    447452                echo "  $j ... speed was $OS now $S" 
    448                 pwmdisable $i 
    449453                let threshold=2*$OS/3 
    450454                if [ $S -lt $threshold ]