All of lore.kernel.org
 help / color / mirror / Atom feed
* "probe" module param broken for it87 in Linux 2.6.6
@ 2005-05-19  6:24 Bjørn Mork
  2005-05-19  6:24 ` Jean Delvare
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Bjørn Mork @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Greg KH <greg@kroah.com> writes:
> On Tue, May 11, 2004 at 01:13:40AM +0200, Bj?rn Mork wrote:
>
>> 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_sensors version
>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* "probe" module param broken for it87 in Linux 2.6.6
  2005-05-19  6:24 "probe" module param broken for it87 in Linux 2.6.6 Bjørn Mork
                   ` (2 preceding siblings ...)
  2005-05-19  6:24 ` Bjørn Mork
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Bjørn Mork
  2005-05-19  6:24 ` Greg KH
  5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

> 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.

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.

-- 
Jean Delvare
http://khali.linux-fr.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* "probe" module param broken for it87 in Linux 2.6.6
  2005-05-19  6:24 "probe" module param broken for it87 in Linux 2.6.6 Bjørn Mork
  2005-05-19  6:24 ` Jean Delvare
@ 2005-05-19  6:24 ` Greg KH
  2005-05-19  6:24 ` Bjørn Mork
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Becides the issues already brought up...

On Wed, May 12, 2004 at 04:38:03PM +0200, Bj?rn Mork wrote:
> +	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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* "probe" module param broken for it87 in Linux 2.6.6
  2005-05-19  6:24 "probe" module param broken for it87 in Linux 2.6.6 Bjørn Mork
  2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Greg KH
@ 2005-05-19  6:24 ` Bjørn Mork
  2005-05-19  6:24 ` Jean Delvare
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bjørn Mork @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Jean Delvare <khali@linux-fr.org> writes:
> 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.

Greg KH <greg@kroah.com> writes:
> On Wed, May 12, 2004 at 04:38:03PM +0200, Bj?rn Mork wrote:
>> +	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.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* "probe" module param broken for it87 in Linux 2.6.6
  2005-05-19  6:24 "probe" module param broken for it87 in Linux 2.6.6 Bjørn Mork
                   ` (3 preceding siblings ...)
  2005-05-19  6:24 ` Jean Delvare
@ 2005-05-19  6:24 ` Bjørn Mork
  2005-05-19  6:24 ` Greg KH
  5 siblings, 0 replies; 7+ messages in thread
From: Bjørn Mork @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Jean Delvare <khali@linux-fr.org> writes:

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* "probe" module param broken for it87 in Linux 2.6.6
  2005-05-19  6:24 "probe" module param broken for it87 in Linux 2.6.6 Bjørn Mork
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Greg KH
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

> Here is a patch against current lm_sensors cvs using just the
> standard, documented exit sequence.  
> 
> Removing code is my speciality :-)

Thanks, applied.

-- 
Jean Delvare
http://khali.linux-fr.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* "probe" module param broken for it87 in Linux 2.6.6
  2005-05-19  6:24 "probe" module param broken for it87 in Linux 2.6.6 Bjørn Mork
                   ` (4 preceding siblings ...)
  2005-05-19  6:24 ` Bjørn Mork
@ 2005-05-19  6:24 ` Greg KH
  5 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

On Thu, May 13, 2004 at 06:09:57PM +0200, Bj?rn Mork wrote:
> Jean Delvare <khali@linux-fr.org> writes:
> > 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.
> 
> Greg KH <greg@kroah.com> writes:
> > On Wed, May 12, 2004 at 04:38:03PM +0200, Bj?rn Mork wrote:
> >> +	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.
> 
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-05-19  6:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:24 "probe" module param broken for it87 in Linux 2.6.6 Bjørn Mork
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Greg KH
2005-05-19  6:24 ` Bjørn Mork
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Bjørn Mork
2005-05-19  6:24 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.