]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mmc: core: Respect quirk_max_rate for non-UHS SDIO card
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 22 Nov 2024 09:37:22 +0000 (17:37 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 10 Dec 2024 10:18:45 +0000 (11:18 +0100)
The card-quirk was added to limit the clock-rate for a card with UHS-mode
support, although let's respect the quirk for non-UHS mode too, to make the
behaviour consistent.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Message-ID: <1732268242-72799-1-git-send-email-shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sdio.c

index 9566837c9848e6e62a3a3bdd582328e6a1b2ed67..4b19b8a16b096802317be31b4da0d751c9a363b9 100644 (file)
@@ -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;
 }