From owner-freebsd-current@FreeBSD.ORG Thu Dec 8 14:57:02 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 790BD16A423 for ; Thu, 8 Dec 2005 14:57:02 +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 6B1D243D67 for ; Thu, 8 Dec 2005 14:56:52 +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 3386560 for multiple; Thu, 08 Dec 2005 09:58:54 -0500 Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jB8EugW0071318; Thu, 8 Dec 2005 09:56:46 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Artemiev Igor Date: Thu, 8 Dec 2005 09:51:51 -0500 User-Agent: KMail/1.8.3 References: <20051206093020.691e1483.ai@bmc.brk.ru> <200512070816.46165.jhb@freebsd.org> <20051208090835.471a5584.ai@bmc.brk.ru> In-Reply-To: <20051208090835.471a5584.ai@bmc.brk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200512080951.52387.jhb@freebsd.org> 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: freebsd-current@freebsd.org Subject: Re: [PATCH] nForce2 SMBus support X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2005 14:57:02 -0000 On Thursday 08 December 2005 01:08 am, Artemiev Igor wrote: > On Wed, 7 Dec 2005 08:16:44 -0500 > > John Baldwin wrote: > > On Tuesday 06 December 2005 01:30 am, Artemiev Igor wrote: > > > I add pseudo-device amdpmsub because nForce2 have two SMBus > > > interfaces. Patch here: > > > > > > http://bmc.brk.ru/~ai/patches/amdpm.nforce2_support.diff > > > > > > dmesg output: > > > > > > amdpm0: port > > > 0xdc00-0xdc1f,0x5000-0x501f,0x5500 -0x551f irq 5 at device 1.1 on > > > pci0 smbus0: on amdpm0 > > > smb0: on smbus0 > > > amdpmsub0: on amdpm0 > > > smbus1: on amdpmsub0 > > > smb1: on smbus1 > > > > > > I`ve tested it with xmbmon and all works fine. > > > > Is there any reason you can't make smbus1 a childof amdpm0 directly > > and skip the amdpmsub0 device? > > I simply do not see any way to do it with current implementation of > ampdm(and also viapm, etc) & smbus, without modifying the smb->smbus->smb= us > driver interface. I may be wrong, but as far as I know, currently it's one > smb for one driver (smbus_* limitation) Hmm, it doesn't specify the child device, just the parent. *sigh* That's= =20 lame. You don't have to call it amdpmsub0 btw, you could just call it amdp= m1=20 if you wanted and have amdpm1 a child of amdpm0. All that would need to=20 change for that is the NF2_SUBDEV string and the DRIVER_MODULE line (it wou= ld=20 be DRIVER_MODULE(amdpm, amdpm, ...)). This has the added advantage that yo= u=20 don't have to patch smbus.c. =2D-=20 John Baldwin =A0<>< =A0http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org