Bug 186587 - [amdtemp] [patch] Add Temperature Support for AMD Motherboard Family 16h (Kabini)
Summary: [amdtemp] [patch] Add Temperature Support for AMD Motherboard Family 16h (Kab...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Christian Brueffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-09 13:00 UTC by David Rufino
Modified: 2014-03-28 09:01 UTC (History)
0 users

See Also:


Attachments
file.diff (842 bytes, patch)
2014-02-09 13:00 UTC, David Rufino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Rufino 2014-02-09 13:00:00 UTC
temperature controls don't work on AMD Family 16h (Kabini) Mobos

Fix: Apply the following patch to dev/amdtemp
How-To-Repeat: kldload amdtemp
sysctl dev.cpu.0.temperature
Comment 1 Christian Brueffer freebsd_committer freebsd_triage 2014-03-08 13:49:49 UTC
State Changed
From-To: open->feedback

Hi David, are you sure 0x1533 is the correct device ID?  The Linux kernel seems to use 
0x1534: 

http://fxr.watson.org/fxr/ident?v=linux-2.6;im=10;i=PCI_DEVICE_ID_AMD_16H_NB_F4 


Comment 2 Christian Brueffer freebsd_committer freebsd_triage 2014-03-08 13:49:49 UTC
Responsible Changed
From-To: freebsd-bugs->brueffer

Grab.
Comment 3 Mark Linimon 2014-03-09 01:39:04 UTC
----- Forwarded message from David Rufino <david.rufino@gmail.com> -----

Date: Sat, 8 Mar 2014 18:55:15 -0500
From: David Rufino <david.rufino@gmail.com>
To: "brueffer@FreeBSD.org" <brueffer@FreeBSD.org>
Cc: "freebsd-bugs@FreeBSD.org" <freebsd-bugs@FreeBSD.org>, "brueffer@FreeBSD.org" <brueffer@FreeBSD.org>
Subject: Re: kern/186587: [amdtemp] [patch] Add Temperature Support for AMD Motherboard Family 16h (Kabini)
X-Mailer: iPhone Mail (11B651)

Hello,

I think the equivalent file in the Linux kernel is k10temp.c, which is where I got the device id from. I also verified that it works on mine... 

Thanks,
David 

----- End forwarded message -----
Comment 4 Mark Linimon 2014-03-11 00:42:52 UTC
----- Forwarded message from David Rufino <david.rufino@gmail.com> -----

Date: Mon, 10 Mar 2014 20:42:02 -0400
From: David Rufino <david.rufino@gmail.com>
To: "brueffer@FreeBSD.org" <brueffer@freebsd.org>
Cc: "freebsd-bugs@FreeBSD.org" <freebsd-bugs@freebsd.org>
Subject: Re: kern/186587: [amdtemp] [patch] Add Temperature Support for AMD Motherboard Family 16h (Kabini)

Just to be more specific, here's the corresponding linux driver

http://lxr.free-electrons.com/source/drivers/hwmon/k10temp.c#L211
http://lxr.free-electrons.com/source/include/linux/pci_ids.h#L529

Cheers,
David




On Sat, Mar 8, 2014 at 6:55 PM, David Rufino <david.rufino@gmail.com> wrote:

> Hello,
>
> I think the equivalent file in the Linux kernel is k10temp.c, which is
> where I got the device id from. I also verified that it works on mine...
>
> Thanks,
> David
>
>
> > On 8 Mar 2014, at 08:52, brueffer@FreeBSD.org wrote:
> >
> > Synopsis: [amdtemp] [patch] Add Temperature Support for AMD Motherboard
> Family 16h (Kabini)
> >
> > State-Changed-From-To: open->feedback
> > State-Changed-By: brueffer
> > State-Changed-When: Sat Mar 8 14:49:49 CET 2014
> > State-Changed-Why:
> > Hi David, are you sure 0x1533 is the correct device ID?  The Linux
> kernel seems to use
> > 0x1534:
> >
> >
> http://fxr.watson.org/fxr/ident?v=linux-2.6;im=10;i=PCI_DEVICE_ID_AMD_16H_NB_F4
> >
> >
> > Responsible-Changed-From-To: freebsd-bugs->brueffer
> > Responsible-Changed-By: brueffer
> > Responsible-Changed-When: Sat Mar 8 14:49:49 CET 2014
> > Responsible-Changed-Why:
> > Grab.
> >
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=186587
>
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"


----- End forwarded message -----
Comment 5 dfilter service freebsd_committer freebsd_triage 2014-03-14 12:15:35 UTC
Author: brueffer
Date: Fri Mar 14 12:15:28 2014
New Revision: 263169
URL: http://svnweb.freebsd.org/changeset/base/263169

Log:
  Add support for AMD Family 16h (Kabini) sensor devices.
  
  PR:		186587
  Submitted by:	David Rufino <david.rufino at gmail.com>
  MFC after:	2 weeks

Modified:
  head/sys/dev/amdtemp/amdtemp.c

Modified: head/sys/dev/amdtemp/amdtemp.c
==============================================================================
--- head/sys/dev/amdtemp/amdtemp.c	Fri Mar 14 11:45:19 2014	(r263168)
+++ head/sys/dev/amdtemp/amdtemp.c	Fri Mar 14 12:15:28 2014	(r263169)
@@ -79,6 +79,7 @@ struct amdtemp_softc {
 #define	DEVICEID_AMD_MISC12	0x1403
 #define	DEVICEID_AMD_MISC14	0x1703
 #define	DEVICEID_AMD_MISC15	0x1603
+#define	DEVICEID_AMD_MISC16	0x1533
 
 static struct amdtemp_product {
 	uint16_t	amdtemp_vendorid;
@@ -90,6 +91,7 @@ static struct amdtemp_product {
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC12 },
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC14 },
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC15 },
+	{ VENDORID_AMD,	DEVICEID_AMD_MISC16 },
 	{ 0, 0 }
 };
 
@@ -204,6 +206,7 @@ amdtemp_probe(device_t dev)
 	case 0x12:
 	case 0x14:
 	case 0x15:
+	case 0x16:
 		break;
 	default:
 		return (ENXIO);
@@ -327,6 +330,7 @@ amdtemp_attach(device_t dev)
 	case 0x12:
 	case 0x14:
 	case 0x15:
+	case 0x16:
 		/*
 		 * There is only one sensor per package.
 		 */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 6 Christian Brueffer freebsd_committer freebsd_triage 2014-03-14 12:20:27 UTC
State Changed
From-To: feedback->patched

I think you're right, patch committed.  Thanks!
Comment 7 dfilter service freebsd_committer freebsd_triage 2014-03-28 08:55:37 UTC
Author: brueffer
Date: Fri Mar 28 08:55:34 2014
New Revision: 263869
URL: http://svnweb.freebsd.org/changeset/base/263869

Log:
  MFC: r263169
  
  Add support for AMD Family 16h (Kabini) sensor devices.
  
  PR:		186587
  Submitted by:	David Rufino <david.rufino at gmail.com>

Modified:
  stable/10/sys/dev/amdtemp/amdtemp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/amdtemp/amdtemp.c
==============================================================================
--- stable/10/sys/dev/amdtemp/amdtemp.c	Fri Mar 28 08:23:39 2014	(r263868)
+++ stable/10/sys/dev/amdtemp/amdtemp.c	Fri Mar 28 08:55:34 2014	(r263869)
@@ -79,6 +79,7 @@ struct amdtemp_softc {
 #define	DEVICEID_AMD_MISC12	0x1403
 #define	DEVICEID_AMD_MISC14	0x1703
 #define	DEVICEID_AMD_MISC15	0x1603
+#define	DEVICEID_AMD_MISC16	0x1533
 
 static struct amdtemp_product {
 	uint16_t	amdtemp_vendorid;
@@ -90,6 +91,7 @@ static struct amdtemp_product {
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC12 },
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC14 },
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC15 },
+	{ VENDORID_AMD,	DEVICEID_AMD_MISC16 },
 	{ 0, 0 }
 };
 
@@ -204,6 +206,7 @@ amdtemp_probe(device_t dev)
 	case 0x12:
 	case 0x14:
 	case 0x15:
+	case 0x16:
 		break;
 	default:
 		return (ENXIO);
@@ -327,6 +330,7 @@ amdtemp_attach(device_t dev)
 	case 0x12:
 	case 0x14:
 	case 0x15:
+	case 0x16:
 		/*
 		 * There is only one sensor per package.
 		 */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 8 dfilter service freebsd_committer freebsd_triage 2014-03-28 08:58:54 UTC
Author: brueffer
Date: Fri Mar 28 08:58:51 2014
New Revision: 263870
URL: http://svnweb.freebsd.org/changeset/base/263870

Log:
  MFC: r263169
  
  Add support for AMD Family 16h (Kabini) sensor devices.
  
  PR:             186587
  Submitted by:   David Rufino <david.rufino at gmail.com>

Modified:
  stable/9/sys/dev/amdtemp/amdtemp.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/amdtemp/amdtemp.c
==============================================================================
--- stable/9/sys/dev/amdtemp/amdtemp.c	Fri Mar 28 08:55:34 2014	(r263869)
+++ stable/9/sys/dev/amdtemp/amdtemp.c	Fri Mar 28 08:58:51 2014	(r263870)
@@ -76,6 +76,7 @@ struct amdtemp_softc {
 #define	DEVICEID_AMD_MISC0F	0x1103
 #define	DEVICEID_AMD_MISC10	0x1203
 #define	DEVICEID_AMD_MISC11	0x1303
+#define	DEVICEID_AMD_MISC16	0x1533
 
 static struct amdtemp_product {
 	uint16_t	amdtemp_vendorid;
@@ -84,6 +85,7 @@ static struct amdtemp_product {
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC0F },
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC10 },
 	{ VENDORID_AMD,	DEVICEID_AMD_MISC11 },
+	{ VENDORID_AMD,	DEVICEID_AMD_MISC16 },
 	{ 0, 0 }
 };
 
@@ -189,6 +191,7 @@ amdtemp_probe(device_t dev)
 		break;
 	case 0x10:
 	case 0x11:
+	case 0x16:
 		break;
 	default:
 		return (ENXIO);
@@ -274,6 +277,7 @@ amdtemp_attach(device_t dev)
 		break;
 	case 0x10:
 	case 0x11:
+	case 0x16:
 		/*
 		 * There is only one sensor per package.
 		 */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 9 Christian Brueffer freebsd_committer freebsd_triage 2014-03-28 09:00:54 UTC
State Changed
From-To: patched->closed

Merge to stable branches done.