"probe" module param broken for it87 in Linux 2.6.6
Quoted 9 lines · Greg KH
Quoted 4 lines · Bj?rn Mork
BTW, I once wrote some SuperIO probing code for the IT8712F so that users wouldn't need to know the register address on their particular motherboard. This code is included in the current
lm_sensorsversion of the driver. Any chance of getting this into the kernel version too?Care to port it to the 2.6 driver and send me a patch? Make sure to cc:
the sensors mailing list so the other developers can see it too.
Sure. Not much porting though. The code was originally based on the similar SuperIO detection in w83627hf.c and this doesn't seem to have changed much in 2.6. Not sure about the style, or that this is the correct way to do things, but at least it's the way it has been done before ;-)
There were some concerns about detecting the IT8712F since it has a non-standard config mode exit sequence. Theoretically we risk putting another SuperIO chip in config mode. Therefore, just in case, the "standard" exit command has been added to superio_exit(). This does not seem to matter to the IT8712F. The code as it is has been in the lm_sensors package for some time.
Bj?rn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: it87-2.6.6.patch
Type: text/x-patch
Size: 2573 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040512/648bec2f/it87-2.6.6.bin
Becides the issues already brought up...
Review
Quoted 2 lines · Bj?rn Mork
(quoted diff) +2
-0+ if (!it87_find(&addr)) { + printk("it87.o: new ISA address: 0x%04x\n", addr);
That printk is wrong (no KERN_ level, or dev_printk() style use). Please fix it in your next revision of this patch.
thanks,
greg k-h
Quoted 6 lines
There were some concerns about detecting the IT8712F since it has a non-standard config mode exit sequence. Theoretically we risk putting another SuperIO chip in config mode. Therefore, just in case, the "standard" exit command has been added to
superio_exit(). This does not seem to matter to the IT8712F. The code as it is has been in thelm_sensorspackage for some time.
That's what we first thought but it's not correct.
The outb(0x02, REG), outb(0x02, VAL) exit sequence is actually the standard exit sequence per ISA PNP spec. The other exit sequence is used by Winbond, VIA and SMSC but isn't part of the standard.
The Winbond method is harmless in any case, since it doesn't actually write anything, so I agree it wouldn't hurt to leave it in the it87 driver.
The standard exit sequence is believed to work on Winbond chips as well, although it may be slightly slower and/or more agressive than the documented exit sequence.
In sensors-detect we now default to the standard (outb(0x02, REG), outb(0x02, VAL)) exit sequence for all Super-I/O chips unless we have successfully detected a chip for which we know an alternate exit sequence. We have had no complaint so far, so it has to work with no side effect.
So I'd suggest that you simply use the standard exit sequence in the it87 driver (the second one in your current patch). A patch for the 2.4 driver would be appreciated as well.
Thanks.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Jean Delvare
AppliedQuoted 4 lines
Here is a patch against current
lm_sensorscvs using just the standard, documented exit sequence.Removing code is my speciality :-)
Thanks, applied.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 17 lines · Bj?rn Mork
Quoted 3 lines · Jean Delvare
So I'd suggest that you simply use the standard exit sequence in the it87 driver (the second one in your current patch). A patch for the 2.4 driver would be appreciated as well.
OK. I've attached a new version of the patch against linux-2.6.6. I'll send a patch against current
lm_sensorsCVS removing the extra exit command in a separate mail.Quoted 6 lines · Greg KH
Review
Quoted 2 lines · Bj?rn Mork
(quoted diff) +2
-0+ if (!it87_find(&addr)) { + printk("it87.o: new ISA address: 0x%04x\n", addr);That printk is wrong (no
KERN_level, ordev_printk()style use). Please fix it in your next revision of this patch.
Quoted 4 lines
Errh, I just added it to document my sloppyness. It was never meant to be in the patch I sent you. Sorry. Removed in the attached patch. The style of these drivers seem to be "just working, making no noise" so I assume informational printk's are unwanted.
Looks good, applied, thanks.
greg k-h
Quoted 3 lines · Jean Delvare
So I'd suggest that you simply use the standard exit sequence in the it87 driver (the second one in your current patch). A patch for the 2.4 driver would be appreciated as well.
Here is a patch against current lm_sensors cvs using just the standard, documented exit sequence.
Removing code is my speciality :-)
Bj?rn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: it87-lm_sensors-cvs2004-05-13.patch
Type: text/x-patch
Size: 559 bytes
Desc: against lm_sensors cvs removing extra exit command
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040513/6384a60c/it87-lm_sensors-cvs2004-05-13.bin
Quoted 3 lines · Jean Delvare
So I'd suggest that you simply use the standard exit sequence in the it87 driver (the second one in your current patch). A patch for the 2.4 driver would be appreciated as well.
OK. I've attached a new version of the patch against linux-2.6.6. I'll send a patch against current lm_sensors CVS removing the extra exit command in a separate mail.
Quoted 6 lines · Greg KH
Review
Quoted 2 lines · Bj?rn Mork
(quoted diff) +2
-0+ if (!it87_find(&addr)) { + printk("it87.o: new ISA address: 0x%04x\n", addr);That printk is wrong (no
KERN_level, ordev_printk()style use). Please fix it in your next revision of this patch.
Errh, I just added it to document my sloppyness. It was never meant to be in the patch I sent you. Sorry. Removed in the attached patch. The style of these drivers seem to be "just working, making no noise" so I assume informational printk's are unwanted.
Bj?rn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: it87-2.6.6.patch
Type: text/x-patch
Size: 2366 bytes
Desc: against linux-2.6.6 adding superIO detection
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040513/a9a2df87/it87-2.6.6.bin