diff --git a/CHANGES b/CHANGES index d1da8502..28c8aa5f 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,8 @@ SVN-HEAD Module eeprom: Hide Sony Vaio serial numbers to regular users (2.6 backport) Drop useless debugging log messages Recognize VGN as a valid Sony Vaio name prefix (2.6 backport) + Module gl518sm: Fix fan speed reading (2.6 backport) + Module gl520sm: Fix fan speed reading (2.6 backport) Program decode-dimms.pl: Fix DDR2 SDRAM module speed decoding Update manufacturer IDs. Program decode-vaio.pl: Private data might not be readable by non-root users diff --git a/kernel/chips/gl518sm.c b/kernel/chips/gl518sm.c index a514a59d..996c17b6 100644 --- a/kernel/chips/gl518sm.c +++ b/kernel/chips/gl518sm.c @@ -85,12 +85,12 @@ static inline u8 FAN_TO_REG(long rpm, int div) if (rpm == 0) return 255; rpm = SENSORS_LIMIT(rpm, 1, 1000000); - return SENSORS_LIMIT((960000 + rpm * div / 2) / (rpm * div), 1, + return SENSORS_LIMIT((480000 + rpm * div / 2) / (rpm * div), 1, 254); } #define FAN_FROM_REG(val,div) \ - ( (val)==0 ? 0 : (val)==255 ? 0 : (960000/((val)*(div))) ) + ( (val)==0 ? 0 : (val)==255 ? 0 : (480000/((val)*(div))) ) #define IN_TO_REG(val) (SENSORS_LIMIT((((val)*10+8)/19),0,255)) #define IN_FROM_REG(val) (((val)*19)/10) diff --git a/kernel/chips/gl520sm.c b/kernel/chips/gl520sm.c index 38ae7862..565ef66c 100644 --- a/kernel/chips/gl520sm.c +++ b/kernel/chips/gl520sm.c @@ -87,12 +87,12 @@ static inline u8 FAN_TO_REG(long rpm, int div) if (rpm == 0) return 255; rpm = SENSORS_LIMIT(rpm, 1, 1000000); - return SENSORS_LIMIT((960000 + rpm * div / 2) / (rpm * div), 1, + return SENSORS_LIMIT((480000 + rpm * div / 2) / (rpm * div), 1, 254); } #define FAN_FROM_REG(val,div) \ - ( (val)==0 ? 0 : (val)==255 ? 0 : (960000/((val)*(div))) ) + ( (val)==0 ? 0 : (val)==255 ? 0 : (480000/((val)*(div))) ) #define IN_TO_REG(val) (SENSORS_LIMIT((((val)*10+8)/19),0,255)) #define IN_FROM_REG(val) (((val)*19)/10)