* [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors
@ 2007-06-06 20:35 Juerg Haefliger
2007-06-07 8:33 ` [lm-sensors] [PATCH] lm-sensors: replace references to Jean Delvare
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Juerg Haefliger @ 2007-06-06 20:35 UTC (permalink / raw)
To: lm-sensors
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
This patch replaces all references to bmcsensors and i2c-ipmi with
ipmisensors and ipmi-si in sensors-detect.
Signed-off-by: Juerg Haefliger <juergh at gmail.com>
[-- Attachment #2: lm-sensors-replace-ref-to-bmcsensors.patch --]
[-- Type: text/x-patch, Size: 1687 bytes --]
--- lm-sensors.orig/prog/detect/sensors-detect 2007-06-06 09:50:41.886394000 -0700
+++ lm-sensors/prog/detect/sensors-detect 2007-06-06 11:53:22.487201000 -0700
@@ -1514,13 +1514,13 @@ use vars qw(@pci_adapters_sis5595 @pci_a
},
{
name => "IPMI BMC KCS",
- driver => "bmcsensors",
+ driver => "ipmisensors",
isa_addrs => [ 0x0ca0 ],
isa_detect => sub { ipmi_kcs_detect(@_); },
},
{
name => "IPMI BMC SMIC",
- driver => "bmcsensors",
+ driver => "ipmisensors",
isa_addrs => [ 0x0ca8 ],
isa_detect => sub { ipmi_smic_detect(@_); },
},
@@ -5409,7 +5409,7 @@ sub generate_modprobes
my ($prefer_isa) = @_;
my ($chip,$detection,$nr,$i,@optionlist,@probelist,$driver,$isa,$adap);
- my $bmcsensors = 0;
+ my $ipmisensors = 0;
my @adapters;
my $modprobes = "";
my $configfile = "";
@@ -5449,8 +5449,8 @@ sub generate_modprobes
not (exists $detection->{i2c_driver} and not $prefer_isa)) {
$isa=1;
}
- if ($chip->{driver} eq "bmcsensors") {
- $bmcsensors=1;
+ if ($chip->{driver} eq "ipmisensors") {
+ $ipmisensors=1;
}
}
}
@@ -5475,9 +5475,9 @@ sub generate_modprobes
# i2c-isa is loaded automatically (as a dependency) since 2.6.14,
# and will soon be gone.
$modprobes .= "modprobe i2c-isa\n" if ($isa && !kernel_version_at_least(2, 6, 18));
- if ($bmcsensors) {
+ if ($ipmisensors) {
$modprobes .= "# You must also install and load the IPMI modules\n";
- $modprobes .= "modprobe i2c-ipmi\n";
+ $modprobes .= "modprobe ipmi-si\n";
}
# Now determine the chip probe lines
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [lm-sensors] [PATCH] lm-sensors: replace references to 2007-06-06 20:35 [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger @ 2007-06-07 8:33 ` Jean Delvare 2007-06-07 18:37 ` [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: Jean Delvare @ 2007-06-07 8:33 UTC (permalink / raw) To: lm-sensors Hi Juerg, On Wed, 6 Jun 2007 13:35:44 -0700, Juerg Haefliger wrote: > This patch replaces all references to bmcsensors and i2c-ipmi with > ipmisensors and ipmi-si in sensors-detect. > > Signed-off-by: Juerg Haefliger <juergh at gmail.com> Thanks for giving it a shot. Unfortunately I can't take this first version because it breaks 2.4 kernel systems, which _still_ need i2c-ipmi + bmcsensors. Please rework your change so that we can support both 2.4 and 2.6 kernels. This shouldn't be too difficult, most of the infrastructure is already in place. Look at function chip_special_cases(), it handles the case of the W83791D chip which is handled by different drivers under 2.4 and 2.6. You need to do something similar for IMPI/BMC. Thanks, -- Jean Delvare _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply [flat|nested] 6+ messages in thread
* [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors 2007-06-06 20:35 [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger 2007-06-07 8:33 ` [lm-sensors] [PATCH] lm-sensors: replace references to Jean Delvare @ 2007-06-07 18:37 ` Juerg Haefliger 2007-06-08 14:07 ` [lm-sensors] [PATCH] lm-sensors: replace references to Jean Delvare ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: Juerg Haefliger @ 2007-06-07 18:37 UTC (permalink / raw) To: lm-sensors [-- Attachment #1: Type: text/plain, Size: 179 bytes --] This patch replaces all references to bmcsensors and i2c-ipmi for kernel 2.6 with ipmisensors and ipmi-si in sensors-detect. Signed-off-by: Juerg Haefliger <juergh at gmail.com> [-- Attachment #2: lm-sensors-replace-ref-to-bmcsensors.patch --] [-- Type: text/x-patch, Size: 4086 bytes --] --- lm-sensors.orig/prog/detect/sensors-detect 2007-06-06 09:50:41.886394000 -0700 +++ lm-sensors/prog/detect/sensors-detect 2007-06-07 11:32:11.734309000 -0700 @@ -1513,18 +1513,6 @@ use vars qw(@pci_adapters_sis5595 @pci_a i2c_detect => sub { max6900_detect(@_); }, }, { - name => "IPMI BMC KCS", - driver => "bmcsensors", - isa_addrs => [ 0x0ca0 ], - isa_detect => sub { ipmi_kcs_detect(@_); }, - }, - { - name => "IPMI BMC SMIC", - driver => "bmcsensors", - isa_addrs => [ 0x0ca8 ], - isa_detect => sub { ipmi_smic_detect(@_); }, - }, - { name => "Smart Battery Charger", driver => "to-be-written", i2c_addrs => [0x09], @@ -1546,20 +1534,48 @@ use vars qw(@pci_adapters_sis5595 @pci_a # Special case chip information goes here and would be included in # the chip_special_cases routine below -use vars qw($chip_kern24_w83791d $chip_kern26_w83791d); -$chip_kern24_w83791d = { - name => "Winbond W83791D", - driver => "w83781d", - i2c_addrs => [0x2c..0x2f], - i2c_detect => sub { w83781d_detect(7, @_); }, -}; - -$chip_kern26_w83791d = { - name => "Winbond W83791D", - driver => "w83791d", - i2c_addrs => [0x2c..0x2f], - i2c_detect => sub { w83781d_detect(7, @_); }, -}; +use vars qw(@chip_kern24_ids @chip_kern26_ids); +@chip_kern24_ids = ( + { + name => "Winbond W83791D", + driver => "w83781d", + i2c_addrs => [0x2c..0x2f], + i2c_detect => sub { w83781d_detect(7, @_); }, + }, + { + name => "IPMI BMC KCS", + driver => "bmcsensors", + isa_addrs => [ 0x0ca0 ], + isa_detect => sub { ipmi_kcs_detect(@_); }, + }, + { + name => "IPMI BMC SMIC", + driver => "bmcsensors", + isa_addrs => [ 0x0ca8 ], + isa_detect => sub { ipmi_smic_detect(@_); }, + }, +); + +@chip_kern26_ids = ( + { + name => "Winbond W83791D", + driver => "w83791d", + i2c_addrs => [0x2c..0x2f], + i2c_detect => sub { w83781d_detect(7, @_); }, + }, + { + name => "IPMI BMC KCS", + driver => "ipmisensors", + isa_addrs => [ 0x0ca0 ], + isa_detect => sub { ipmi_kcs_detect(@_); }, + }, + { + name => "IPMI BMC SMIC", + driver => "ipmisensors", + isa_addrs => [ 0x0ca8 ], + isa_detect => sub { ipmi_smic_detect(@_); }, + }, +); # This is a list of all recognized superio chips. # Each entry must have the following fields: @@ -3257,9 +3273,13 @@ sub chip_special_cases # Based on the kernel, add the appropriate chip structure to the # chip_ids detection list if (kernel_version_at_least(2, 6, 0)) { - push @chip_ids, $chip_kern26_w83791d; + foreach (@chip_kern26_ids) { + push @chip_ids, $_; + } } else { - push @chip_ids, $chip_kern24_w83791d; + foreach (@chip_kern24_ids) { + push @chip_ids, $_; + } } } @@ -5409,7 +5429,7 @@ sub generate_modprobes my ($prefer_isa) = @_; my ($chip,$detection,$nr,$i,@optionlist,@probelist,$driver,$isa,$adap); - my $bmcsensors = 0; + my $ipmi = 0; my @adapters; my $modprobes = ""; my $configfile = ""; @@ -5449,8 +5469,9 @@ sub generate_modprobes not (exists $detection->{i2c_driver} and not $prefer_isa)) { $isa=1; } - if ($chip->{driver} eq "bmcsensors") { - $bmcsensors=1; + if ($chip->{driver} eq "bmcsensors" || + $chip->{driver} eq "ipmisensors") { + $ipmi = 1; } } } @@ -5475,9 +5496,13 @@ sub generate_modprobes # i2c-isa is loaded automatically (as a dependency) since 2.6.14, # and will soon be gone. $modprobes .= "modprobe i2c-isa\n" if ($isa && !kernel_version_at_least(2, 6, 18)); - if ($bmcsensors) { + if ($ipmi) { $modprobes .= "# You must also install and load the IPMI modules\n"; - $modprobes .= "modprobe i2c-ipmi\n"; + if (kernel_version_at_least(2, 6, 0)) { + $modprobes .= "modprobe ipmi-si\n"; + } else { + $modprobes .= "modprobe i2c-ipmi\n"; + } } # Now determine the chip probe lines [-- Attachment #3: Type: text/plain, Size: 153 bytes --] _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lm-sensors] [PATCH] lm-sensors: replace references to 2007-06-06 20:35 [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger 2007-06-07 8:33 ` [lm-sensors] [PATCH] lm-sensors: replace references to Jean Delvare 2007-06-07 18:37 ` [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger @ 2007-06-08 14:07 ` Jean Delvare 2007-06-08 15:32 ` Keith Romberg 2007-06-08 17:05 ` Juerg Haefliger 4 siblings, 0 replies; 6+ messages in thread From: Jean Delvare @ 2007-06-08 14:07 UTC (permalink / raw) To: lm-sensors On Thu, 7 Jun 2007 11:37:16 -0700, Juerg Haefliger wrote: > This patch replaces all references to bmcsensors and i2c-ipmi for > kernel 2.6 with > ipmisensors and ipmi-si in sensors-detect. > > Signed-off-by: Juerg Haefliger <juergh at gmail.com> Looks really good, thanks, I'll apply this. Keith, could you please test this patch and confirm that it works for you? http://lists.lm-sensors.org/pipermail/lm-sensors/2007-June/019919.html -- Jean Delvare _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lm-sensors] [PATCH] lm-sensors: replace references to 2007-06-06 20:35 [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger ` (2 preceding siblings ...) 2007-06-08 14:07 ` [lm-sensors] [PATCH] lm-sensors: replace references to Jean Delvare @ 2007-06-08 15:32 ` Keith Romberg 2007-06-08 17:05 ` Juerg Haefliger 4 siblings, 0 replies; 6+ messages in thread From: Keith Romberg @ 2007-06-08 15:32 UTC (permalink / raw) To: lm-sensors I will test it tonight and let you know the results :) Keith Jean Delvare wrote: > On Thu, 7 Jun 2007 11:37:16 -0700, Juerg Haefliger wrote: >> This patch replaces all references to bmcsensors and i2c-ipmi for >> kernel 2.6 with >> ipmisensors and ipmi-si in sensors-detect. >> >> Signed-off-by: Juerg Haefliger <juergh at gmail.com> > > Looks really good, thanks, I'll apply this. > > Keith, could you please test this patch and confirm that it works for > you? > http://lists.lm-sensors.org/pipermail/lm-sensors/2007-June/019919.html > _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lm-sensors] [PATCH] lm-sensors: replace references to 2007-06-06 20:35 [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger ` (3 preceding siblings ...) 2007-06-08 15:32 ` Keith Romberg @ 2007-06-08 17:05 ` Juerg Haefliger 4 siblings, 0 replies; 6+ messages in thread From: Juerg Haefliger @ 2007-06-08 17:05 UTC (permalink / raw) To: lm-sensors I tested it on BMC system running 2.6 and it worked fine. Didn't test on 2.4 though. ...juerg On 6/8/07, Jean Delvare <khali@linux-fr.org> wrote: > On Thu, 7 Jun 2007 11:37:16 -0700, Juerg Haefliger wrote: > > This patch replaces all references to bmcsensors and i2c-ipmi for > > kernel 2.6 with > > ipmisensors and ipmi-si in sensors-detect. > > > > Signed-off-by: Juerg Haefliger <juergh at gmail.com> > > Looks really good, thanks, I'll apply this. > > Keith, could you please test this patch and confirm that it works for > you? > http://lists.lm-sensors.org/pipermail/lm-sensors/2007-June/019919.html > > -- > Jean Delvare > _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-08 17:05 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-06-06 20:35 [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger 2007-06-07 8:33 ` [lm-sensors] [PATCH] lm-sensors: replace references to Jean Delvare 2007-06-07 18:37 ` [lm-sensors] [PATCH] lm-sensors: replace references to bmcsensors Juerg Haefliger 2007-06-08 14:07 ` [lm-sensors] [PATCH] lm-sensors: replace references to Jean Delvare 2007-06-08 15:32 ` Keith Romberg 2007-06-08 17:05 ` Juerg Haefliger
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.