Bug 201723 - [Bisected][Regression] THERM_WINDTUNNEL not working any longer in kernel 4.19.x (PowerMac G4 MDD)
Summary: [Bisected][Regression] THERM_WINDTUNNEL not working any longer in kernel 4.19...
Status: RESOLVED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: PPC-32 (show other bugs)
Hardware: PPC-32 Linux
: P1 normal
Assignee: platform_ppc-32
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-19 00:11 UTC by Erhard F.
Modified: 2020-03-02 13:16 UTC (History)
4 users (show)

See Also:
Kernel Version: 4.19.1
Tree: Mainline
Regression: Yes


Attachments
dmesg (kernel 4.14.78) (38.53 KB, text/plain)
2018-11-19 00:11 UTC, Erhard F.
Details
dmesg (kernel 4.19.1) (36.31 KB, text/plain)
2018-11-19 00:12 UTC, Erhard F.
Details
kernel .config (4.14.78) (75.46 KB, text/plain)
2018-11-19 00:13 UTC, Erhard F.
Details
kernel .config (4.19.1) (73.25 KB, text/plain)
2018-11-19 00:13 UTC, Erhard F.
Details
bisect.log (3.86 KB, text/plain)
2019-10-17 22:49 UTC, Erhard F.
Details

Description Erhard F. 2018-11-19 00:11:27 UTC
Created attachment 279501 [details]
dmesg (kernel 4.14.78)

The fan control of my Powermac3,6 G4 MDD works on kernel 4.14.x (somehow), but no longer on current 4.19.x.

On 4.14.78 it detects therm_windtunnel, despite telling me "attach_adapter method is deprecated". It also detects and runs DS1775 digital thermometer and ADM1030 fan controller, even if not selected in Device Drivers -> Hardware Monitoring support:

[...]
[    3.777495] i2c /dev entries driver
[    3.785754] i2c i2c-0: therm_windtunnel: attach_adapter method is deprecated
[    3.794016] i2c i2c-0: Please use another way to instantiate your i2c_client
[    3.802344] PowerMac i2c bus pmu 2 registered
[    3.810849] i2c i2c-1: therm_windtunnel: attach_adapter method is deprecated
[    3.819315] i2c i2c-1: Please use another way to instantiate your i2c_client
[    3.827712] PowerMac i2c bus pmu 1 registered
[    3.836337] i2c i2c-2: therm_windtunnel: attach_adapter method is deprecated
[    3.844692] i2c i2c-2: Please use another way to instantiate your i2c_client
[    3.852917] PowerMac i2c bus mac-io 0 registered
[    3.861086] i2c i2c-2: No i2c address for /pci@f2000000/mac-io@17/i2c@18000/i2c-modem
[    3.869502] i2c i2c-3: therm_windtunnel: attach_adapter method is deprecated
[    3.869530] hub 2-1:1.0: USB hub found
[    3.877686] hub 2-1:1.0: 4 ports detected
[    3.893723] i2c i2c-3: Please use another way to instantiate your i2c_client
[    3.903282] PowerMac i2c bus uni-n 1 registered
[    3.911296] i2c i2c-3: i2c-powermac: modalias failure on /uni-n@f8000000/i2c@f8001000/cereal@1c0
[    3.919606] i2c i2c-4: therm_windtunnel: attach_adapter method is deprecated
[    3.927678] i2c i2c-4: Please use another way to instantiate your i2c_client
[    3.937738] DS1775 digital thermometer [@49]
[    3.945723] Temp: 49.0 C
[    3.945725]   Hyst: 75.0 C
[    3.953525]   OS: 80.0 C

[    3.977639] ADM1030 fan controller [@2c]
[    3.985331] PowerMac i2c bus uni-n 0 registered
[    3.990122] Reducing overheating limit to 75.0 C
[    3.990125]  (Hyst: 70.0 C
[    3.990127] )
[    4.015585] i2c i2c-4: Failed to register i2c client MAC,adm1030 at 0x2c (-16)
[    4.023519] i2c i2c-4: i2c-powermac: Failure to register /uni-n@f8000000/i2c@f8001000/fan@58
[    4.031455] i2c i2c-4: Failed to register i2c client MAC,ds1775 at 0x49 (-16)
[    4.039312] i2c i2c-4: i2c-powermac: Failure to register /uni-n@f8000000/i2c@f8001000/temp-monitor@92
[...]

On 4.19.1 it does not detect therm_windtunnel via i2c, nor are DS1775 and ADM1030 detected, even if built in Device Drivers -> Hardware Monitoring support. Result is that the fan always runs at full speed, which is rather loud.

The kernel config is basically the same, just copied the 4.14.78 over to 4.19.1 and ran make oldconfig.

Further details of the system:
# inxi -b
System:    Host: T600 Kernel: 4.14.78-gentoo ppc bits: 32 Console: tty 1 Distro: Gentoo Base System release 2.6
Machine:   No /sys/class/dmi; using dmidecode: dmidecode is not installed.
CPU:       Dual core 7455 altivec supported (-MCP-) speed: 1416.666661MHz MHz (max)
Graphics:  Card: Advanced Micro Devices [AMD/ATI] RV350 [Radeon 9550/9600/X1050 Series]
           Display Server: N/A driver: N/A tty size: 132x24 Advanced Data: N/A for root out of X
Network:   Card-1: Broadcom Limited BCM4306 802.11b/g Wireless LAN Controller driver: b43-pci-bridge
           Card-2: Apple UniNorth 2 GMAC (Sun GEM) driver: gem
Drives:    HDD Total Size: 500.1GB (7.9% used)
Info:      Processes: 84 Uptime: 5:35 Memory: 220.9/2020.2MB Init: systemd Client: Shell (bash) inxi: 2.3.56
Comment 1 Erhard F. 2018-11-19 00:12:39 UTC
Created attachment 279503 [details]
dmesg (kernel 4.19.1)
Comment 2 Erhard F. 2018-11-19 00:13:13 UTC
Created attachment 279505 [details]
kernel .config (4.14.78)
Comment 3 Erhard F. 2018-11-19 00:13:32 UTC
Created attachment 279507 [details]
kernel .config (4.19.1)
Comment 4 Erhard F. 2019-10-17 22:49:00 UTC
Created attachment 285535 [details]
bisect.log

Final bisect commit.

It's not a bug, it's a feature. :(

# git bisect bad | tee -a ~/bisect.log
3e7bed52719de4b5b5fb900869e293eae0bc3f3e is the first bad commit
commit 3e7bed52719de4b5b5fb900869e293eae0bc3f3e
Author: Wolfram Sang <wsa@the-dreams.de>
Date:   Tue Aug 21 17:02:39 2018 +0200

    macintosh: therm_windtunnel: drop using attach_adapter
    
    As we now have deferred probing, we can use a custom mechanism and
    finally get rid of the legacy interface from the i2c core.
    
    Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
    Acked-by: Michael Ellerman <mpe@ellerman.id.au>

:040000 040000 04029fe24bce33dd0b815fa961cfa847a2abce77 2dc14e16e628b7e2fa4b65bfd6544c9c5e165a9a M	drivers
Comment 5 Wolfram Sang 2020-02-11 12:13:55 UTC
I contacted Erhard by email to gather some more debug output. If we make substantial progress, I will report it here.

Sidenote: therm_windtunnel has its own ADM1030 and DS1775 handling, so it doesn't need the seperate drivers from HWMON. In theory, it should, but I guess noone is up to refactoring all that old code.
Comment 6 Wolfram Sang 2020-02-25 14:59:58 UTC
Patch which works for Erhard is sent out:

http://patchwork.ozlabs.org/patch/1244322/
Comment 7 Wolfram Sang 2020-03-02 13:16:16 UTC
Commited as 38b17afb0ebb ("macintosh: therm_windtunnel: fix regression when instantiating devices") and available upstream since v5.6-rc4.

Thanks for everyone helping, especially Erhard, of course!

Note You need to log in before you can comment on or make changes to this bug.