Bug 225911 - [asmc] [patch] Add support for mid-2011 Macmini 5,2
Summary: [asmc] [patch] Add support for mid-2011 Macmini 5,2
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.1-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: David Bright
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-02-15 11:14 UTC by Trev
Modified: 2018-12-12 13:53 UTC (History)
2 users (show)

See Also:
fbsdbugs4: maintainer-feedback?


Attachments
Adds support for Macmini 5,2 hardware to asmc kernel module (1.50 KB, text/plain)
2018-02-15 11:14 UTC, Trev
no flags Details
Adds full support for Macmini 5,2 hardware to asmc kernel module (1.87 KB, patch)
2018-02-17 08:32 UTC, Trev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trev 2018-02-15 11:14:58 UTC
Created attachment 190643 [details]
Adds support for Macmini 5,2 hardware to asmc kernel module

The asmc module lacks details for the Macmini 5,2 hardware version.

Fix: See attached patches for asmc.c and asmcvar.h which have been running successfully on my system since FreeBSD 10.2-STABLE.

How-To-Repeat: kldload supplied asmc.ko

Note: Patch also includes two cosmetic textual changes to my original Macmini 3,1 patch referenced in closed bug 190195 at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190195 

Patch against FreeBSD 11.1-STABLE r329296 attached.
Comment 1 Trev 2018-02-16 13:13:55 UTC
Output from the patched asmc:

root@ghost [/] $ sysctl dev.asmc
dev.asmc.0.temp.wireless_proximity: 56
dev.asmc.0.temp.pwr_supply: 59
dev.asmc.0.temp.pch_die: 68
dev.asmc.0.temp.pch_proximity: 63
dev.asmc.0.temp.memory_proximity: 57
dev.asmc.0.temp.memory_slot2: 50
dev.asmc.0.temp.memory_slot1: 57
dev.asmc.0.temp.thunderbolt_proximity: 62
dev.asmc.0.temp.cpu0_proximity: 75
dev.asmc.0.temp.cpu0_die: 92
dev.asmc.0.temp.ambient_air2: 56
dev.asmc.0.temp.ambient_air1: 58
dev.asmc.0.fan.0.targetspeed: 5500
dev.asmc.0.fan.0.maxspeed: 5500
dev.asmc.0.fan.0.minspeed: 1800
dev.asmc.0.fan.0.speed: 5495
dev.asmc.0.fan.0.id: Exhaust  
dev.asmc.0.%parent: acpi0
dev.asmc.0.%pnpinfo: _HID=APP0001 _UID=0
dev.asmc.0.%location: handle=\_SB_.PCI0.LPCB.SMC_
dev.asmc.0.%driver: asmc
dev.asmc.0.%desc: Apple SMC Mac Mini 5,2
Comment 2 Trev 2018-02-17 08:32:16 UTC
Created attachment 190714 [details]
Adds full support for Macmini 5,2 hardware to asmc kernel module

Updated patch version 2 to add more thermal sensors after reference to the mid-2011 Macmini Apple Technician Guide.

Output from sysctl dev.asmc:

dev.asmc.0.temp.wireless_proximity: 58
dev.asmc.0.temp.pwr_supply: 51
dev.asmc.0.temp.pch_controller_die: 70
dev.asmc.0.temp.pch_controller_proximity: 65
dev.asmc.0.temp.memory_proximity: 60
dev.asmc.0.temp.memory_slot2: 50
dev.asmc.0.temp.memory_slot1: 60
dev.asmc.0.temp.thunderbolt_proximity: 62
dev.asmc.0.temp.gpu_integrated_switcher: 59
dev.asmc.0.temp.gpu_proximity: 62
dev.asmc.0.temp.gpu_diode2: 67
dev.asmc.0.temp.gpu_diode1: 61
dev.asmc.0.temp.cpu_proximity: 65
dev.asmc.0.temp.cpu_die: 69
dev.asmc.0.temp.ambient_cpu_pch_wireless_dimm: 58
dev.asmc.0.temp.ambient_air_proximity: 57
dev.asmc.0.fan.0.targetspeed: 2920
dev.asmc.0.fan.0.maxspeed: 5500
dev.asmc.0.fan.0.minspeed: 1800
dev.asmc.0.fan.0.speed: 2917
dev.asmc.0.fan.0.id: Exhaust  
dev.asmc.0.%parent: acpi0
dev.asmc.0.%pnpinfo: _HID=APP0001 _UID=0
dev.asmc.0.%location: handle=\_SB_.PCI0.LPCB.SMC_
dev.asmc.0.%driver: asmc
dev.asmc.0.%desc: Apple SMC Mac Mini 5,2
Comment 3 Ed Maste freebsd_committer 2018-03-08 18:26:30 UTC
The patch appears to be malformed
Comment 4 commit-hook freebsd_committer 2018-03-08 18:53:00 UTC
A commit references this bug:

Author: emaste
Date: Thu Mar  8 18:52:47 UTC 2018
New revision: 330667
URL: https://svnweb.freebsd.org/changeset/base/330667

Log:
  asmc: update temperature sensor name/description

  PR:		225911
  Submitted by:	Trev <fbsdbugs4 at sentry.org>
  MFC after:	1 week

Changes:
  head/sys/dev/asmc/asmcvar.h
Comment 5 Trev 2018-03-08 22:11:09 UTC
(In reply to Ed Maste from comment #3)

The patch file works for me - see transcript below:

root@ghost [/root/test] $ patch asmc.c asmc_mm52_patches_v2.txt 
Hmm...  Looks like a normal diff to me...
The text leading up to this was:
--------------------------
|asmc.c
--------------------------
Patching file asmc.c using Plan A...
Hunk #1 succeeded at 249.
Hunk #2 succeeded at 254.
Hmm...  The next patch looks like a normal diff to me...
The text leading up to this was:
--------------------------
|
|asmcvar.h
--------------------------
File to patch: asmcvar.h
Patching file asmcvar.h using Plan A...
Hunk #1 succeeded at 284.
Hunk #2 succeeded at 292.
done
Comment 6 commit-hook freebsd_committer 2018-03-15 00:44:06 UTC
A commit references this bug:

Author: emaste
Date: Thu Mar 15 00:43:25 UTC 2018
New revision: 330960
URL: https://svnweb.freebsd.org/changeset/base/330960

Log:
  MFC r330667: asmc: update temperature sensor name/description

  PR:		225911
  Submitted by:	Trev <fbsdbugs4 at sentry.org>

Changes:
_U  stable/11/
  stable/11/sys/dev/asmc/asmcvar.h
Comment 7 commit-hook freebsd_committer 2018-03-15 00:45:10 UTC
A commit references this bug:

Author: emaste
Date: Thu Mar 15 00:44:34 UTC 2018
New revision: 330961
URL: https://svnweb.freebsd.org/changeset/base/330961

Log:
  MFC r330667: asmc: update temperature sensor name/description

  PR:		225911
  Submitted by:	Trev

Changes:
_U  stable/10/
  stable/10/sys/dev/asmc/asmcvar.h
Comment 8 Trev 2018-05-21 01:43:41 UTC
How can I progress this?