From: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@lists.ozlabs.org
Cc: linux-i2c@vger.kernel.org, debian-powerpc@lists.debian.org,
Mathieu Malaterre <malat@debian.org>,
Wolfram Sang <wsa@the-dreams.de>,
Erhard Furtner <erhard_f@mailbox.org>
Subject: Re: [PATCH] macintosh: therm_windtunnel: fix regression when instantiating devices
Date: Thu, 27 Feb 2020 12:23:57 +1100 [thread overview]
Message-ID: <87imjsu8k2.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20200225141229.5424-1-wsa@the-dreams.de>
Wolfram Sang <wsa@the-dreams.de> writes:
> Removing attach_adapter from this driver caused a regression for at
> least some machines. Those machines had the sensors described in their
> DT, too, so they didn't need manual creation of the sensor devices. The
> old code worked, though, because manual creation came first. Creation of
> DT devices then failed later and caused error logs, but the sensors
> worked nonetheless because of the manually created devices.
>
> When removing attach_adaper, manual creation now comes later and loses
> the race. The sensor devices were already registered via DT, yet with
> another binding, so the driver could not be bound to it.
>
> This fix refactors the code to remove the race and only manually creates
> devices if there are no DT nodes present. Also, the DT binding is updated
> to match both, the DT and manually created devices. Because we don't
> know which device creation will be used at runtime, the code to start
> the kthread is moved to do_probe() which will be called by both methods.
>
> Fixes: 3e7bed52719d ("macintosh: therm_windtunnel: drop using attach_adapter")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=201723
> Reported-by: Erhard Furtner <erhard_f@mailbox.org>
> Tested-by: Erhard Furtner <erhard_f@mailbox.org>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>
> I suggest this stable-tag: # v4.19+
Looks right to me.
> Adding the Debian-PPC List to reach further people maybe willing to
> test.
>
> This patch does not depend on "[PATCH RESEND] macintosh: convert to
> i2c_new_scanned_device". In fact, this one here should go in first as
> 5.6 material. I will rebase and resend the i2c_new_scanned_device()
> conversion on top of this regression fix.
>
> I can also take this via I2C if easier.
I think that would be best, it's more I2C related than powerpc arch
stuff that I could review.
I don't have a machine setup to test this easily, but Erhard has been
doing a good job of testing things so I'm happy for you to take it with
his Tested-by.
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: Wolfram Sang <wsa@the-dreams.de>, linuxppc-dev@lists.ozlabs.org
Cc: Mathieu Malaterre <malat@debian.org>,
Erhard Furtner <erhard_f@mailbox.org>,
debian-powerpc@lists.debian.org, linux-i2c@vger.kernel.org,
Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH] macintosh: therm_windtunnel: fix regression when instantiating devices
Date: Thu, 27 Feb 2020 12:23:57 +1100 [thread overview]
Message-ID: <87imjsu8k2.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20200225141229.5424-1-wsa@the-dreams.de>
Wolfram Sang <wsa@the-dreams.de> writes:
> Removing attach_adapter from this driver caused a regression for at
> least some machines. Those machines had the sensors described in their
> DT, too, so they didn't need manual creation of the sensor devices. The
> old code worked, though, because manual creation came first. Creation of
> DT devices then failed later and caused error logs, but the sensors
> worked nonetheless because of the manually created devices.
>
> When removing attach_adaper, manual creation now comes later and loses
> the race. The sensor devices were already registered via DT, yet with
> another binding, so the driver could not be bound to it.
>
> This fix refactors the code to remove the race and only manually creates
> devices if there are no DT nodes present. Also, the DT binding is updated
> to match both, the DT and manually created devices. Because we don't
> know which device creation will be used at runtime, the code to start
> the kthread is moved to do_probe() which will be called by both methods.
>
> Fixes: 3e7bed52719d ("macintosh: therm_windtunnel: drop using attach_adapter")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=201723
> Reported-by: Erhard Furtner <erhard_f@mailbox.org>
> Tested-by: Erhard Furtner <erhard_f@mailbox.org>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>
> I suggest this stable-tag: # v4.19+
Looks right to me.
> Adding the Debian-PPC List to reach further people maybe willing to
> test.
>
> This patch does not depend on "[PATCH RESEND] macintosh: convert to
> i2c_new_scanned_device". In fact, this one here should go in first as
> 5.6 material. I will rebase and resend the i2c_new_scanned_device()
> conversion on top of this regression fix.
>
> I can also take this via I2C if easier.
I think that would be best, it's more I2C related than powerpc arch
stuff that I could review.
I don't have a machine setup to test this easily, but Erhard has been
doing a good job of testing things so I'm happy for you to take it with
his Tested-by.
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
next prev parent reply other threads:[~2020-02-27 1:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 14:12 [PATCH] macintosh: therm_windtunnel: fix regression when instantiating devices Wolfram Sang
2020-02-25 14:12 ` Wolfram Sang
2020-02-25 14:41 ` John Paul Adrian Glaubitz
2020-02-25 14:41 ` John Paul Adrian Glaubitz
2020-02-25 15:00 ` Wolfram Sang
2020-02-25 15:00 ` Wolfram Sang
2020-02-27 1:23 ` Michael Ellerman [this message]
2020-02-27 1:23 ` Michael Ellerman
2020-02-28 17:00 ` Wolfram Sang
2020-02-28 17:00 ` Wolfram Sang
2020-02-28 17:00 ` Wolfram Sang
2020-02-28 17:00 ` Wolfram Sang
2020-03-03 11:08 ` Michael Ellerman
2020-03-03 11:08 ` Michael Ellerman
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=87imjsu8k2.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=debian-powerpc@lists.debian.org \
--cc=erhard_f@mailbox.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malat@debian.org \
--cc=wsa@the-dreams.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.