Changeset 5521

Show
Ignore:
Timestamp:
12/05/08 10:36:13 (5 years ago)
Author:
khali
Message:

Move IPMI interface detection to its own section. IPMI is really different
from legacy ISA monitoring chips.

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5520 r5521  
    4343                  Gather DMI data and print it at start-up 
    4444                  Always probe the SMBus on Asus and Tyan boards 
     45                  Move IPMI interface detection to its own section 
    4546  sensors-detect-stat.pl: Delete (functionality merged into sensors-detect) 
    4647 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5520 r5521  
    4040 
    4141use constant NO_CACHE => 1; 
    42 use vars qw(@pci_adapters @chip_ids @non_hwmon_chip_ids $i2c_addresses_to_scan 
    43             $revision @i2c_byte_cache); 
     42use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids 
     43            $i2c_addresses_to_scan $revision @i2c_byte_cache); 
    4444 
    4545$revision = '$Revision$ ($Date$)'; 
     
    10711071                i2c_addrs => [0x0b], 
    10721072                i2c_detect => sub { smartbatt_detect(@_); }, 
    1073         }, { 
     1073        } 
     1074); 
     1075 
     1076# IPMI interfaces have their own array now 
     1077@ipmi_ifs = ( 
     1078        { 
    10741079                name => "IPMI BMC KCS", 
    10751080                driver => "ipmisensors", 
     
    29792984sub scan_isa_bus 
    29802985{ 
    2981         my $ipmi_only = shift; 
     2986        my $chip_list_ref = shift; 
    29822987        my ($chip, $addr, $conf); 
    29832988 
    29842989        $| = 1; 
    2985         foreach $chip (@chip_ids) { 
     2990        foreach $chip (@{$chip_list_ref}) { 
    29862991                next if not exists $chip->{isa_addrs} or not exists $chip->{isa_detect}; 
    2987                 next if $ipmi_only && $chip->{name} !~ m/\bIPMI\b/; 
    29882992                foreach $addr (@{$chip->{isa_addrs}}) { 
    29892993                        printf("\%-60s", sprintf("Probing for `\%s'\ at 0x\%x... ", 
     
    51705174                print "\n"; 
    51715175 
     5176                print "Some systems (mainly servers) implement IPMI, a set of common interfaces\n". 
     5177                      "through which system health data may be retrieved, amongst other things.\n". 
     5178                      "We have to read from arbitrary I/O ports to probe for such interfaces.\n". 
     5179                      "This is normally safe. Do you want to scan for IPMI interfaces?\n". 
     5180                      "(YES/no): "; 
     5181                unless (<STDIN> =~ /^\s*n/i) { 
     5182                        initialize_ioports(); 
     5183                        scan_isa_bus(\@ipmi_ifs); 
     5184                        close_ioports(); 
     5185                } 
     5186                print "\n"; 
     5187 
    51725188                printf "Some hardware monitoring chips are accessible through the ISA I/O ports.\n". 
    51735189                       "We have to write to arbitrary I/O ports to probe them. This is usually\n". 
    51745190                       "safe though. Yes, you do have ISA I/O ports even if you do not have any\n". 
    51755191                       "ISA slots! Do you want to scan the ISA I/O ports? (\%s): ", 
    5176                        $superio_features ? "yes/no/IPMI ONLY" : "YES/no/ipmi only"; 
     5192                       $superio_features ? "yes/NO" : "YES/no"; 
    51775193                $input = <STDIN>; 
    5178                 unless ($input =~ /^\s*n/i) { 
    5179                         my $ipmi_only = ($superio_features && $input !~ /^\s*y/i) 
    5180                                      || (!$superio_features && $input =~ /^\s*i/i); 
     5194                unless ($input =~ /^\s*n/i 
     5195                     || ($superio_features && $input !~ /^\s*y/i)) { 
    51815196                        initialize_ioports(); 
    5182                         scan_isa_bus($ipmi_only); 
     5197                        scan_isa_bus(\@chip_ids); 
    51835198                        close_ioports(); 
    51845199                }