From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Mantas Pucka <mantas@8devices.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Georgi Djakov <djakov@kernel.org>,
Pramod Gurav <pramod.gurav@linaro.org>,
Ritesh Harjani <ritesh.list@gmail.com>,
linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Thierry Reding <thierry.reding@gmail.com>,
Liming Sun <limings@nvidia.com>,
Victor Shih <victor.shih@genesyslogic.com.tw>
Subject: Re: [PATCH] mmc: sdhci-msm: pervent access to suspended controller
Date: Thu, 4 Apr 2024 21:42:43 +0300 [thread overview]
Message-ID: <77d76e3b-549e-4d26-834c-a59b91fbb2a0@intel.com> (raw)
In-Reply-To: <5bce008a-8354-4ccd-af1f-b7f2b2caf3bc@intel.com>
On 28/03/24 16:20, Adrian Hunter wrote:
> On 27/03/24 17:17, Ulf Hansson wrote:
>> On Tue, 26 Mar 2024 at 11:25, Adrian Hunter <adrian.hunter@intel.com> wrote:
>>>
>>> On 21/03/24 16:30, Mantas Pucka wrote:
>>>> Generic sdhci code registers LED device and uses host->runtime_suspended
>>>> flag to protect access to it. The sdhci-msm driver doesn't set this flag,
>>>> which causes a crash when LED is accessed while controller is runtime
>>>> suspended. Fix this by setting the flag correctly.
>>>>
>>>> Cc: stable@vger.kernel.org
>>>> Fixes: 67e6db113c90 ("mmc: sdhci-msm: Add pm_runtime and system PM support")
>>>> Signed-off-by: Mantas Pucka <mantas@8devices.com>
>>>
>>> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
>>
>> Looks like this problem may exist for other sdhci drivers too. In
>> particular for those that enables runtime PM, don't set
>> SDHCI_QUIRK_NO_LED and don't use sdhci_runtime|suspend_resume_host().
>>
>> Don't know if there is a better way to address this, if not on a case
>> by case basis. Do you have any thoughts about this?
>
> Yes probably case by case, but I will look at it.
There seem to be 3 that use runtime pm but not
sdhci_runtime_suspend_host():
1. dwcmshc_runtime_suspend() : only turns off the card clock
via SDHCI_CLOCK_CONTROL register, so registers are presumably
still accessible
2. gl9763e_runtime_suspend() : ditto
3. sdhci_tegra_runtime_suspend() : disables the functional
clock via clk_disable_unprepare(), so registers are presumably
still accessible
sdhci_msm_runtime_suspend() is different because it also turns
off the interface clock.
But it looks like there are no similar cases.
next prev parent reply other threads:[~2024-04-04 18:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 14:30 [PATCH] mmc: sdhci-msm: pervent access to suspended controller Mantas Pucka
2024-03-26 10:25 ` Adrian Hunter
2024-03-27 15:17 ` Ulf Hansson
2024-03-28 14:20 ` Adrian Hunter
2024-04-04 18:42 ` Adrian Hunter [this message]
2024-04-04 21:13 ` Ulf Hansson
2024-04-16 14:27 ` Adrian Hunter
2024-04-02 10:56 ` Ulf Hansson
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=77d76e3b-549e-4d26-834c-a59b91fbb2a0@intel.com \
--to=adrian.hunter@intel.com \
--cc=andersson@kernel.org \
--cc=djakov@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=limings@nvidia.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mantas@8devices.com \
--cc=pramod.gurav@linaro.org \
--cc=ritesh.list@gmail.com \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=victor.shih@genesyslogic.com.tw \
/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