* [PATCH] mmc: Update the value of ios.drv_type at the location where fixed_drv_type is used
@ 2026-06-02 6:10 baozhu.liu
2026-06-03 0:42 ` 转发: " Liu Lucas/刘保柱
0 siblings, 1 reply; 2+ messages in thread
From: baozhu.liu @ 2026-06-02 6:10 UTC (permalink / raw)
To: ulfh; +Cc: linux-mmc, linux-kernel, baozhu.liu
Modify the value of "fixed-emmc-driver-type" in the device tree,
but when checking "cat /sys/kernel/debug/mmc/ios",
it is found that the driver type has not changed.
So, update the value of ios.drv_type at the location
where fixed_drv_type is used.
Signed-off-by: baozhu.liu <lucas.liu@siengine.com>
---
drivers/mmc/core/mmc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 05444ecf3909..773d496b856a 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1361,14 +1361,15 @@ static void mmc_select_driver_type(struct mmc_card *card)
card_drv_type = card->ext_csd.raw_driver_strength |
mmc_driver_type_mask(0);
- if (fixed_drv_type >= 0)
+ if (fixed_drv_type >= 0) {
drive_strength = card_drv_type & mmc_driver_type_mask(fixed_drv_type)
? fixed_drv_type : 0;
- else
+ card->host->ios.drv_type = drive_strength;
+ } else {
drive_strength = mmc_select_drive_strength(card,
card->ext_csd.hs200_max_dtr,
card_drv_type, &drv_type);
-
+ }
card->drive_strength = drive_strength;
if (fixed_drv_type >= 0 && drive_strength)
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* 转发: [PATCH] mmc: Update the value of ios.drv_type at the location where fixed_drv_type is used
2026-06-02 6:10 [PATCH] mmc: Update the value of ios.drv_type at the location where fixed_drv_type is used baozhu.liu
@ 2026-06-03 0:42 ` Liu Lucas/刘保柱
0 siblings, 0 replies; 2+ messages in thread
From: Liu Lucas/刘保柱 @ 2026-06-03 0:42 UTC (permalink / raw)
To: ulfh@kernel.org; +Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org
Due to the failure of the previous email transmission, I am forwarding it again.
-----邮件原件-----
发件人: baozhu.liu <lucas.liu@siengine.com>
发送时间: 2026年6月2日 14:10
收件人: ulfh@kernel.org
抄送: linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org; Liu Lucas/刘保柱 <lucas.liu@siengine.com>
主题: [PATCH] mmc: Update the value of ios.drv_type at the location where fixed_drv_type is used
Modify the value of "fixed-emmc-driver-type" in the device tree, but when checking "cat /sys/kernel/debug/mmc/ios", it is found that the driver type has not changed.
So, update the value of ios.drv_type at the location where fixed_drv_type is used.
Signed-off-by: baozhu.liu <lucas.liu@siengine.com>
---
drivers/mmc/core/mmc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 05444ecf3909..773d496b856a 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1361,14 +1361,15 @@ static void mmc_select_driver_type(struct mmc_card *card)
card_drv_type = card->ext_csd.raw_driver_strength |
mmc_driver_type_mask(0);
- if (fixed_drv_type >= 0)
+ if (fixed_drv_type >= 0) {
drive_strength = card_drv_type & mmc_driver_type_mask(fixed_drv_type)
? fixed_drv_type : 0;
- else
+ card->host->ios.drv_type = drive_strength;
+ } else {
drive_strength = mmc_select_drive_strength(card,
card->ext_csd.hs200_max_dtr,
card_drv_type, &drv_type);
-
+ }
card->drive_strength = drive_strength;
if (fixed_drv_type >= 0 && drive_strength)
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-03 0:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 6:10 [PATCH] mmc: Update the value of ios.drv_type at the location where fixed_drv_type is used baozhu.liu
2026-06-03 0:42 ` 转发: " Liu Lucas/刘保柱
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox