Changeset 5225

Show
Ignore:
Timestamp:
05/02/08 14:04:52 (4 months ago)
Author:
khali
Message:

Improve handling of special-case bus driver names:
* Drop support for temporarily disabling I2C bus drivers - we've not
used it for years.
* Handle the other special cases early, so that later code no longer
needs to care.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/prog/detect/sensors-detect

    r5224 r5225  
    7575       procid => "Intel 82372FB PIIX5 ACPI", 
    7676       driver => "to-be-tested", 
    77        match => qr/^SMBus PIIX4 adapter at /, 
    7877     } ,  
    7978     {  
     
    26952694    if (exists $pci_list{$key}) { 
    26962695        $device = $pci_list{$key}; 
    2697         printf "Use driver `\%s' for device \%s: \%s\n", 
    2698                $try->{driver}, pci_busid($device), $try->{procid}; 
    2699         if ($try->{driver} eq "to-be-tested") { 
    2700           print "\nWe are currently looking for testers for this adapter!\n". 
    2701                 "Please check http://www.lm-sensors.org/wiki/Devices\n". 
    2702                 "and/or contact us if you want to help.\n\n"; 
    2703           print "Continue... "; 
    2704           <STDIN>; 
    2705           print "\n"; 
     2696        if ($try->{driver} =~ m/^to-be-/) { 
     2697          printf "No known driver for device \%s: \%s\n", 
     2698                 pci_busid($device), $try->{procid}; 
     2699 
     2700          if ($try->{driver} eq "to-be-tested") { 
     2701            print "\nWe are currently looking for testers for this adapter!\n". 
     2702                  "Please check http://www.lm-sensors.org/wiki/Devices\n". 
     2703                  "and/or contact us if you want to help.\n\n"; 
     2704            print "Continue... "; 
     2705            <STDIN>; 
     2706            print "\n"; 
     2707          } 
     2708        } else { 
     2709          printf "Use driver `\%s' for device \%s: \%s\n", 
     2710                 $try->{driver}, pci_busid($device), $try->{procid}; 
     2711          push @res, $try->{driver}; 
    27062712        } 
    2707         push @res,$try->{driver}; 
    27082713 
    27092714        # Delete from detected SMBus device list 
     
    27202725   
    27212726  if (! @res) { 
    2722     print "Sorry, no known PCI bus adapters found.\n"; 
     2727    print "Sorry, no supported PCI bus adapters found.\n"; 
    27232728  } 
    27242729  return @res; 
     
    56185623      if ($adap->{driver} eq "UNKNOWN") { 
    56195624        $modprobes .= "# modprobe unknown adapter ".$adap->{name}."\n"; 
    5620       } elsif ($adap->{driver} eq "DISABLED") { 
    5621         $modprobes .= "# modprobe disabled adapter ".$adap->{name}."\n"; 
    5622       } elsif ($adap->{driver} eq "to-be-written") { 
    5623         $modprobes .= "# no driver available for adapter ".$adap->{name}."\n"; 
    56245625      } else { 
    56255626        $modprobes .= "modprobe $adap->{driver}\n" 
     
    57585759      if (@adapters); 
    57595760    foreach $adapter (@adapters) { 
    5760       next if $adapter eq "DISABLED"; 
    5761       next if $adapter eq "to-be-tested"; 
    57625761      if (exists($modules_list{$adapter})) { 
    57635762        print "Module `$adapter' already loaded.\n";