Skip to contentSkip to conversation

mmc: core: sdio: Respect quirk_max_rate for non-UHS mode

PATCH In review Shawn Lin 2 participants 2 messages Nov 22, 2024 – Dec 2, 2024 MMC, SD and SDIO

lore
Share & tools
lore

Shawn Lin

author
#0 lore raw

PATCH 1/1 mmc: core: sdio: Respect quirk_max_rate for non-UHS mode

The same limitation was done in UHS mode, so fix it in non-UHS mode.

---

 drivers/mmc/core/sdio.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/core/sdio.c +2 -0
index 4fb247f..b31ca2b 100644
@@ -458,6 +458,8 @@ static unsigned mmc_sdio_get_max_clock(struct mmc_card *card)
 	if (mmc_card_sd_combo(card))
 		max_dtr = min(max_dtr, mmc_sd_get_max_clock(card));
 
+	max_dtr = min_not_zero(max_dtr, card->quirk_max_rate);
+
 	return max_dtr;
 }
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Shawn Lin

The same limitation was done in UHS mode, so fix it in non-UHS mode.

Applied for next, thanks!

I took the liberty of clarifying the commit message a bit, please let me know if my change doesn't make sense to you!

Kind regards
Uffe

Quoted 21 lines

---

 drivers/mmc/core/sdio.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/core/sdio.c +2 -1
index 4fb247f..b31ca2b 100644
@@ -458,6 +458,8 @@ static unsigned mmc_sdio_get_max_clock(struct mmc_card *card)
        if (mmc_card_sd_combo(card))
                max_dtr = min(max_dtr, mmc_sd_get_max_clock(card));
 
+       max_dtr = min_not_zero(max_dtr, card->quirk_max_rate);
+
        return max_dtr;
 }
 
--

2.7.4