* backport a patch for Linux kernel-5.10 and 6.6 stable tree [not found] <PSAPR03MB5653FFA63E972A80A6A2F4AF952F2@PSAPR03MB5653.apcprd03.prod.outlook.com> @ 2024-03-16 8:16 ` Lin Gui (桂林) 2024-03-16 9:21 ` Sasha Levin 2024-05-23 2:39 ` backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 " Lin Gui (桂林) 0 siblings, 2 replies; 15+ messages in thread From: Lin Gui (桂林) @ 2024-03-16 8:16 UTC (permalink / raw) To: stable@vger.kernel.org Cc: Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Lin Gui (桂林) Hi reviewers, I suggest to backport a commit to Linux kernel-5.10 and 6.6 stable tree. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/mmc/core/mmc.c?h=v6.8&id=e4df56ad0bf3506c5189abb9be83f3bea05a4c4f author Lin Gui lin.gui@mediatek.com 2023-12-19 07:05:32 +0800 committer Ulf Hansson ulf.hansson@linaro.org 2024-01-02 17:54:05 +0100 commit e4df56ad0bf3506c5189abb9be83f3bea05a4c4f (patch) tree a5db3a85f44b29dd773c5c65c3340d50b74b6687 /drivers/mmc/core/mmc.c parent b062136d0d6f46d7ad5c88219cbd75f90cb18e81 (diff) download linux-e4df56ad0bf3506c5189abb9be83f3bea05a4c4f.tar.gz mmc: core: Add wp_grp_size sysfs node The eMMC card can be set into write-protected mode to prevent data from being accidentally modified or deleted. Wp_grp_size (Write Protect Group Size) refers to an attribute of the eMMC card, used to manage write protection and is the CSD register [36:32] of the eMMC device. Wp_grp_size (Write Protect Group Size) indicates how many eMMC blocks are contained in each write protection group on the eMMC card. To allow userspace easy access of the CSD register bits, let's add sysfs node "wp_grp_size". Signed-off-by: Lin Gui lin.gui@mediatek.com Signed-off-by: Bo Ye bo.ye@mediatek.com Reviewed-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com Link: https://lore.kernel.org/r/20231218230532.82427-1-bo.ye@mediatek.com Signed-off-by: Ulf Hansson ulf.hansson@linaro.org ------------------------------------ Best Regards ! Guilin ===================================== MediaTek(ChengDu)Inc. Email: mailto:lin.gui@mediatek.com tel:+86-28-85939000-67009 Fax:+86-28-85929875 ============================================== ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: backport a patch for Linux kernel-5.10 and 6.6 stable tree 2024-03-16 8:16 ` backport a patch for Linux kernel-5.10 and 6.6 stable tree Lin Gui (桂林) @ 2024-03-16 9:21 ` Sasha Levin 2024-03-18 7:46 ` 回复: " Lin Gui (桂林) 2024-05-23 2:39 ` backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 " Lin Gui (桂林) 1 sibling, 1 reply; 15+ messages in thread From: Sasha Levin @ 2024-03-16 9:21 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟) On Sat, Mar 16, 2024 at 08:16:30AM +0000, Lin Gui (桂林) wrote: >Hi reviewers, > >I suggest to backport a commit to Linux kernel-5.10 and 6.6 stable tree. > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/mmc/core/mmc.c?h=v6.8&id=e4df56ad0bf3506c5189abb9be83f3bea05a4c4f Why? What bug does this fix? -- Thanks, Sasha ^ permalink raw reply [flat|nested] 15+ messages in thread
* 回复: backport a patch for Linux kernel-5.10 and 6.6 stable tree 2024-03-16 9:21 ` Sasha Levin @ 2024-03-18 7:46 ` Lin Gui (桂林) 2024-03-18 18:59 ` Greg KH 0 siblings, 1 reply; 15+ messages in thread From: Lin Gui (桂林) @ 2024-03-18 7:46 UTC (permalink / raw) To: Sasha Levin Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Lin Gui (桂林) Dear mailto:sashal@kernel.org, This patch is not a bug fix. This patch is to add the sysfs node of mmc: write protection related, the detailed description is as follows: mmc: core: Add wp_grp_size sysfs node The eMMC card can be set into write-protected mode to prevent data from being accidentally modified or deleted. Wp_grp_size (Write Protect Group Size) refers to an attribute of the eMMC card, used to manage write protection and is the CSD register [36:32] of the eMMC device. Wp_grp_size (Write Protect Group Size) indicates how many eMMC blocks are contained in each write protection group on the eMMC card. To allow userspace easy access of the CSD register bits, let's add sysfs node "wp_grp_size". ------------------------------------ Best Regards ! Guilin 发件人: Sasha Levin <sashal@kernel.org> 发送时间: 2024年3月16日 17:22 收件人: Lin Gui (桂林) <Lin.Gui@mediatek.com> 抄送: stable@vger.kernel.org; Yongdong Zhang (张永东) <Yongdong.Zhang@mediatek.com>; Bo Ye (叶波) <Bo.Ye@mediatek.com>; Qilin Tan (谭麒麟) <Qilin.Tan@mediatek.com> 主题: Re: backport a patch for Linux kernel-5.10 and 6.6 stable tree External email : Please do not click links or open attachments until you have verified the sender or the content. On Sat, Mar 16, 2024 at 08:16:30AM +0000, Lin Gui (桂林) wrote: >Hi reviewers, > >I suggest to backport a commit to Linux kernel-5.10 and 6.6 stable tree. > > https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/mmc/core/mmc.c?h=v6.8&id=e4df56ad0bf3506c5189abb9be83f3bea05a4c4f__;!!CTRNKA9wMg0ARbw!k12EPslKI8PL4JY5Qml8g56A4a_4ASz7Fpx2vm_BCELeW1Ky6azcr4u0uN8udOZyQLpTUz1ETq2jn2Y$ Why? What bug does this fix? -- Thanks, Sasha ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 回复: backport a patch for Linux kernel-5.10 and 6.6 stable tree 2024-03-18 7:46 ` 回复: " Lin Gui (桂林) @ 2024-03-18 18:59 ` Greg KH 0 siblings, 0 replies; 15+ messages in thread From: Greg KH @ 2024-03-18 18:59 UTC (permalink / raw) To: Lin Gui (桂林) Cc: Sasha Levin, stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟) On Mon, Mar 18, 2024 at 07:46:15AM +0000, Lin Gui (桂林) wrote: > Dear mailto:sashal@kernel.org, > > This patch is not a bug fix. > This patch is to add the sysfs node of mmc: write protection related, > the detailed description is as follows: Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for what is allowed for stable kernel releasaes. thanks, greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
* backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree 2024-03-16 8:16 ` backport a patch for Linux kernel-5.10 and 6.6 stable tree Lin Gui (桂林) 2024-03-16 9:21 ` Sasha Levin @ 2024-05-23 2:39 ` Lin Gui (桂林) 2024-05-23 6:32 ` Greg KH 1 sibling, 1 reply; 15+ messages in thread From: Lin Gui (桂林) @ 2024-05-23 2:39 UTC (permalink / raw) To: stable@vger.kernel.org Cc: Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦), Lin Gui (桂林) Hi reviewers, Please help to backport this patch into kenrel-5.15 , kernel-6.1 , kernel-6.6 stable tree Thank you https://patchwork.kernel.org/project/linux-mmc/patch/20231225093839.22931-2-mengqi.zhang@mediatek.com/ [v3,1/1] mmc: core: Add HS400 tuning in HS400es initialization Message ID 20231225093839.22931-2-mengqi.zhang@mediatek.com (mailing list archive) State New Headers show Series mmc: core: Add HS400 tuning in HS400es initialization | expand Commit Message Mengqi ZhangDec. 25, 2023, 9:38 a.m. UTC During the initialization to HS400es stage, add hs400 tuning flow as an optional process. For Mediatek IP, HS00es mode requires a specific tuning to ensure the correct HS400 timing setting. Signed-off-by: Mengqi Zhang <mengqi.zhang@mediatek.com> --- v1 https://patchwork.kernel.org/project/linux-mediatek/patch/20231201030547.11553-1-mengqi.zhang@mediatek.com/ v2 https://patchwork.kernel.org/project/linux-mediatek/patch/20231222062236.26370-1-mengqi.zhang@mediatek.com/ --- drivers/mmc/core/mmc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ------------------------------------ Best Regards ! Guilin ===================================== MediaTek(ChengDu)Inc. Email: mailto:lin.gui@mediatek.com tel:+86-28-85939000-67009 Fax:+86-28-85929875 ============================================== ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree 2024-05-23 2:39 ` backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 " Lin Gui (桂林) @ 2024-05-23 6:32 ` Greg KH [not found] ` <PSAPR03MB565389D72939161224B110CE95F42@PSAPR03MB5653.apcprd03.prod.outlook.com> 0 siblings, 1 reply; 15+ messages in thread From: Greg KH @ 2024-05-23 6:32 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦) On Thu, May 23, 2024 at 02:39:14AM +0000, Lin Gui (桂林) wrote: > Hi reviewers, > > Please help to backport this patch into kenrel-5.15 , kernel-6.1 , kernel-6.6 stable tree > Thank you > > > > https://patchwork.kernel.org/project/linux-mmc/patch/20231225093839.22931-2-mengqi.zhang@mediatek.com/ > > [v3,1/1] mmc: core: Add HS400 tuning in HS400es initialization > Message ID 20231225093839.22931-2-mengqi.zhang@mediatek.com (mailing list archive) > State New > Headers show > Series mmc: core: Add HS400 tuning in HS400es initialization | expand > Commit Message > Mengqi ZhangDec. 25, 2023, 9:38 a.m. UTC > During the initialization to HS400es stage, add hs400 tuning flow as an > optional process. For Mediatek IP, HS00es mode requires a specific > tuning to ensure the correct HS400 timing setting. > > Signed-off-by: Mengqi Zhang <mengqi.zhang@mediatek.com> What is the git id of it in Linus's tree? thanks, greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <PSAPR03MB565389D72939161224B110CE95F42@PSAPR03MB5653.apcprd03.prod.outlook.com>]
* Re: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree [not found] ` <PSAPR03MB565389D72939161224B110CE95F42@PSAPR03MB5653.apcprd03.prod.outlook.com> @ 2024-05-23 6:49 ` Greg KH [not found] ` <PSAPR03MB5653135ABCAF08A979BCCE0295F42@PSAPR03MB5653.apcprd03.prod.outlook.com> 0 siblings, 1 reply; 15+ messages in thread From: Greg KH @ 2024-05-23 6:49 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦) On Thu, May 23, 2024 at 06:41:04AM +0000, Lin Gui (桂林) wrote: > Dear @Greg KH<mailto:gregkh@linuxfoundation.org>, > > > What is the git id of it in Linus's tree? > [MTK] > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/mmc/core/mmc.c?h=v6.9&id=77e01b49e35f24ebd1659096d5fc5c3b75975545 > > > author Mengqi Zhang <mengqi.zhang@mediatek.com> 2023-12-25 17:38:40 +0800 > committer Ulf Hansson <ulf.hansson@linaro.org> 2024-01-02 17:54:05 +0100 > commit 77e01b49e35f24ebd1659096d5fc5c3b75975545 (patch) > tree 02a13063666685bc7061b46183fc45298b2dc9f4 /drivers/mmc/core/mmc.c > parent 09f164d393a6671e5ff8342ba6b3cb7fe3f20208 (diff) > download linux-77e01b49e35f24ebd1659096d5fc5c3b75975545.tar.gz > mmc: core: Add HS400 tuning in HS400es initialization > During the initialization to HS400es stage, add a HS400 tuning flow as an > optional process. For Mediatek IP, the HS400es mode requires a specific > tuning to ensure the correct HS400 timing setting. > > Signed-off-by: Mengqi Zhang <mengqi.zhang@mediatek.com> > Link: https://lore.kernel.org/r/20231225093839.22931-2-mengqi.zhang@mediatek.com > Signed-off-by: Ulf Hansson ulf.hansson@linaro.org<mailto:ulf.hansson@linaro.org> I don't understand, why does this qualify as a stable patch? The changes says this is "optional", which means the device should work just fine without it, right? Is this a regression fix from something that previously used to work properly? You have read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html right? thanks, greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <PSAPR03MB5653135ABCAF08A979BCCE0295F42@PSAPR03MB5653.apcprd03.prod.outlook.com>]
* Re: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree [not found] ` <PSAPR03MB5653135ABCAF08A979BCCE0295F42@PSAPR03MB5653.apcprd03.prod.outlook.com> @ 2024-05-23 11:01 ` Greg KH [not found] ` <PSAPR03MB5653638EEC15BE49B2E03E9495F52@PSAPR03MB5653.apcprd03.prod.outlook.com> 0 siblings, 1 reply; 15+ messages in thread From: Greg KH @ 2024-05-23 11:01 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦) On Thu, May 23, 2024 at 08:21:23AM +0000, Lin Gui (桂林) wrote: > Dear @Greg KH<mailto:gregkh@linuxfoundation.org>, > > > I don't understand, why does this qualify as a stable patch? The > > changes says this is "optional", which means the device should work just > > fine without it, right? > > [MTK] > > If without this patch, some emmc devices may cause unstable operation and report CRC errors. > > > > Is this a regression fix from something that previously used to work > > properly? > [MTK] > Yes Ok, thanks. But you need to provide a working, and tested, version of it for 5.15.y as it obviously does not even work there (which means you did not test that?) greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <PSAPR03MB5653638EEC15BE49B2E03E9495F52@PSAPR03MB5653.apcprd03.prod.outlook.com>]
* Re: 回复: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree [not found] ` <PSAPR03MB5653638EEC15BE49B2E03E9495F52@PSAPR03MB5653.apcprd03.prod.outlook.com> @ 2024-05-24 4:08 ` Greg KH 2024-05-24 4:08 ` Greg KH 1 sibling, 0 replies; 15+ messages in thread From: Greg KH @ 2024-05-24 4:08 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦) On Fri, May 24, 2024 at 01:07:18AM +0000, Lin Gui (桂林) wrote: > Dear @Greg KH<mailto:gregkh@linuxfoundation.org>, > > 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)) { > The patch is corrupted, and sent in html format. But most importantly, you did not test this to verify it works at all, which means that you don't really need it? confused, greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 回复: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree [not found] ` <PSAPR03MB5653638EEC15BE49B2E03E9495F52@PSAPR03MB5653.apcprd03.prod.outlook.com> 2024-05-24 4:08 ` 回复: " Greg KH @ 2024-05-24 4:08 ` Greg KH 2024-05-24 5:58 ` 回复: " Lin Gui (桂林) 1 sibling, 1 reply; 15+ messages in thread From: Greg KH @ 2024-05-24 4:08 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦) On Fri, May 24, 2024 at 01:07:18AM +0000, Lin Gui (桂林) wrote: > Dear @Greg KH<mailto:gregkh@linuxfoundation.org>, > > 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://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. ^ permalink raw reply [flat|nested] 15+ messages in thread
* 回复: 回复: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree 2024-05-24 4:08 ` Greg KH @ 2024-05-24 5:58 ` Lin Gui (桂林) 2024-05-24 6:55 ` Greg KH 0 siblings, 1 reply; 15+ messages in thread From: Lin Gui (桂林) @ 2024-05-24 5:58 UTC (permalink / raw) To: Greg KH Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦), Lin Gui (桂林) Dear gregkh@linuxfoundation.org, 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@linuxfoundation.org> 发送时间: 2024年5月24日 12:09 收件人: Lin Gui (桂林) <Lin.Gui@mediatek.com> 抄送: stable@vger.kernel.org; Yongdong Zhang (张永东) <Yongdong.Zhang@mediatek.com>; Bo Ye (叶波) <Bo.Ye@mediatek.com>; Qilin Tan (谭麒麟) <Qilin.Tan@mediatek.com>; Wenbin Mei (梅文彬) <Wenbin.Mei@mediatek.com>; Mengqi Zhang (张梦琦) <Mengqi.Zhang@mediatek.com> 主题: 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@linuxfoundation.org>, > > 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. ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: 回复: 回复: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree 2024-05-24 5:58 ` 回复: " Lin Gui (桂林) @ 2024-05-24 6:55 ` Greg KH 2024-05-26 2:51 ` 回复: " Lin Gui (桂林) 0 siblings, 1 reply; 15+ messages in thread From: Greg KH @ 2024-05-24 6:55 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦) On Fri, May 24, 2024 at 05:58:32AM +0000, Lin Gui (桂林) wrote: > Dear gregkh@linuxfoundation.org, > > 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)) { > > Again, please apply this to the latest 5.15.y kernel and see what happens. I do not know what kernel you are using, but you know what kernel we are using :) thanks, greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
* 回复: 回复: 回复: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree 2024-05-24 6:55 ` Greg KH @ 2024-05-26 2:51 ` Lin Gui (桂林) 2024-06-12 12:08 ` Greg KH 0 siblings, 1 reply; 15+ messages in thread From: Lin Gui (桂林) @ 2024-05-26 2:51 UTC (permalink / raw) To: Greg KH Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦), Lin Gui (桂林) Dear gregkh@linuxfoundation.org, I'm very sorry for the trouble, here's the update: From f033ef0bfb29cd413d10aba860ce8d178cc314e2 Mon Sep 17 00:00:00 2001 From: Mengqi Zhang <mailto:mengqi.zhang@mediatek.com> Date: Mon, 25 Dec 2023 17:38:40 +0800 Subject: [PATCH] mmc: core: Add HS400 tuning in HS400es initialization commit 77e01b49e35f24ebd1659096d5fc5c3b75975545 upstream During the initialization to HS400es stage, add a HS400 tuning flow as an optional process. For Mediatek IP, the HS400es mode requires a specific tuning to ensure the correct HS400 timing setting. Signed-off-by: Mengqi Zhang <mailto:mengqi.zhang@mediatek.com> Link: https://lore.kernel.org/r/20231225093839.22931-2-mengqi.zhang@mediatek.com Signed-off-by: Ulf Hansson <mailto:ulf.hansson@linaro.org> --- drivers/mmc/core/mmc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index a56906633ddf..c1eb22fd033b 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1799,8 +1799,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@linuxfoundation.org> 发送时间: 2024年5月24日 14:55 收件人: Lin Gui (桂林) <Lin.Gui@mediatek.com> 抄送: stable@vger.kernel.org; Yongdong Zhang (张永东) <Yongdong.Zhang@mediatek.com>; Bo Ye (叶波) <Bo.Ye@mediatek.com>; Qilin Tan (谭麒麟) <Qilin.Tan@mediatek.com>; Wenbin Mei (梅文彬) <Wenbin.Mei@mediatek.com>; Mengqi Zhang (张梦琦) <Mengqi.Zhang@mediatek.com> 主题: 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 05:58:32AM +0000, Lin Gui (桂林) wrote: > Dear mailto:gregkh@linuxfoundation.org, > > 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)) { > > Again, please apply this to the latest 5.15.y kernel and see what happens. I do not know what kernel you are using, but you know what kernel we are using :) thanks, greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 回复: 回复: 回复: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree 2024-05-26 2:51 ` 回复: " Lin Gui (桂林) @ 2024-06-12 12:08 ` Greg KH 2024-06-12 12:20 ` Greg KH 0 siblings, 1 reply; 15+ messages in thread From: Greg KH @ 2024-06-12 12:08 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦) On Sun, May 26, 2024 at 02:51:42AM +0000, Lin Gui (桂林) wrote: > Dear gregkh@linuxfoundation.org, > > I'm very sorry for the trouble, here's the update: > > From f033ef0bfb29cd413d10aba860ce8d178cc314e2 Mon Sep 17 00:00:00 2001 > From: Mengqi Zhang <mailto:mengqi.zhang@mediatek.com> > Date: Mon, 25 Dec 2023 17:38:40 +0800 > Subject: [PATCH] mmc: core: Add HS400 tuning in HS400es initialization > > commit 77e01b49e35f24ebd1659096d5fc5c3b75975545 upstream > > During the initialization to HS400es stage, add a HS400 tuning flow as an optional process. For Mediatek IP, the HS400es mode requires a specific tuning to ensure the correct HS400 timing setting. > > Signed-off-by: Mengqi Zhang <mailto:mengqi.zhang@mediatek.com> > Link: https://lore.kernel.org/r/20231225093839.22931-2-mengqi.zhang@mediatek.com > Signed-off-by: Ulf Hansson <mailto:ulf.hansson@linaro.org> > --- > drivers/mmc/core/mmc.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index a56906633ddf..c1eb22fd033b 100644 > --- a/drivers/mmc/core/mmc.c > +++ b/drivers/mmc/core/mmc.c > @@ -1799,8 +1799,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)) { > -- Better, thanks, but your email client still did odd things to the email addresses. I've fixed this up by hand, but please, be more careful next time... greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 回复: 回复: 回复: 回复: 回复: backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 stable tree 2024-06-12 12:08 ` Greg KH @ 2024-06-12 12:20 ` Greg KH 0 siblings, 0 replies; 15+ messages in thread From: Greg KH @ 2024-06-12 12:20 UTC (permalink / raw) To: Lin Gui (桂林) Cc: stable@vger.kernel.org, Yongdong Zhang (张永东), Bo Ye (叶波), Qilin Tan (谭麒麟), Wenbin Mei (梅文彬), Mengqi Zhang (张梦琦) On Wed, Jun 12, 2024 at 02:08:20PM +0200, Greg KH wrote: > On Sun, May 26, 2024 at 02:51:42AM +0000, Lin Gui (桂林) wrote: > > Dear gregkh@linuxfoundation.org, > > > > I'm very sorry for the trouble, here's the update: > > > > From f033ef0bfb29cd413d10aba860ce8d178cc314e2 Mon Sep 17 00:00:00 2001 > > From: Mengqi Zhang <mailto:mengqi.zhang@mediatek.com> > > Date: Mon, 25 Dec 2023 17:38:40 +0800 > > Subject: [PATCH] mmc: core: Add HS400 tuning in HS400es initialization > > > > commit 77e01b49e35f24ebd1659096d5fc5c3b75975545 upstream > > > > During the initialization to HS400es stage, add a HS400 tuning flow as an optional process. For Mediatek IP, the HS400es mode requires a specific tuning to ensure the correct HS400 timing setting. > > > > Signed-off-by: Mengqi Zhang <mailto:mengqi.zhang@mediatek.com> > > Link: https://lore.kernel.org/r/20231225093839.22931-2-mengqi.zhang@mediatek.com > > Signed-off-by: Ulf Hansson <mailto:ulf.hansson@linaro.org> > > --- > > drivers/mmc/core/mmc.c | 9 +++++++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index a56906633ddf..c1eb22fd033b 100644 > > --- a/drivers/mmc/core/mmc.c > > +++ b/drivers/mmc/core/mmc.c > > @@ -1799,8 +1799,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)) { > > -- > > Better, thanks, but your email client still did odd things to the email > addresses. > > I've fixed this up by hand, but please, be more careful next time... Wait, again, NO! This patch does NOT even build at all! How was this tested? Here's a hint, this is the build error I get when applying it to the 5.15.y tree. I tried to say this in a nice way before, but now I will be specific: CC [M] drivers/mmc/core/mmc.o drivers/mmc/core/mmc.c: In function ‘mmc_init_card’: drivers/mmc/core/mmc.c:1803:32: error: ‘const struct mmc_host_ops’ has no member named ‘execute_hs400_tuning’; did you mean ‘prepare_hs400_tuning’? 1803 | if (host->ops->execute_hs400_tuning) { | ^~~~~~~~~~~~~~~~~~~~ | prepare_hs400_tuning drivers/mmc/core/mmc.c:1804:42: error: ‘const struct mmc_host_ops’ has no member named ‘execute_hs400_tuning’; did you mean ‘prepare_hs400_tuning’? 1804 | err = host->ops->execute_hs400_tuning(host, card); | ^~~~~~~~~~~~~~~~~~~~ | prepare_hs400_tuning Please properly test your submissions before sending them and asking someone else to apply them, otherwise it just wastes our time and we get very grumpy, as would you. greg k-h ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-06-12 12:20 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <PSAPR03MB5653FFA63E972A80A6A2F4AF952F2@PSAPR03MB5653.apcprd03.prod.outlook.com>
2024-03-16 8:16 ` backport a patch for Linux kernel-5.10 and 6.6 stable tree Lin Gui (桂林)
2024-03-16 9:21 ` Sasha Levin
2024-03-18 7:46 ` 回复: " Lin Gui (桂林)
2024-03-18 18:59 ` Greg KH
2024-05-23 2:39 ` backport a patch for Linux kernel-5.15 kernel-6.1 kenrel-6.6 " Lin Gui (桂林)
2024-05-23 6:32 ` Greg KH
[not found] ` <PSAPR03MB565389D72939161224B110CE95F42@PSAPR03MB5653.apcprd03.prod.outlook.com>
2024-05-23 6:49 ` 回复: " Greg KH
[not found] ` <PSAPR03MB5653135ABCAF08A979BCCE0295F42@PSAPR03MB5653.apcprd03.prod.outlook.com>
2024-05-23 11:01 ` 回复: " Greg KH
[not found] ` <PSAPR03MB5653638EEC15BE49B2E03E9495F52@PSAPR03MB5653.apcprd03.prod.outlook.com>
2024-05-24 4:08 ` 回复: " Greg KH
2024-05-24 4:08 ` Greg KH
2024-05-24 5:58 ` 回复: " Lin Gui (桂林)
2024-05-24 6:55 ` Greg KH
2024-05-26 2:51 ` 回复: " Lin Gui (桂林)
2024-06-12 12:08 ` Greg KH
2024-06-12 12:20 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox