From: "Liu Lucas/刘保柱" <lucas.liu@siengine.com>
To: "ulfh@kernel.org" <ulfh@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: 转发: [PATCH] mmc: Update the value of ios.drv_type at the location where fixed_drv_type is used
Date: Wed, 3 Jun 2026 00:42:15 +0000 [thread overview]
Message-ID: <ef0acccc56bb493bbd66661f404082b1@siengine.com> (raw)
In-Reply-To: <20260602061001.63579-1-lucas.liu@siengine.com>
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
prev parent reply other threads:[~2026-06-03 0:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=ef0acccc56bb493bbd66661f404082b1@siengine.com \
--to=lucas.liu@siengine.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulfh@kernel.org \
/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