From owner-cvs-src@FreeBSD.ORG Fri Dec 16 15:39:42 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7F7016A420; Fri, 16 Dec 2005 15:39:42 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC15D43D45; Fri, 16 Dec 2005 15:39:39 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 3943985 for multiple; Fri, 16 Dec 2005 10:37:40 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jBGFdRP9080439; Fri, 16 Dec 2005 10:39:27 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Ruslan Ermilov Date: Fri, 16 Dec 2005 10:39:56 -0500 User-Agent: KMail/1.8.2 References: <200512161503.jBGF3GZb075045@repoman.freebsd.org> In-Reply-To: <200512161503.jBGF3GZb075045@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512161039.57740.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1210/Thu Dec 15 10:23:22 2005 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/pci amdpm.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2005 15:39:43 -0000 On Friday 16 December 2005 10:03 am, Ruslan Ermilov wrote: > ru 2005-12-16 15:03:16 UTC > > FreeBSD src repository > > Modified files: > sys/pci amdpm.c > Log: > Fix PCI ID of the AMD-8111 System Management controller so it matches > SMBus 1.0 and not SMBus 2.0. > > AMD-8111 hub (datasheet is publically available) implements both SMBus > 2.0 (a separate PCI device) and SMBus 1.0 (a subfunction of the System > Management Controller device with the base I/O address is accessible > through the CSR 0x58). This driver only supports AMD-756 SMBus 1.0 > compatible devices. > > With the patched sysutils/xmbmon port (to also fix PCI ID and to enable > smb(4) support), I now get: > > pciconf: > none0@pci0:7:2: class=0x0c0500 card=0x746a1022 chip=0x746a1022 rev=0x02 > hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' > device = 'AMD-8111 SMBus 2.0 Controller' > class = serial bus > subclass = SMBus > amdpm0@pci0:7:3: class=0x068000 card=0x746b1022 chip=0x746b1022 > rev=0x05 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' > device = 'AMD-8111 ACPI System Management Controller' > class = bridge > > dmesg: > amdpm0: port > 0x10e0-0x10ff at device 7.3 on pci0 smbus0: on > amdpm0 > > # mbmon -A -d > Summary of Detection: > * SMB monitor(s)[ioctl:AMD8111]: > ** Winbond Chip W83627HF/THF/THF-A found at slave address: 0x50. > ** Analog Dev. Chip ADM1027 found at slave address: 0x5C. > * ISA monitor(s): > ** Winbond Chip W83627HF/THF/THF-A found. > > I think the confusion comes from the fact that nobody really tried > SMBus with xmbmon :-), since sysutils/xmbmon port doesn't come with > SMBus support enabled, neither in FreeBSD 4, nor in later versions, > so mbmon(1) was just showing the values from the Winbond sensors > accessible through the ISA I/O method (mbmon -I), for me anyway. > > On my test machine, the amdpm(4) didn't even attach due to I/O port > allocation failure (who knows what the hell it read from CSR 0x58 > of the SMBus 2.0 device :-), which isn't in the CSR space). > > I've also checked that lm_sensors.org uses correct PCI ID for SMBus > 1.0 of AMD-8111: > > i2c-amd756.c: {PCI_VENDOR_ID_AMD, 0x746B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, > AMD8111 }, > > This driver is analogous to our amdpm.c which supports SMBus 1.0 > AMD-756 and compatible devices, including SMBus 1.0 on AMD-8111. > > i2c-amd8111.c: { 0x1022, 0x746a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, > > This driver is analogous to nForce-2/3/4, i2c-nforce2.c, which > supports SMBus 2.0, and which our amdpm.c does NOT support > (SMBus 2.0 uses a different, ACPI-unified, API to talk to SMBus). > At least I know for sure it doesn't work with my nForce3. :-) > > (The xmbmon port will be fixed to correct the PCI ID too and to > enable the smb(4) support.) So should the other stuff I just committed be axed then until the ACPI SMBUS stuff is added? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org