diff --git a/libsensors-visibility.patch b/libsensors-visibility.patch index 609db3a..6cbdf70 100644 --- a/libsensors-visibility.patch +++ b/libsensors-visibility.patch @@ -1,6 +1,11 @@ +--- + lib/Module.mk | 2 +- + lib/libsensors.map | 23 +++++++++++++++++++++++ + 2 files changed, 24 insertions(+), 1 deletion(-) + --- /dev/null +++ lib/libsensors.map -@@ -0,0 +1,20 @@ +@@ -0,0 +1,23 @@ +{ +global: + libsensors_version; @@ -19,6 +24,9 @@ + sensors_set_value; + sensors_snprintf_chip_name; + sensors_strerror; ++ sensors_parse_error; ++ sensors_parse_error_wfn; ++ sensors_fatal_error; +local: *; + }; --- lib/Module.mk.orig diff --git a/lm_sensors-r5910-detect-new-Nuvoton-superio.patch b/lm_sensors-r5910-detect-new-Nuvoton-superio.patch new file mode 100644 index 0000000..22d33b1 --- /dev/null +++ b/lm_sensors-r5910-detect-new-Nuvoton-superio.patch @@ -0,0 +1,36 @@ +Add detection of Nuvoton NCT5571D, NCT5577D and NCT6776F. + +--- + prog/detect/sensors-detect | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +--- lm_sensors-3.2.0.orig/prog/detect/sensors-detect ++++ lm_sensors-3.2.0/prog/detect/sensors-detect +@@ -1790,7 +1790,7 @@ use constant FEAT_SMBUS => (1 << 7); + logdev => 0x0b, + features => FEAT_IN | FEAT_FAN | FEAT_TEMP, + }, { +- name => "Nuvoton W83667HG-B Super IO Sensors", ++ name => "Nuvoton W83667HG-B (NCT5571D) Super IO Sensors", + driver => "w83627ehf", + devid => 0xB350, + devid_mask => 0xFFF0, +@@ -1808,6 +1808,18 @@ use constant FEAT_SMBUS => (1 << 7); + driver => "not-a-sensor", + devid => 0x61, + }, { ++ name => "Nuvoton NCT5577D Super IO Sensors", ++ driver => "to-be-written", ++ devid => 0xC331, ++ logdev => 0x0b, ++ features => FEAT_IN | FEAT_FAN | FEAT_TEMP, ++ }, { ++ name => "Nuvoton NCT6776F Super IO Sensors", ++ driver => "to-be-written", ++ devid => 0xC333, ++ logdev => 0x0b, ++ features => FEAT_IN | FEAT_FAN | FEAT_TEMP, ++ }, { + name => "Fintek F71805F/FG Super IO Sensors", + driver => "f71805f", + devid => 0x0406, diff --git a/lm_sensors-r5913-default-config-NCT677xF.patch b/lm_sensors-r5913-default-config-NCT677xF.patch new file mode 100644 index 0000000..8edd367 --- /dev/null +++ b/lm_sensors-r5913-default-config-NCT677xF.patch @@ -0,0 +1,14 @@ +Default config for NCT6775F and NCT6776F. We don't support these +yet, but users may install a standalone driver for them later. + +--- lm-sensors/etc/sensors.conf.default (revision 5902) ++++ lm-sensors/etc/sensors.conf.default (revision 5913) +@@ -285,7 +285,7 @@ + # set in8_max 3.0 * 1.10 + + +-chip "w83627ehf-*" "w83627dhg-*" "w83667hg-*" ++chip "w83627ehf-*" "w83627dhg-*" "w83667hg-*" "nct6775-*" "nct6776-*" + + label in0 "Vcore" + label in2 "AVCC" diff --git a/lm_sensors-r5914-fix-TMP421-detection.patch b/lm_sensors-r5914-fix-TMP421-detection.patch new file mode 100644 index 0000000..2511211 --- /dev/null +++ b/lm_sensors-r5914-fix-TMP421-detection.patch @@ -0,0 +1,18 @@ +We probe addresses 0x1c-0x1f for other chips now, so we might as well +look for TMP421 devices there. + +--- + prog/detect/sensors-detect | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- lm_sensors-3.2.0.orig/prog/detect/sensors-detect ++++ lm_sensors-3.2.0/prog/detect/sensors-detect +@@ -950,7 +950,7 @@ use vars qw(@i2c_adapter_names); + }, { + name => "Texas Instruments TMP421", + driver => "tmp421", +- i2c_addrs => [0x2a, 0x4c..0x4f], # 0x1c-0x1f not probed. ++ i2c_addrs => [0x1c..0x1f, 0x2a, 0x4c..0x4f], + i2c_detect => sub { tmp42x_detect(@_, 0); }, + }, { + name => "Texas Instruments TMP422", diff --git a/lm_sensors-r5916-fix-EMC140x-detection.patch b/lm_sensors-r5916-fix-EMC140x-detection.patch new file mode 100644 index 0000000..ed583c4 --- /dev/null +++ b/lm_sensors-r5916-fix-EMC140x-detection.patch @@ -0,0 +1,23 @@ +Fix addresses checked for SMSC EMC1403 and EMC1404. + +--- + prog/detect/sensors-detect | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- lm_sensors-3.2.0.orig/prog/detect/sensors-detect ++++ lm_sensors-3.2.0/prog/detect/sensors-detect +@@ -1182,12 +1182,12 @@ use vars qw(@i2c_adapter_names); + }, { + name => "SMSC EMC1403", + driver => "emc1403", +- i2c_addrs => [0x18, 0x2a, 0x4c, 0x4d], ++ i2c_addrs => [0x18, 0x29, 0x4c, 0x4d], + i2c_detect => sub { emc1403_detect(@_, 0); }, + }, { + name => "SMSC EMC1404", + driver => "to-be-written", # emc1403 +- i2c_addrs => [0x18, 0x2a, 0x4c, 0x4d], ++ i2c_addrs => [0x18, 0x29, 0x4c, 0x4d], + i2c_detect => sub { emc1403_detect(@_, 1); }, + }, { + name => "ST STTS424", diff --git a/lm_sensors-r5930-fix-DDR3-SPD-detection.patch b/lm_sensors-r5930-fix-DDR3-SPD-detection.patch new file mode 100644 index 0000000..7efa54b --- /dev/null +++ b/lm_sensors-r5930-fix-DDR3-SPD-detection.patch @@ -0,0 +1,61 @@ +Fix detection of SPD EEPROM on DDR3 memory modules. DDR3 uses CRC16 over +128 bytes instead of basic checksum over 64 bytes. Contributed by +Clemens Ladisch. + +--- + prog/detect/sensors-detect | 37 +++++++++++++++++++++++++++++++------ + 1 file changed, 31 insertions(+), 6 deletions(-) + +--- lm_sensors-3.2.0.orig/prog/detect/sensors-detect ++++ lm_sensors-3.2.0/prog/detect/sensors-detect +@@ -5134,19 +5134,44 @@ sub it8712_i2c_detect + } + + # Registers used: +-# 0-63: SPD Data and Checksum ++# 0-63: SPD Data and Checksum (up to DDR2) ++# 0-127: SPD data and CRC (DDR3) + sub eeprom_detect + { + my ($file, $addr) = @_; ++ my $device_type = i2c_smbus_read_byte_data($file, 2); + my $checksum = 0; + +- # Check the checksum for validity (works for most DIMMs and RIMMs) +- for (my $i = 0; $i <= 62; $i++) { +- $checksum += i2c_smbus_read_byte_data($file, $i); ++ # Check the checksum or CRC16 for validity ++ if ($device_type >= 1 and $device_type <= 8) { ++ for (my $i = 0; $i < 63; $i++) { ++ $checksum += i2c_smbus_read_byte_data($file, $i); ++ } ++ $checksum &= 0xff; ++ ++ return 8 if $checksum == i2c_smbus_read_byte_data($file, 63); ++ } elsif ($device_type >= 9 && $device_type <= 11) { ++ # see JEDEC 21-C 4.1.2.11 2.4 ++ my $crc_coverage = i2c_smbus_read_byte_data($file, 0); ++ $crc_coverage = ($crc_coverage & 0x80) ? 117 : 126; ++ for (my $i = 0; $i < $crc_coverage; $i++) { ++ $checksum ^= i2c_smbus_read_byte_data($file, $i) << 8; ++ for (my $bit = 0; $bit < 8; $bit++) { ++ if ($checksum & 0x8000) { ++ $checksum = ($checksum << 1) ^ 0x1021; ++ } else { ++ $checksum <<= 1; ++ } ++ } ++ } ++ $checksum &= 0xffff; ++ ++ return 8 if ($checksum & 0xff) == i2c_smbus_read_byte_data($file, 126) and ++ ($checksum >> 8) == i2c_smbus_read_byte_data($file, 127); ++ ++ # note: if bit 7 of byte 32 is set, a jc42 sensor is at $addr-0x38 + } +- $checksum &= 255; + +- return 8 if $checksum == i2c_smbus_read_byte_data($file, 63); + return; + } + diff --git a/sensors.changes b/sensors.changes index aa17418..491fc9d 100644 --- a/sensors.changes +++ b/sensors.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Thu Feb 17 21:07:45 CET 2011 - jdelvare@suse.de + +- lm_sensors-r5930-fix-DDR3-SPD-detection.patch: Fix typo in + comparison. + +------------------------------------------------------------------- +Thu Feb 17 10:13:12 CET 2011 - jdelvare@suse.de + +- lm_sensors-r5910-detect-new-Nuvoton-superio.patch: Add detection + of Nuvoton NCT5571D, NCT5577D and NCT6776F. +- lm_sensors-r5913-default-config-NCT677xF.patch: Default config + for NCT6775F and NCT6776F. +- lm_sensors-r5914-fix-TMP421-detection.patch: We probe addresses + 0x1c-0x1f for other chips now, so we might as well look for + TMP421 devices there. +- lm_sensors-r5916-fix-EMC140x-detection.patch: Fix addresses + checked for SMSC EMC1403 and EMC1404. +- lm_sensors-r5930-fix-DDR3-SPD-detection.patch: Fix detection of + SPD EEPROM on DDR3 memory modules. DDR3 uses CRC16 over 128 bytes + instead of basic checksum over 64 bytes. Contributed by Clemens + Ladisch. +- libensors-visibility.patch: Add 3 missing symbols. + ------------------------------------------------------------------- Wed Jan 19 11:44:18 CET 2011 - jdelvare@suse.de diff --git a/sensors.spec b/sensors.spec index 5371117..9b596da 100644 --- a/sensors.spec +++ b/sensors.spec @@ -43,6 +43,11 @@ Patch9: lm_sensors-r5886-default-config-W83627THF.patch Patch10: lm_sensors-r5887-typo-in-sensors-conf-5.patch Patch11: lm_sensors-r5889-default-config-SCH5127.patch Patch12: lm_sensors-r5905-fix-coretemp-detection.patch +Patch13: lm_sensors-r5910-detect-new-Nuvoton-superio.patch +Patch14: lm_sensors-r5913-default-config-NCT677xF.patch +Patch15: lm_sensors-r5914-fix-TMP421-detection.patch +Patch16: lm_sensors-r5916-fix-EMC140x-detection.patch +Patch17: lm_sensors-r5930-fix-DDR3-SPD-detection.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build ExcludeArch: s390 s390x @@ -152,6 +157,11 @@ Authors: %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 %build RPM_OPT_FLAGS="$RPM_OPT_FLAGS"