- lm_sensors-r5870-i2c-non-sequential.patch: Fix error seen in
sensors-detect if i2c bus numbering is not sequential. - lm_sensors-r5883-W83667HG-B-is-supported.patch: The W83667HG-B is supported by the w83627ehf driver since kernel 2.6.36. - lm_sensors-r5886-default-config-W83627THF.patch: Add a default configuration section for the Winbond W83627THF. - lm_sensors-r5887-typo-in-sensors-conf-5.patch: Fixed typo in lib/sensors.conf.5. - lm_sensors-r5889-default-config-SCH5127.patch: Add a default configuration section for the SMSC SCH5127. - lm_sensors-r5905-fix-coretemp-detection.patch: Implement universal detection for Intel digital thermal sensors. OBS-URL: https://build.opensuse.org/package/show/Base:System/sensors?expand=0&rev=32
This commit is contained in:
parent
95478c9275
commit
d79bae1ad3
18
lm_sensors-r5870-i2c-non-sequential.patch
Normal file
18
lm_sensors-r5870-i2c-non-sequential.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Upstream changeset: r5870
|
||||
Fix error seen in sensors-detect if i2c bus numbering is not
|
||||
sequential.
|
||||
|
||||
---
|
||||
prog/detect/sensors-detect | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- lm_sensors-3.2.0.orig/prog/detect/sensors-detect
|
||||
+++ lm_sensors-3.2.0/prog/detect/sensors-detect
|
||||
@@ -5933,6 +5933,7 @@ sub generate_modprobes
|
||||
# the adapter drivers so that the numbers will be the same. If not, then
|
||||
# we only load the adapter drivers which are useful.
|
||||
foreach $adap (@i2c_adapters) {
|
||||
+ next unless defined $adap;
|
||||
next if $adap->{autoload};
|
||||
next if $adap->{driver} eq 'UNKNOWN';
|
||||
next if not defined $configfile and not $adap->{used};
|
19
lm_sensors-r5883-W83667HG-B-is-supported.patch
Normal file
19
lm_sensors-r5883-W83667HG-B-is-supported.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Upstream changeset: r5883
|
||||
The W83667HG-B is supported by the w83627ehf driver since kernel
|
||||
2.6.36.
|
||||
|
||||
---
|
||||
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
|
||||
@@ -1791,7 +1791,7 @@ use constant FEAT_SMBUS => (1 << 7);
|
||||
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
|
||||
}, {
|
||||
name => "Nuvoton W83667HG-B Super IO Sensors",
|
||||
- driver => "to-be-written", # Probably w83627ehf
|
||||
+ driver => "w83627ehf",
|
||||
devid => 0xB350,
|
||||
devid_mask => 0xFFF0,
|
||||
logdev => 0x0b,
|
35
lm_sensors-r5886-default-config-W83627THF.patch
Normal file
35
lm_sensors-r5886-default-config-W83627THF.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Upstream changeset: r5886
|
||||
Add a default configuration section for the Winbond W83627THF.
|
||||
|
||||
---
|
||||
etc/sensors.conf.default | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
--- lm_sensors-3.2.0.orig/etc/sensors.conf.default
|
||||
+++ lm_sensors-3.2.0/etc/sensors.conf.default
|
||||
@@ -266,6 +266,25 @@ chip "adm1030-*" "adm1031-*"
|
||||
label temp1 "M/B Temp"
|
||||
|
||||
|
||||
+chip "w83627thf-*"
|
||||
+
|
||||
+ label in3 "+5V"
|
||||
+ label in7 "5VSB"
|
||||
+ label in8 "Vbat"
|
||||
+
|
||||
+ # Internal resistors
|
||||
+ compute in3 @ * (1 + 34/51), @ / (1 + 34/51)
|
||||
+ compute in7 @ * (1 + 34/51), @ / (1 + 34/51)
|
||||
+
|
||||
+ set in3_min 5.0 * 0.90
|
||||
+ set in3_max 5.0 * 1.10
|
||||
+ set in7_min 5.0 * 0.90
|
||||
+ set in7_max 5.0 * 1.10
|
||||
+# The battery voltage may or may not be monitored.
|
||||
+# set in8_min 3.0 * 0.90
|
||||
+# set in8_max 3.0 * 1.10
|
||||
+
|
||||
+
|
||||
chip "w83627ehf-*" "w83627dhg-*" "w83667hg-*"
|
||||
|
||||
label in0 "Vcore"
|
18
lm_sensors-r5887-typo-in-sensors-conf-5.patch
Normal file
18
lm_sensors-r5887-typo-in-sensors-conf-5.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Upstream changeset: r5887
|
||||
Fixed typo in lib/sensors.conf.5.
|
||||
|
||||
---
|
||||
lib/sensors.conf.5 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- lm_sensors-3.2.0.orig/lib/sensors.conf.5
|
||||
+++ lm_sensors-3.2.0/lib/sensors.conf.5
|
||||
@@ -402,7 +402,7 @@ really cool before the fan stops, so tha
|
||||
again immediately.
|
||||
|
||||
So, in addition to tempX_max, many chips have a tempX_max_hyst
|
||||
-sub-feature. Likewise, tempX_crit often comes with tempX_max_crit.
|
||||
+sub-feature. Likewise, tempX_crit often comes with tempX_crit_hyst.
|
||||
Example:
|
||||
|
||||
.RS
|
30
lm_sensors-r5889-default-config-SCH5127.patch
Normal file
30
lm_sensors-r5889-default-config-SCH5127.patch
Normal file
@ -0,0 +1,30 @@
|
||||
Upstream changeset: r5889
|
||||
Add a default configuration section for the SMSC SCH5127.
|
||||
|
||||
---
|
||||
etc/sensors.conf.default | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
--- lm_sensors-3.2.0.orig/etc/sensors.conf.default
|
||||
+++ lm_sensors-3.2.0/etc/sensors.conf.default
|
||||
@@ -402,6 +402,20 @@ chip "sch5027-*"
|
||||
set in6_max 3.0 * 1.10
|
||||
|
||||
|
||||
+chip "sch5127-*"
|
||||
+
|
||||
+ label in2 "+3.3V"
|
||||
+ label in5 "3VSB"
|
||||
+ label in6 "Vbat"
|
||||
+
|
||||
+ set in2_min 3.3 * 0.90
|
||||
+ set in2_max 3.3 * 1.10
|
||||
+ set in5_min 3.3 * 0.90
|
||||
+ set in5_max 3.3 * 1.10
|
||||
+ set in6_min 3.0 * 0.90
|
||||
+ set in6_max 3.0 * 1.10
|
||||
+
|
||||
+
|
||||
chip "f71882fg-*"
|
||||
|
||||
label in0 "+3.3V"
|
137
lm_sensors-r5905-fix-coretemp-detection.patch
Normal file
137
lm_sensors-r5905-fix-coretemp-detection.patch
Normal file
@ -0,0 +1,137 @@
|
||||
Upstream changeset: r5905
|
||||
Implement universal detection for Intel digital thermal sensors. This
|
||||
relies on a flag returned by the cpuid instruction, as the coretemp
|
||||
driver itself does since kernel 2.6.35.
|
||||
|
||||
---
|
||||
prog/detect/sensors-detect | 68 +++++++++++++++++++++++++++------------------
|
||||
1 file changed, 42 insertions(+), 26 deletions(-)
|
||||
|
||||
--- lm_sensors-3.2.0.orig/prog/detect/sensors-detect
|
||||
+++ lm_sensors-3.2.0/prog/detect/sensors-detect
|
||||
@@ -23,7 +23,7 @@
|
||||
require 5.004;
|
||||
|
||||
use strict;
|
||||
-use Fcntl;
|
||||
+use Fcntl qw(:DEFAULT :seek);
|
||||
use File::Basename;
|
||||
|
||||
# We will call modprobe, which typically lives in either /sbin,
|
||||
@@ -2025,13 +2025,9 @@ use vars qw(@cpu_ids);
|
||||
driver => "k10temp",
|
||||
detect => \&fam11h_pci_detect,
|
||||
}, {
|
||||
- name => "Intel Core family thermal sensor",
|
||||
+ name => "Intel digital thermal sensor",
|
||||
driver => "coretemp",
|
||||
- detect => sub { coretemp_detect(0); },
|
||||
- }, {
|
||||
- name => "Intel Atom thermal sensor",
|
||||
- driver => "coretemp",
|
||||
- detect => sub { coretemp_detect(1); },
|
||||
+ detect => \&coretemp_detect,
|
||||
}, {
|
||||
name => "Intel AMB FB-DIMM thermal sensor",
|
||||
driver => "i5k_amb",
|
||||
@@ -2296,10 +2292,10 @@ sub initialize_cpu_list
|
||||
while (<INPUTFILE>) {
|
||||
if (m/^processor\s*:\s*(\d+)/) {
|
||||
push @cpu, $entry if scalar keys(%{$entry}); # Previous entry
|
||||
- $entry = {}; # New entry
|
||||
+ $entry = { nr => $1 }; # New entry
|
||||
next;
|
||||
}
|
||||
- if (m/^(vendor_id|cpu family|model|model name|stepping)\s*:\s*(.+)$/) {
|
||||
+ if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level)\s*:\s*(.+)$/) {
|
||||
my $k = $1;
|
||||
my $v = $2;
|
||||
$v =~ s/\s+/ /g; # Merge multiple spaces
|
||||
@@ -2468,6 +2464,15 @@ sub load_module
|
||||
$modules_list{$normalized} = 1;
|
||||
}
|
||||
|
||||
+# udev may take some time to create device nodes when loading modules
|
||||
+sub udev_settle
|
||||
+{
|
||||
+ if (!(-x "/sbin/udevadm" && system("/sbin/udevadm settle") == 0)
|
||||
+ && !(-x "/sbin/udevsettle" && system("/sbin/udevsettle") == 0)) {
|
||||
+ sleep(1);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
sub initialize_modules_supported
|
||||
{
|
||||
foreach my $chip (@chip_ids) {
|
||||
@@ -5757,23 +5762,33 @@ sub intel_amb_detect
|
||||
return;
|
||||
}
|
||||
|
||||
+sub cpuid
|
||||
+{
|
||||
+ my ($cpu_nr, $eax) = @_;
|
||||
+
|
||||
+ sysopen(CPUID, "/dev/cpu/$cpu_nr/cpuid", O_RDONLY) or return;
|
||||
+ binmode CPUID;
|
||||
+ sysseek(CPUID, $eax, SEEK_SET)
|
||||
+ or die "Cannot seek /dev/cpu/$cpu_nr/cpuid";
|
||||
+ sysread(CPUID, my $data, 16)
|
||||
+ or die "Cannot read /dev/cpu/$cpu_nr/cpuid";
|
||||
+ close CPUID;
|
||||
+
|
||||
+ return unpack("L4", $data);
|
||||
+}
|
||||
+
|
||||
sub coretemp_detect
|
||||
{
|
||||
- my $chip = shift;
|
||||
my $probecpu;
|
||||
|
||||
foreach $probecpu (@cpu) {
|
||||
next unless $probecpu->{vendor_id} eq 'GenuineIntel' &&
|
||||
- $probecpu->{'cpu family'} == 6;
|
||||
- return 9 if $chip == 0 &&
|
||||
- ($probecpu->{model} == 14 || # Pentium M DC
|
||||
- $probecpu->{model} == 15 || # Core 2 DC 65nm
|
||||
- $probecpu->{model} == 0x16 || # Core 2 SC 65nm
|
||||
- $probecpu->{model} == 0x17 || # Penryn 45nm
|
||||
- $probecpu->{model} == 0x1a || # Nehalem
|
||||
- $probecpu->{model} == 0x1e); # Lynnfield
|
||||
- return 9 if $chip == 1 &&
|
||||
- ($probecpu->{model} == 0x1c); # Atom
|
||||
+ $probecpu->{'cpuid level'} >= 6;
|
||||
+
|
||||
+ # Now we check for the DTS flag
|
||||
+ my @regs = cpuid($probecpu->{nr}, 6);
|
||||
+ return unless @regs == 4;
|
||||
+ return 9 if ($regs[0] & (1 << 0)); # eax, bit 0
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -6137,6 +6152,12 @@ sub main
|
||||
print "Some south bridges, CPUs or memory controllers contain embedded sensors.\n".
|
||||
"Do you want to scan for them? This is totally safe. (YES/no): ";
|
||||
unless (<STDIN> =~ /^\s*n/i) {
|
||||
+ # Load the cpuid driver if needed
|
||||
+ unless (-e "/dev/cpu/$cpu[0]->{nr}/cpuid") {
|
||||
+ load_module("cpuid");
|
||||
+ udev_settle();
|
||||
+ }
|
||||
+
|
||||
$| = 1;
|
||||
foreach my $entry (@cpu_ids) {
|
||||
scan_cpu($entry);
|
||||
@@ -6212,12 +6233,7 @@ sub main
|
||||
$by_default = 1 if dmi_match('board_vendor', 'asustek', 'tyan',
|
||||
'supermicro');
|
||||
|
||||
- # udev may take some time to create the device node
|
||||
- if (!(-x "/sbin/udevadm" && system("/sbin/udevadm settle") == 0)
|
||||
- && !(-x "/sbin/udevsettle" && system("/sbin/udevsettle") == 0)) {
|
||||
- sleep(1);
|
||||
- }
|
||||
-
|
||||
+ udev_settle();
|
||||
for (my $dev_nr = 0; $dev_nr < @i2c_adapters; $dev_nr++) {
|
||||
next unless exists $i2c_adapters[$dev_nr];
|
||||
scan_i2c_adapter($dev_nr, $by_default);
|
@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 19 11:44:18 CET 2011 - jdelvare@suse.de
|
||||
|
||||
- lm_sensors-r5870-i2c-non-sequential.patch: Fix error seen in
|
||||
sensors-detect if i2c bus numbering is not sequential.
|
||||
- lm_sensors-r5883-W83667HG-B-is-supported.patch: The W83667HG-B is
|
||||
supported by the w83627ehf driver since kernel 2.6.36.
|
||||
- lm_sensors-r5886-default-config-W83627THF.patch: Add a default
|
||||
configuration section for the Winbond W83627THF.
|
||||
- lm_sensors-r5887-typo-in-sensors-conf-5.patch: Fixed typo in
|
||||
lib/sensors.conf.5.
|
||||
- lm_sensors-r5889-default-config-SCH5127.patch: Add a default
|
||||
configuration section for the SMSC SCH5127.
|
||||
- lm_sensors-r5905-fix-coretemp-detection.patch: Implement
|
||||
universal detection for Intel digital thermal sensors.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 29 20:47:06 UTC 2010 - cristian.rodriguez@opensuse.org
|
||||
|
||||
|
12
sensors.spec
12
sensors.spec
@ -37,6 +37,12 @@ Patch3: lm_sensors-3.0.0-sysconfig_metadata.patch
|
||||
Patch4: lm_sensors-3.0.3-hint-at-kernel-extra-package.patch
|
||||
Patch5: lm_sensors-3.1.1-no-ipmisensors-driver.patch
|
||||
Patch6: libsensors-visibility.patch
|
||||
Patch7: lm_sensors-r5870-i2c-non-sequential.patch
|
||||
Patch8: lm_sensors-r5883-W83667HG-B-is-supported.patch
|
||||
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
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExcludeArch: s390 s390x
|
||||
|
||||
@ -140,6 +146,12 @@ Authors:
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
|
||||
|
Loading…
Reference in New Issue
Block a user