Changeset 5503
- Timestamp:
- 12/02/08 22:42:35 (4 years ago)
- Location:
- lm-sensors/branches/lm-sensors-3.0.0
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/detect/sensors-detect (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/CHANGES
r5502 r5503 36 36 Probe chip types from safest to more risky (#2322) 37 37 Add an option to skip ISA probes except IPMI 38 Skip ISA detection by default if a Super I/O was found (#2322) 38 39 39 40 3.0.3 (2008-09-28) -
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect
r5502 r5503 2865 2865 } 2866 2866 2867 # Returns: 1 if device added to chips_detected, undef if not 2867 2868 sub probe_superio 2868 2869 { … … 2915 2916 }; 2916 2917 add_isa_to_chips_detected($chip->{driver}, $new_hash); 2918 return 1; 2917 2919 } 2918 2920 … … 2945 2947 } 2946 2948 2949 # Returns: number of device added to chips_detected (0 or 1) 2947 2950 sub scan_superio 2948 2951 { 2949 2952 my ($addrreg, $datareg) = @_; 2950 2953 my ($val, $found); 2954 my $added = 0; 2951 2955 2952 2956 printf("Probing for Super-I/O at 0x\%x/0x\%x\n", $addrreg, $datareg); … … 2986 2990 || ($chip->{devid} <= 0xff && 2987 2991 ($val >> 8) == $chip->{devid})) { 2988 probe_superio($addrreg, $datareg, $chip);2992 $added = 1 if probe_superio($addrreg, $datareg, $chip); 2989 2993 $found++; 2990 2994 } … … 3002 3006 } 3003 3007 $| = 0; 3008 return $added; 3004 3009 } 3005 3010 … … 4870 4875 sub main 4871 4876 { 4872 my ($input );4877 my ($input, $superio_found); 4873 4878 4874 4879 # We won't go very far if not root … … 4918 4923 unless (<STDIN> =~ /^\s*n/i) { 4919 4924 initialize_ioports(); 4920 scan_superio(0x2e, 0x2f);4921 scan_superio(0x4e, 0x4f);4925 $superio_found += scan_superio(0x2e, 0x2f); 4926 $superio_found += scan_superio(0x4e, 0x4f); 4922 4927 close_ioports(); 4923 4928 } 4924 4929 print "\n"; 4925 4930 4926 print "Some hardware monitoring chips are accessible through the ISA I/O ports.\n". 4927 "We have to write to arbitrary I/O ports to probe them. This is usually\n". 4928 "safe though. Yes, you do have ISA I/O ports even if you do not have any\n". 4929 "ISA slots! Do you want to scan the ISA I/O ports? (YES/no/ipmi only): "; 4931 printf "Some hardware monitoring chips are accessible through the ISA I/O ports.\n". 4932 "We have to write to arbitrary I/O ports to probe them. This is usually\n". 4933 "safe though. Yes, you do have ISA I/O ports even if you do not have any\n". 4934 "ISA slots! Do you want to scan the ISA I/O ports? (\%s): ", 4935 $superio_found ? "yes/no/IPMI ONLY" : "YES/no/ipmi only"; 4930 4936 $input = <STDIN>; 4931 4937 unless ($input =~ /^\s*n/i) { 4938 my $ipmi_only = ($superio_found && $input !~ /^\s*y/i) 4939 || (!$superio_found && $input =~ /^\s*i/i); 4932 4940 initialize_ioports(); 4933 scan_isa_bus($i nput =~ /^\s*i/i);4941 scan_isa_bus($ipmi_only); 4934 4942 close_ioports(); 4935 4943 }
