Subject: kern/31963: Wrong VIA Technologies VT82C686A SMBus Controller in pcidevs
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 10/31/2005 22:49:01
>Number: 31963
>Category: kern
>Synopsis: Wrong VIA Technologies VT82C686A SMBus Controller in pcidevs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 31 22:49:01 +0000 2005
>Originator: Nicolas Joly
>Release: NetBSD 3.99.10
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD cixy.dial.pasteur.fr 3.99.10 NetBSD 3.99.10 (GENERIC) #8: Mon Oct 31 21:53:33 CET 2005 njoly@cixy.dial.pasteur.fr:/local/src/NetBSD/obj/i386/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
According to the VT82C686A chip specs, the VIA Technologies device 0x3057
is not only a SMBus contoller, but a more Power Management controller:
"Function 4 Regs - Power Management, SMBus and HWM
This section describes the ACPI (Advanced Configuration and
Power Interface) Power Management system of the
VT82C686A which includes a System Management Bus
(SMBus) interface controller and Hardware Monitoring
(HWM) subsystem. The power management system of the
VT82C686A supports both ACPI and legacy power
management functions and is compatible with the APM v1.2
and ACPI v1.0 specifications."
This device should better be renamed from `VT82C686A SMBus Controller' to
`VT82C686A Power Management Controller' in pcidevs. This is more consistent
with other VIATECH *_PWR devices.
While here fix a typo in sys/arch/i386/pci/pcib.c, that was propagated to
amd64 and xen versions.
>How-To-Repeat:
Boot a kernel on a machine with VT82C686A chip, and compare with datasheet.
>Fix:
Index: sys/arch/amd64/pci/pcib.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/pci/pcib.c,v
retrieving revision 1.4
diff -u -r1.4 pcib.c
--- sys/arch/amd64/pci/pcib.c 30 Aug 2004 15:05:16 -0000 1.4
+++ sys/arch/amd64/pci/pcib.c 31 Oct 2005 21:16:39 -0000
@@ -152,10 +152,10 @@
break;
case PCI_VENDOR_VIATECH:
switch (PCI_PRODUCT(pa->pa_id)) {
- case PCI_PRODUCT_VIATECH_VT82C686A_SMB:
+ case PCI_PRODUCT_VIATECH_VT82C686A_PWR:
/*
- * The VIA VT82C686A SMBus Controller itself as
- * ISA bridge, but it's wrong !
+ * The VIA VT82C686A SMBus Power Management
+ * identifies itself as ISA bridge, but it's wrong !
*/
return (0);
}
Index: sys/arch/i386/pci/pcib.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/pci/pcib.c,v
retrieving revision 1.36
diff -u -r1.36 pcib.c
--- sys/arch/i386/pci/pcib.c 26 Jun 2005 02:09:59 -0000 1.36
+++ sys/arch/i386/pci/pcib.c 31 Oct 2005 21:17:19 -0000
@@ -149,10 +149,10 @@
break;
case PCI_VENDOR_VIATECH:
switch (PCI_PRODUCT(pa->pa_id)) {
- case PCI_PRODUCT_VIATECH_VT82C686A_SMB:
+ case PCI_PRODUCT_VIATECH_VT82C686A_PWR:
/*
- * The VIA VT82C686A SMBus Controller itself as
- * ISA bridge, but it's wrong !
+ * The VIA VT82C686A Power Management Controller
+ * identifies itself as ISA bridge, but it's wrong !
*/
return (0);
}
Index: sys/arch/xen/xen/pcib.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/xen/pcib.c,v
retrieving revision 1.2
diff -u -r1.2 pcib.c
--- sys/arch/xen/xen/pcib.c 9 Mar 2005 22:39:21 -0000 1.2
+++ sys/arch/xen/xen/pcib.c 31 Oct 2005 21:18:08 -0000
@@ -150,10 +150,10 @@
break;
case PCI_VENDOR_VIATECH:
switch (PCI_PRODUCT(pa->pa_id)) {
- case PCI_PRODUCT_VIATECH_VT82C686A_SMB:
+ case PCI_PRODUCT_VIATECH_VT82C686A_PWR:
/*
- * The VIA VT82C686A SMBus Controller itself as
- * ISA bridge, but it's wrong !
+ * The VIA VT82C686A Power Management Controller
+ * identifies itself as ISA bridge, but it's wrong !
*/
return (0);
}
Index: sys/dev/pci/pcidevs
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pcidevs,v
retrieving revision 1.733
diff -u -r1.733 pcidevs
--- sys/dev/pci/pcidevs 5 Oct 2005 00:43:58 -0000 1.733
+++ sys/dev/pci/pcidevs 31 Oct 2005 21:18:58 -0000
@@ -2968,7 +2968,7 @@
product VIATECH VT82C586_PWR 0x3040 VT82C586 Power Management Controller
product VIATECH VT3043 0x3043 VT3043 (Rhine) 10/100 Ethernet
product VIATECH VT6306 0x3044 VT6306 IEEE 1394 Host Controller
-product VIATECH VT82C686A_SMB 0x3057 VT82C686A SMBus Controller
+product VIATECH VT82C686A_PWR 0x3057 VT82C686A Power Management Controller
product VIATECH VT82C686A_AC97 0x3058 VT82C686A AC-97 Audio Controller
product VIATECH VT8233_AC97 0x3059 VT8233/VT8235 AC-97 Audio Controller
product VIATECH VT6102 0x3065 VT6102 (Rhine II) 10/100 Ethernet
Index: sys/dev/pci/viapm.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/viapm.c,v
retrieving revision 1.13
diff -u -r1.13 viapm.c
--- sys/dev/pci/viapm.c 14 Sep 2004 18:57:35 -0000 1.13
+++ sys/dev/pci/viapm.c 31 Oct 2005 21:20:12 -0000
@@ -70,7 +70,7 @@
return 0;
switch (PCI_PRODUCT(pa->pa_id)) {
- case PCI_PRODUCT_VIATECH_VT82C686A_SMB:
+ case PCI_PRODUCT_VIATECH_VT82C686A_PWR:
#ifdef notyet
case PCI_PRODUCT_VIATECH_VT8231_PWR:
#endif