From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 8 18:00:16 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6369C10656A4; Tue, 8 Sep 2009 18:00:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 36C5C8FC1B; Tue, 8 Sep 2009 18:00:16 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id DDA0F46B49; Tue, 8 Sep 2009 14:00:15 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2FB1B8A021; Tue, 8 Sep 2009 14:00:15 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Tue, 8 Sep 2009 13:35:50 -0400 User-Agent: KMail/1.9.7 References: <4AA41D4A.4080805@freebsd.org> In-Reply-To: <4AA41D4A.4080805@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909081335.50980.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 08 Sep 2009 14:00:15 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: intpm: add support for AMD SBxxx SMBus controller X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 18:00:16 -0000 On Sunday 06 September 2009 4:36:26 pm Andriy Gapon wrote: > > Please review the included patch that adds support from SMBus controller found > in AMD SB600/700/710/750 south-bridges (not sure about SB800). > As I understand, this controller works only in polling mode, so support for this > mode was enabled in the code. > > There are two places that I was not sure about, so I marked them with XXX. > The static variable intsmb_cfg_irq9 would be problematic if there are multiple > SMBus controllers in a system. I would move this into the softc and set it in the attach() routine by duplicating that bit of the switch() statement in attach(). > Also, PCI_INTR_SMB_IRQ_AMD is probably not the best name. Maybe something like > PCI_INTR_SMB_IRQ_OTHER or just PCI_INTR_SMB_IRQ would be better? I would maybe just change the driver to print the value in hex instead of bogus and not add a #define for '2'. The PIIX4 datasheet says '2' is a reserved value for that field FWIW. -- John Baldwin