From: Nathan Chancellor <natechancellor@gmail.com>
To: Matt Turner <mattst88@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Henrik Rydberg <rydberg@bitmath.org>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
Richard Fontana <rfontana@redhat.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com
Subject: Re: [PATCH] hwmon: applesmc: avoid overlong udelay()
Date: Fri, 6 Nov 2020 16:21:59 -0700 [thread overview]
Message-ID: <20201106232159.GA3586073@ubuntu-m3-large-x86> (raw)
In-Reply-To: <20201106231710.GA29287@macbook>
On Fri, Nov 06, 2020 at 06:17:10PM -0500, Matt Turner wrote:
> On my late 2013 Macbook Pro, I have a couple of scripts that set the
> fans to auto or full-speed:
>
> fan-hi:
> #!/bin/sh
> sudo sh -c 'echo 1 > /sys/devices/platform/applesmc.768/fan1_manual
> echo 1 > /sys/devices/platform/applesmc.768/fan2_manual
> cat /sys/devices/platform/applesmc.768/fan1_max > /sys/devices/platform/applesmc.768/fan1_output
> cat /sys/devices/platform/applesmc.768/fan2_max > /sys/devices/platform/applesmc.768/fan2_output'
>
> fan-auto:
> #!/bin/sh
> sudo sh -c 'echo 0 > /sys/devices/platform/applesmc.768/fan1_manual
> echo 0 > /sys/devices/platform/applesmc.768/fan2_manual'
>
> Running ./fan-hi and then ./fan-auto on Linux v5.6 works and doesn't
> cause any problems, but after updating to v5.9 I see this in dmesg:
>
> [Nov 6 17:24] applesmc: send_byte(0x01, 0x0300) fail: 0x40
> [ +0.000005] applesmc: FS! : write data fail
> [ +0.191777] applesmc: send_byte(0x30, 0x0300) fail: 0x40
> [ +0.000009] applesmc: F0Tg: write data fail
> [ +7.097416] applesmc: send_byte(0x00, 0x0300) fail: 0x40
> [ +0.000006] applesmc: FS! : write data fail
>
> and the fan controls don't work.
>
> Googling turned up this [1] which looks like the same problem. They said
> it began occurring between v5.7 and v5.8, so I looked and found this
> commit.
>
> After reverting commit fff2d0f701e6753591609739f8ab9be1c8e80ebb from
> v5.9, I no longer see the errors in dmesg and the fan controls work
> again.
>
> Any ideas what the problem is?
>
> Thanks,
> Matt
>
> [1] https://stackoverflow.com/questions/63505469/cant-write-data-to-applesmc-error-after-upgrade-to-arch-linux-kernel-5-8-1
>
There is another thread on this regression:
https://lore.kernel.org/lkml/20200930105442.3f642f6c@aktux/
Looks like Brad Campbell has a patch that has some success in fixing the
regression (although others are saying it breaks their setup...):
https://lore.kernel.org/lkml/3c72ccc3-4de1-b5d0-423d-7b8c80991254@fnarfbargle.com/
Might be worth giving it a shot and jumping in so you get CC'd on
further revisions.
Cheers,
Nathan
next prev parent reply other threads:[~2020-11-06 23:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 23:17 Matt Turner
2020-11-06 23:21 ` Nathan Chancellor [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-05-27 13:51 Arnd Bergmann
2020-05-27 16:22 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201106232159.GA3586073@ubuntu-m3-large-x86 \
--to=natechancellor@gmail.com \
--cc=arnd@arndb.de \
--cc=clang-built-linux@googlegroups.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mattst88@gmail.com \
--cc=rfontana@redhat.com \
--cc=rydberg@bitmath.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®