From nobody@FreeBSD.org  Tue Apr 12 16:50:04 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F353C106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Apr 2011 16:50:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id DCE018FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Apr 2011 16:50:03 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p3CGo3JI013897
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Apr 2011 16:50:03 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p3CGo3Mb013896;
	Tue, 12 Apr 2011 16:50:03 GMT
	(envelope-from nobody)
Message-Id: <201104121650.p3CGo3Mb013896@red.freebsd.org>
Date: Tue, 12 Apr 2011 16:50:03 GMT
From: Torsten Ackemann <t.ackemann@cs.ucl.ac.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] make amdtemp.c compatible with Llano/Brazos platforms
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156358
>Category:       kern
>Synopsis:       [patch] make amdtemp.c compatible with Llano/Brazos platforms
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jkim
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 12 16:50:12 UTC 2011
>Closed-Date:    Fri Feb 24 00:28:10 UTC 2012
>Last-Modified:  Fri Feb 24 00:28:10 UTC 2012
>Originator:     Torsten Ackemann
>Release:        FreeBSD 8.2-STABLE i386
>Organization:
UCL
>Environment:
FreeBSD eddie.lan 8.2-STABLE FreeBSD 8.2-STABLE #2: Mon Apr 11 15:17:23 BST 2011     root@eddie.lan:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
This patch adds the PCI device ID for newer AMD chipsets so that amdtemp.c will recognize them.

Inspired by a patch for Linux found at http://lists.lm-sensors.org/pipermail/lm-sensors/2011-February/031397.html.

Tested on AMD Hudson M1 chipset only (Asus E35M1-M PRO).
>How-To-Repeat:

>Fix:
--- sys/dev/amdtemp/amdtemp.c.orig      2009-08-20 21:23:28.000000000 +0100
+++ sys/dev/amdtemp/amdtemp.c   2011-04-11 15:01:11.000000000 +0100
@@ -72,6 +72,7 @@
 #define DEVICEID_AMD_MISC0F    0x1103
 #define DEVICEID_AMD_MISC10    0x1203
 #define DEVICEID_AMD_MISC11    0x1303
+#define DEVICEID_AMD_CNB17H    0x1703

 static struct amdtemp_product {
        uint16_t        amdtemp_vendorid;
@@ -80,6 +81,7 @@
        { VENDORID_AMD, DEVICEID_AMD_MISC0F },
        { VENDORID_AMD, DEVICEID_AMD_MISC10 },
        { VENDORID_AMD, DEVICEID_AMD_MISC11 },
+       { VENDORID_AMD, DEVICEID_AMD_CNB17H },
        { 0, 0 }
 };


Patch attached with submission follows:

--- sys/dev/amdtemp/amdtemp.c.orig      2009-08-20 21:23:28.000000000 +0100
+++ sys/dev/amdtemp/amdtemp.c   2011-04-11 15:01:11.000000000 +0100
@@ -72,6 +72,7 @@
 #define DEVICEID_AMD_MISC0F    0x1103
 #define DEVICEID_AMD_MISC10    0x1203
 #define DEVICEID_AMD_MISC11    0x1303
+#define DEVICEID_AMD_CNB17H    0x1703

 static struct amdtemp_product {
        uint16_t        amdtemp_vendorid;
@@ -80,6 +81,7 @@
        { VENDORID_AMD, DEVICEID_AMD_MISC0F },
        { VENDORID_AMD, DEVICEID_AMD_MISC10 },
        { VENDORID_AMD, DEVICEID_AMD_MISC11 },
+       { VENDORID_AMD, DEVICEID_AMD_CNB17H },
        { 0, 0 }
 };


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jkim 
Responsible-Changed-By: jkim 
Responsible-Changed-When: Tue Apr 12 18:17:46 UTC 2011 
Responsible-Changed-Why:  
I was working on a similar patch.  I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156358 
State-Changed-From-To: open->closed 
State-Changed-By: jkim 
State-Changed-When: Fri Feb 24 00:27:19 UTC 2012 
State-Changed-Why:  
A new amdtemp was committed to head.  Sorry for the delay. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156358 
>Unformatted:
