NetBSD Problem Report #31963

From njoly@pasteur.fr  Mon Oct 31 22:48:56 2005
Return-Path: <njoly@pasteur.fr>
Received: from electre.pasteur.fr (electre.pasteur.fr [157.99.64.120])
	by narn.netbsd.org (Postfix) with ESMTP id 2471363B900
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 31 Oct 2005 22:48:55 +0000 (UTC)
Message-Id: <20051031224858.62B514202C@cixy.dial.pasteur.fr>
Date: Mon, 31 Oct 2005 23:48:58 +0100 (CET)
From: njoly@pasteur.fr
Reply-To: njoly@pasteur.fr
To: gnats-bugs@netbsd.org
Subject: Wrong VIA Technologies VT82C686A SMBus Controller in pcidevs
X-Send-Pr-Version: 3.95

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 31 22:49:01 +0000 2005
>Closed-Date:    Sun Mar 04 13:25:30 +0000 2018
>Last-Modified:  Sun Mar 04 13:25:30 +0000 2018
>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

>Release-Note:

>Audit-Trail:
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
To: gnats-bugs@netbsd.org
Cc: njoly@pasteur.fr
Subject: Re: kern/31963: Wrong VIA Technologies VT82C686A SMBus Controller in pcidevs
Date: Mon, 31 Oct 2005 23:58:48 +0100

 On Mon, Oct 31, 2005 at 10:49:01PM +0000, njoly@pasteur.fr wrote:
 > -			 * 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 !

 > -			 * 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 !

 Your patch isn't consistent.

From: Nicolas Joly <njoly@pasteur.fr>
To: gnats-bugs@NetBSD.org
Cc: Nicolas Joly <njoly@pasteur.fr>
Subject: Re: kern/31963: Wrong VIA Technologies VT82C686A SMBus Controller in pcidevs
Date: Tue, 1 Nov 2005 08:31:44 +0100

 --fUYQa+Pmc3FrFX/N
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 On Mon, Oct 31, 2005 at 11:00:05PM +0000, Pavel Cahyna wrote:
 > The following reply was made to PR kern/31963; it has been noted by GNATS.
 > 
 > From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
 > To: gnats-bugs@netbsd.org
 > Cc: njoly@pasteur.fr
 > Subject: Re: kern/31963: Wrong VIA Technologies VT82C686A SMBus Controller in pcidevs
 > Date: Mon, 31 Oct 2005 23:58:48 +0100
 > 
 >  On Mon, Oct 31, 2005 at 10:49:01PM +0000, njoly@pasteur.fr wrote:
 >  > -			 * 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 !
 >  
 >  > -			 * 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 !
 >  
 >  Your patch isn't consistent.

 Oops. Thanks for noticing it. Attached an updated version.

 -- 
 Nicolas Joly

 Biological Software and Databanks.
 Institut Pasteur, Paris.

 --fUYQa+Pmc3FrFX/N
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="netbsd-viapwr.diff"

 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	1 Nov 2005 07:12: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 Power Management Controller
 +			 * 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	1 Nov 2005 07:13: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	1 Nov 2005 07:14:09 -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	1 Nov 2005 07:14:59 -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	1 Nov 2005 07:16:13 -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

 --fUYQa+Pmc3FrFX/N--

From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/31963 CVS commit: src/sys
Date: Sun, 4 Mar 2018 13:24:17 +0000

 Module Name:	src
 Committed By:	jdolecek
 Date:		Sun Mar  4 13:24:17 UTC 2018

 Modified Files:
 	src/sys/arch/x86/pci: pcib.c
 	src/sys/dev/pci: pcidevs viaenv.c

 Log Message:
 according to VT82C686A chip specs, the VIA Technologies device 0x3057
 is more a Power Management controller, rename the pcidevs entry and device
 macro

 PR kern/31963 by Nicolas Joly


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/pci/pcib.c
 cvs rdiff -u -r1.1318 -r1.1319 src/sys/dev/pci/pcidevs
 cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/viaenv.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Sun, 04 Mar 2018 13:25:30 +0000
State-Changed-Why:
Patch applied, thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.