From owner-freebsd-bugs Tue Aug 20 4:52:52 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41B2B37B400 for ; Tue, 20 Aug 2002 04:52:44 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A42643E4A for ; Tue, 20 Aug 2002 04:52:43 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7KBpNJU088310 for ; Tue, 20 Aug 2002 04:51:23 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7KBpMxe088309; Tue, 20 Aug 2002 04:51:22 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B26E37B400 for ; Tue, 20 Aug 2002 04:40:14 -0700 (PDT) Received: from yebisu.j.dendai.ac.jp (yebisu.j.dendai.ac.jp [133.14.49.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3E3743E42 for ; Tue, 20 Aug 2002 04:40:13 -0700 (PDT) (envelope-from fujimoto@yebisu.j.dendai.ac.jp) Received: by yebisu.j.dendai.ac.jp (Postfix, from userid 1001) id 65FC64083F; Tue, 20 Aug 2002 20:40:12 +0900 (JST) Message-Id: <20020820114012.65FC64083F@yebisu.j.dendai.ac.jp> Date: Tue, 20 Aug 2002 20:40:12 +0900 (JST) From: FUJIMOTO Kou Reply-To: FUJIMOTO Kou To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/41812: patch to detect/function AMD768 SMBus Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 41812 >Category: kern >Synopsis: patch to detect/function AMD768 SMBus >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Aug 20 04:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: FUJIMOTO Kou >Release: FreeBSD 4.6-STABLE i386 >Organization: Tokyo Denki University >Environment: System: FreeBSD yebisu.j.dendai.ac.jp 4.6-STABLE FreeBSD 4.6-STABLE #26: Tue Aug 13 00:25:35 JST 2002 root@yebisu.j.dendai.ac.jp:/usr/src/sys/compile/XPSMP i386 >Description: The attached patch for sys/pci/amdpm.c enables kernel to recognize AMD766/768 SMBus interface. AMD766/768 SMBus seems to be compatible with that of AMD756, and so the patch just adds PCI device IDs and modifies one conditional. >How-To-Repeat: It works fine with ASUS A7M266-D (AMD768 chipset) and ports/sysutils/xmbmon, though I never examined with AMD766 or other applications. >Fix: --- amdpm.c.orig Wed Oct 10 21:10:26 2001 +++ amdpm.c Mon Mar 11 14:27:58 2002 @@ -66,6 +66,8 @@ #define AMDPM_VENDORID_AMD 0x1022 #define AMDPM_DEVICEID_AMD756PM 0x740b +#define AMDPM_DEVICEID_AMD766PM 0x7413 +#define AMDPM_DEVICEID_AMD768PM 0x7443 /* PCI Configuration space registers */ #define AMDPCI_PMBASE 0x58 @@ -155,10 +157,14 @@ amdpm_probe(device_t dev) { u_long base; - + u_int16_t did; + + did = pci_get_device(dev); if ((pci_get_vendor(dev) == AMDPM_VENDORID_AMD) && - (pci_get_device(dev) == AMDPM_DEVICEID_AMD756PM)) { - device_set_desc(dev, "AMD 756 Power Management Controller"); + ((did == AMDPM_DEVICEID_AMD756PM) || + (did == AMDPM_DEVICEID_AMD766PM) || + (did == AMDPM_DEVICEID_AMD768PM))) { + device_set_desc(dev, "AMD 756/766/768 Power Management Controller"); /* * We have to do this, since the BIOS won't give us the @@ -215,8 +221,8 @@ if (!amdsmb_sc->smbus) return (EINVAL); - device_set_desc(dev, "AMD 756 SMBus interface"); - device_printf(dev, "AMD 756 SMBus interface\n"); + device_set_desc(dev, "AMD 756/766/768 SMBus interface"); + device_printf(dev, "AMD 756/766/768 SMBus interface\n"); return (0); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message