On Thu, 1 Dec 2022 at 09:40, Adrian Hunter <adrian.hunter@xxxxxxxxx> wrote: > > On 30/11/22 21:56, Robert Marko wrote: > > On Wed, 30 Nov 2022 at 19:39, Florian Fainelli <f.fainelli@xxxxxxxxx> wrote: > >> > >> On 11/30/22 09:24, Robert Marko wrote: > >>> On Wed, 30 Nov 2022 at 15:16, Adrian Hunter <adrian.hunter@xxxxxxxxx> wrote: > >>>> > >>>> On 30/11/22 15:00, Robert Marko wrote: > >>>>> On Wed, 30 Nov 2022 at 13:46, Adrian Hunter <adrian.hunter@xxxxxxxxx> 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@xxxxxxx> > >>>>>>>> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> > >>>>>>> > >>>>>>> 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" ? Sounds reasonable. I have dropped the patch for now. If we try something like this again later, perhaps better to do that a bit earlier in the release cycle to get it more tested in linux-next too. Kind regards Uffe