lm-sensors: replace references to bmcsensors
PATCH 1/1 lm-sensors: replace references to bmcsensors
This patch replaces all references to bmcsensors and i2c-ipmi with ipmisensors and ipmi-si in sensors-detect.
prog/detect/sensors-detect +7 -7
@@ -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
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] lm-sensors: replace references to
Hi Juerg,
Quoted 4 lines · Juerg Haefliger
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,
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 1/1 lm-sensors: replace references to bmcsensors
In reply to Juerg HaefligerThis patch replaces all references to bmcsensors and i2c-ipmi for kernel 2.6 with
ipmisensors and ipmi-si in sensors-detect.
prog/detect/sensors-detect +58 -33
@@ -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
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] lm-sensors: replace references to
In reply to Juerg HaefligerQuoted 5 lines · Juerg Haefliger
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
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] lm-sensors: replace references to
In reply to Juerg HaefligerI will test it tonight and let you know the results :)
Keith
Quoted 5 lines · Jean Delvare
Quoted 4 lines · Juerg Haefliger
This patch replaces all references to bmcsensors and i2c-ipmi for kernel 2.6 with
ipmisensors and ipmi-si in sensors-detect.
Quoted 8 lines
Quoted 1 line
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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] lm-sensors: replace references to
In reply to Juerg HaefligerI tested it on BMC system running 2.6 and it worked fine. Didn't test on 2.4 though.
...juerg
Quoted 7 lines · Jean Delvare
Quoted 5 lines · Juerg Haefliger
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>
Quoted 9 lines
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
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors