From: "baozhu.liu" <lucas.liu@siengine.com>
To: <ulfh@kernel.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"baozhu.liu" <lucas.liu@siengine.com>
Subject: [PATCH] mmc: Update the value of ios.drv_type at the location where fixed_drv_type is used
Date: Tue, 2 Jun 2026 14:10:01 +0800 [thread overview]
Message-ID: <20260602061001.63579-1-lucas.liu@siengine.com> (raw)
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
next reply other threads:[~2026-06-02 6:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 6:10 baozhu.liu [this message]
2026-06-03 0:42 ` 转发: " Liu Lucas/刘保柱
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=20260602061001.63579-1-lucas.liu@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
all inboxes | Powered by JetHome®