Dear gregkh@xxxxxxxxxxxxxxxxxxx, Sorry, update the format: This patch has been tested on Mediatek Phone, the test passed, Thank you diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index a569066..d656964 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1800,7 +1800,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, if (err) goto free_card; - } else if (!mmc_card_hs400es(card)) { + } else if (mmc_card_hs400es(card)){ + if (host->ops->execute_hs400_tuning) { + err = host->ops->execute_hs400_tuning(host, card); + if (err) + goto free_card; + } + } else { /* Select the desired bus width optionally */ err = mmc_select_bus_width(card); if (err > 0 && mmc_card_hs(card)) { ------------------------------------ Best Regards ! Guilin 桂林 发件人: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> 发送时间: 2024年5月24日 12:09 收件人: Lin Gui (桂林) <Lin.Gui@xxxxxxxxxxxx> 抄送: stable@xxxxxxxxxxxxxxx; Yongdong Zhang (张永东) <Yongdong.Zhang@xxxxxxxxxxxx>; Bo Ye (叶波) <Bo.Ye@xxxxxxxxxxxx>; Qilin Tan (谭麒麟) <Qilin.Tan@xxxxxxxxxxxx>; Wenbin Mei (梅文彬) <Wenbin.Mei@xxxxxxxxxxxx>; Mengqi Zhang (张梦琦) <Mengqi.Zhang@xxxxxxxxxxxx> 主题: Re: 回复: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree External email : Please do not click links or open attachments until you have verified the sender or the content. On Fri, May 24, 2024 at 01:07:18AM +0000, Lin Gui (桂林) wrote: > Dear @Greg KH<mailto:gregkh@xxxxxxxxxxxxxxxxxxx>, > > Base : kernel-5.15.159 > > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c > index a569066..d656964 100644 > --- a/drivers/mmc/core/mmc.c > +++ b/drivers/mmc/core/mmc.c > @@ -1800,7 +1800,13 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, > if (err) > goto free_card; > > - } else if (!mmc_card_hs400es(card)) { > + } else if (mmc_card_hs400es(card)){ > + if (host->ops->execute_hs400_tuning) { > + err = host->ops->execute_hs400_tuning(host, card); > + if (err) > + goto free_card; > + } > + } else { > /* Select the desired bus width optionally */ > err = mmc_select_bus_width(card); > if (err > 0 && mmc_card_hs(card)) { > Also, please read: https://urldefense.com/v3/__https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html__;!!CTRNKA9wMg0ARbw!hjfu5vg55WKhnCpxQbGnM3D7NFWmsradtZdZjtCx80qi6_I7h0XzB4_-S_JSfqoOEyHzam2onI2mggBoRvJU31Y$ for how to do this properly.