[Bug 528741] [NEW] Sensors command is return an incorrect value for CPU_0 VID
David Partington
david at partington.com
Fri Feb 26 22:54:48 UTC 2010
Public bug reported:
Binary package hint: linux-generic
I have a Biostar motherboard with the it8716 superio device. When I
execute the sensors hardware monitor the VID values is incorrect. In
researching this issue I found that the it87.c module was modified in
January 2009 because of bug #357766 to include support for it8718 and
it8720 superio devices. The introduction of this change has created the
issue. A new definition. IT87_REG_VID 0x0a, was created
because the it8718 and it8720 devices have a different offset for the
VID register than the rest of the it87xx devices. See the two sets of
definitions below:
126 /* Logical device 7 registers (IT8712F and later) */
127 #define IT87_SIO_GPIO3_REG 0x27
128 #define IT87_SIO_GPIO5_REG 0x29
129 #define IT87_SIO_PINX2_REG 0x2c /* Pin selection */
130 #define IT87_SIO_VID_REG 0xfc /* VID value */
161 /* The IT8718F and IT8720F have the VID value in a different register, in
162 Super-I/O configuration space. */
163 #define IT87_REG_VID 0x0a
When the logic was implemented to support these new devices the
incorrect definition was used in the code. See below"
1062 if ((sio_data->type == it8718 || sio_data->type == it8720)
1063 && !(sio_data->skip_vid))
1064 sio_data->vid_value = superio_inb(IT87_SIO_VID_REG);
1065
As you can see the original definition - IT87_SIO_VID_REG - was used
when the new definition - IT87_REG_VID - should have been used.
The inverse logic is also incorrect. See below:
1559 /* The 8705 does not have VID capability.
1560 The 8718 and the 8720 don't use IT87_REG_VID for the
1561 same purpose. */
1562 if (data->type == it8712 || data->type == it8716) {
1563 data->vid = it87_read_value(data, IT87_REG_VID);
1564 /* The older IT8712F revisions had only 5 VID pins,
1565 but we assume it is always safe to read 6 bits. */
1566 data->vid &= 0x3f;
1567 }
Again, as you can see the incorrect definition was used for the it8712
and it8716 devices. Plus comment is incorrect. The definition -
IT87_REG_VID - was used when - IT87_SIO_VID_REG - should have been used.
Thus my suggest repair for this issue should be:
1062 if ((sio_data->type == it8718 || sio_data->type == it8720)
1063 && !(sio_data->skip_vid))
1064 sio_data->vid_value = superio_inb(IT87_REG_VID);
1065
1559 /* The 8705 does not have VID capability.
1560 The 8718 and the 8720 don't use IT87_SIO_VID_REG for the
1561 same purpose. */
1562 if (data->type == it8712 || data->type == it8716) {
1563 data->vid = it87_read_value(data, IT87_SIO_VID_REG);
1564 /* The older IT8712F revisions had only 5 VID pins,
1565 but we assume it is always safe to read 6 bits. */
1566 data->vid &= 0x3f;
1567 }
ProblemType: Bug
Architecture: amd64
Date: Fri Feb 26 16:19:48 2010
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/yelp
NonfreeKernelModules: nvidia
Package: yelp 2.28.0-0ubuntu2
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-20.57-generic
SourcePackage: yelp
Uname: Linux 2.6.31-20-generic x86_64
** Affects: linux-meta (Ubuntu)
Importance: Undecided
Status: New
** Tags: hwmon it87 kernel
--
Sensors command is return an incorrect value for CPU_0 VID
https://bugs.launchpad.net/bugs/528741
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux-meta in ubuntu.
More information about the kernel-bugs
mailing list