From: Adrian Hunter <adrian.hunter@intel.com>
To: Robert Marko <robimarko@gmail.com>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: Sarthak Garg <quic_sartgarg@quicinc.com>,
Al Cooper <alcooperx@gmail.com>, Haibo Chen <haibo.chen@nxp.com>,
Andrew Jeffery <andrew@aj.id.au>,
Eugen Hristev <eugen.hristev@microchip.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Prabu Thangamuthu <prabu.t@synopsys.com>,
Manjunath M B <manjumb@synopsys.com>,
Ben Dooks <ben-linux@fluff.org>,
Jaehoon Chung <jh80.chung@samsung.com>,
Viresh Kumar <vireshk@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Hu Ziji <huziji@marvell.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Brian Norris <briannorris@chromium.org>,
Wenchao Chen <wenchao.chen@unisoc.com>,
Chevron Li <chevron.li@bayhubtech.com>,
linux-mmc@vger.kernel.org,
Florian Fainelli <f.fainelli@gmail.com>,
Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>,
Rohit Agarwal <quic_rohiagar@quicinc.com>,
Sahitya Tummala <stummala@codeaurora.org>,
Sarthak Garg <sartgarg@codeaurora.org>
Subject: Re: [PATCH V2 2/4] mmc: sdhci: Avoid unnecessary re-configuration
Date: Thu, 1 Dec 2022 10:40:28 +0200 [thread overview]
Message-ID: <efe523e8-ec02-774b-6348-700e0cfc3345@intel.com> (raw)
In-Reply-To: <CAOX2RU5OBJyWb_K=b7OO9WKVog8e2kMT50F9PndWcQ+gd=OfPQ@mail.gmail.com>
On 30/11/22 21:56, Robert Marko wrote:
> On Wed, 30 Nov 2022 at 19:39, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>
>> On 11/30/22 09:24, Robert Marko wrote:
>>> On Wed, 30 Nov 2022 at 15:16, Adrian Hunter <adrian.hunter@intel.com> wrote:
>>>>
>>>> On 30/11/22 15:00, Robert Marko wrote:
>>>>> On Wed, 30 Nov 2022 at 13:46, Adrian Hunter <adrian.hunter@intel.com> wrote:
>>>>>>
>>>>>> On 30/11/22 13:54, Robert Marko wrote:
>>>>>>>
>>>>>>> On 28. 11. 2022. 14:32, Adrian Hunter wrote:
>>>>>>>> Avoid re-configuring UHS and preset settings when the settings have not
>>>>>>>> changed, irrespective of whether the clock is turning on.
>>>>>>>>
>>>>>>>> Tested-by: Haibo Chen <haibo.chen@nxp.com>
>>>>>>>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>>>>>>>
>>>>>>> Hi, this is breaking sdhci-msm on IPQ8074 in next-20221130 for me
>>>>>>> and reverting it makes the eMMC work again.
>>>>>>>
>>>>>>> I get a lot of:
>>>>>>>
>>>>>>> [ 2.727287] mmc0: tuning execution failed: -5
>>>>>>> [ 2.727323] mmc0: error -5 whilst initialising MMC card
>>>>>>> [ 3.846540] mmc0: tuning execution failed: -5
>>>>>>> [ 3.846564] mmc0: error -5 whilst initialising MMC card
>>>>>>> [ 4.966517] mmc0: tuning execution failed: -5
>>>>>>> [ 4.966539] mmc0: error -5 whilst initialising MMC card
>>>>>>> [ 6.096486] mmc0: tuning execution failed: -5
>>>>>>> [ 6.096508] mmc0: error -5 whilst initialising MMC card
>>>>>>> [ 7.206431] mmc0: tuning execution failed: -5
>>>>>>> [ 7.206454] mmc0: error -5 whilst initialising MMC card
>>>>>>
>>>>>> Thanks for the report! Are you able to debug this any more?
>>>>>> What transfer mode is it? e.g. HS400? Can you enable debug
>>>>>> messages and get more information?
>>>>>
>>>>> With some guidance yes, it's in HS200 as there is an issue with HS400
>>>>> to HS200 switch on this SoC so I have HS400 disabled.
>>>>>
>>>>> With CONFIG_MMC_DEBUG and loglevel=8 I dont have any new
>>>>> messages.
>>>>
>>>> You should get a lot more with:
>>>>
>>>> CONFIG_DYNAMIC_DEBUG=y
>>>>
>>>> and kernel commandline option:
>>>>
>>>> dyndbg="file drivers/mmc/core/* +p;file drivers/mmc/host/* +p"
>>>
>>> Unfortunatelly not:
>>
>> Are you sure you have debug messages enabled with your current console
>> loglevel? Might want to add "debug" at the end of your kernel command
>> line and try again.
>
> Ok, so indeed debug was required, here is the huge bootlog now:
> https://gist.github.com/robimarko/e370bce66d0d2e7e54a2f5daf9784ee4
Thanks for the log! It shows everything is OK up until the first
(HS200) tuning.
sdhci-msm takes the clock frequency into account when setting UHS
signaling, refer sdhci_msm_set_uhs_signaling(), so that is
presumably why the UHS signalling needs to be re-done even if
only the clock frequency changes.
It would be possible to change sdhci-msm to hook ->set_ios() and
set host->reinit_uhs before calling sdhci_set_ios(), which should
put back the original behaviour for sdhci-msm.
However "mmc: sdhci: Avoid unnecessary re-configuration" is really
a "nice-to-have" and it is not impossible other drivers are affected
by something similar, but just haven't noticed.
Consequently, I tend to think we should just drop the patch
"mmc: sdhci: Avoid unnecessary re-configuration" ?
next prev parent reply other threads:[~2022-12-01 8:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 13:32 [PATCH V2 0/4] mmc: sdhci: Fix voltage switch delay Adrian Hunter
2022-11-28 13:32 ` [PATCH V2 1/4] " Adrian Hunter
2022-11-28 13:32 ` [PATCH V2 2/4] mmc: sdhci: Avoid unnecessary re-configuration Adrian Hunter
2022-11-30 11:54 ` Robert Marko
2022-11-30 12:45 ` Adrian Hunter
2022-11-30 13:00 ` Robert Marko
2022-11-30 14:15 ` Adrian Hunter
2022-11-30 17:24 ` Robert Marko
2022-11-30 18:39 ` Florian Fainelli
2022-11-30 19:56 ` Robert Marko
2022-12-01 8:40 ` Adrian Hunter [this message]
2022-12-01 10:48 ` Robert Marko
2022-12-01 10:58 ` Ulf Hansson
2022-11-28 13:32 ` [PATCH V2 3/4] mmc: sdhci: Avoid unnecessary ->set_clock() Adrian Hunter
2022-11-28 13:32 ` [PATCH V2 4/4] mmc: sdhci: Enable card clock instead of ->set_clock() Adrian Hunter
2022-12-06 23:03 ` Michael Walle
2022-12-07 8:13 ` Adrian Hunter
2022-12-07 12:37 ` Ulf Hansson
2022-11-29 15:36 ` [PATCH V2 0/4] mmc: sdhci: Fix voltage switch delay 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=efe523e8-ec02-774b-6348-700e0cfc3345@intel.com \
--to=adrian.hunter@intel.com \
--cc=alcooperx@gmail.com \
--cc=andrew@aj.id.au \
--cc=ben-linux@fluff.org \
--cc=briannorris@chromium.org \
--cc=chevron.li@bayhubtech.com \
--cc=eugen.hristev@microchip.com \
--cc=f.fainelli@gmail.com \
--cc=haibo.chen@nxp.com \
--cc=huziji@marvell.com \
--cc=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=manjumb@synopsys.com \
--cc=prabu.t@synopsys.com \
--cc=quic_c_sbhanu@quicinc.com \
--cc=quic_rohiagar@quicinc.com \
--cc=quic_sartgarg@quicinc.com \
--cc=robimarko@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=sartgarg@codeaurora.org \
--cc=stummala@codeaurora.org \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=vigneshr@ti.com \
--cc=vireshk@kernel.org \
--cc=wenchao.chen@unisoc.com \
--cc=wsa+renesas@sang-engineering.com \
/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