Changeset 1490
- Timestamp:
- 08/10/02 20:29:40 (6 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (1 diff)
- lm-sensors/trunk/doc/busses/i2c-i801 (modified) (1 diff)
- lm-sensors/trunk/kernel/busses/i2c-i801.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r1489 r1490 21 21 Library: Fix fan3_div writes for w8378* and it87 22 22 Module dmi_scan: new 23 Module i2c-i801: Check for uninitialized base address; 24 enable if not enabled 23 25 Module i2c-piix4: Refuse to load on IBM systems 24 26 Module lm92: Fix in-kernel initialization lm-sensors/trunk/doc/busses/i2c-i801
r1460 r1490 20 20 ----------------- 21 21 22 * force: int23 Forcibly enable the ICH. DANGEROUS!24 22 * force_addr: int 25 23 Forcibly enable the ICH at the given address. EXTREMELY DANGEROUS! lm-sensors/trunk/kernel/busses/i2c-i801.c
r1459 r1490 119 119 120 120 /* insmod parameters */ 121 122 /* If force is set to anything different from 0, we forcibly enable the123 I801. DANGEROUS! */124 static int force = 0;125 MODULE_PARM(force, "i");126 MODULE_PARM_DESC(force, "Forcibly enable the I801. DANGEROUS!");127 121 128 122 /* If force_addr is set to anything different from 0, we forcibly enable … … 226 220 if (force_addr) { 227 221 i801_smba = force_addr & 0xfff0; 228 force = 0;229 222 } else { 230 223 pci_read_config_word(I801_dev, SMBBA, &i801_smba); 231 224 i801_smba &= 0xfff0; 225 if(i801_smba == 0) { 226 printk(KERN_ERR "i2c-i801.o: SMB base address uninitialized - upgrade BIOS or use force_addr=0xaddr\n"); 227 return -ENODEV; 228 } 232 229 } 233 230 … … 244 241 pci_write_config_byte(I801_dev, SMBHSTCFG, temp); 245 242 /* If force_addr is set, we program the new address here. Just to make 246 sure, we disable the I801first. */243 sure, we disable the device first. */ 247 244 if (force_addr) { 248 245 pci_write_config_byte(I801_dev, SMBHSTCFG, temp & 0xfe); … … 253 250 "address %04x!\n", i801_smba); 254 251 } else if ((temp & 1) == 0) { 255 if (force) { 256 /* NOTE: This assumes I/O space and other allocations WERE 257 done by the Bios! Don't complain if your hardware does weird 258 things after enabling this. :') Check for Bios updates before 259 resorting to this. */ 260 pci_write_config_byte(I801_dev, SMBHSTCFG, 261 temp | 1); 262 printk 263 (KERN_WARNING "i2c-i801.o: WARNING: I801 SMBus interface has been FORCEFULLY " 264 "ENABLED!\n"); 265 } else { 266 printk 267 (KERN_ERR "SMBUS: Error: Host SMBus controller not enabled!\n"); 268 error_return = -ENODEV; 269 goto END; 270 } 252 pci_write_config_byte(I801_dev, SMBHSTCFG, temp | 1); 253 printk(KERN_WARNING "i2c-i801.o: enabling SMBus device\n"); 271 254 } 272 255 … … 591 574 int hwpec = 0; 592 575 int block = 0; 593 int ret, xact ;576 int ret, xact = 0; 594 577 595 578 #ifdef HAVE_PEC
