From: Hans de Goede Date: Sun, 4 Jun 2006 18:24:11 +0000 (+0200) Subject: [PATCH] abituguru: Fix fan detection X-Git-Tag: v2.6.18-rc1~1081^2~226^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7c066044f4355d9fbe1ac45e03303b78d21e8d4;p=linux-2.6 [PATCH] abituguru: Fix fan detection One of my testers had a problem where the driver only saw 2 of the 4 fan sensors his uGuru has, this fixes this. -accept 0x40 (bit 6) being high as a valid fan sensor setting for all fans not just fan 1, I have a feeling this bit indicates whether or not a fan is actually connected . Signed-off-by: Hans de Goede Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwmon/abituguru.c b/drivers/hwmon/abituguru.c index ab80b418bd..59122cc0a5 100644 --- a/drivers/hwmon/abituguru.c +++ b/drivers/hwmon/abituguru.c @@ -529,9 +529,8 @@ abituguru_detect_no_bank2_sensors(struct abituguru_data *data) -0x08 enable beep -0x01 enable alarm All other bits should be 0, but on some motherboards - 0x40 (bit 6) is also high, at least for fan1 */ - if ((!i && (data->bank2_settings[i][0] & ~0xC9)) || - (i && (data->bank2_settings[i][0] & ~0x89))) { + 0x40 (bit 6) is also high for some of the fans?? */ + if (data->bank2_settings[i][0] & ~0xC9) { ABIT_UGURU_DEBUG(2, " bank2 sensor %d does not seem " "to be a fan sensor: settings[0] = %02X\n", i, (unsigned int)data->bank2_settings[i][0]);