mmc: core: apply SD quirks earlier during probe on 5.15 stable kernel
Subsystems (2)
cover mmc: core: apply SD quirks earlier during probe on 5.15 stable kernel
From: Emanuele Ghidoli <[email protected]>
Hello,
I noticed that commit 1728e17762b9 ("mmc: core: sd: Apply BROKEN_SD_DISCARD quirk earlier") introduces a regression because since it depends on the backport of
commit 5c4f3e1f0a2a ("mmc: core: apply SD quirks earlier during probe"). Without this patch the quirk is not applied at all.
I backported the latter commit to 5.15 stable kernel to fix the regression.
Best regards,
Emanuele Ghidoli
Jonathan Bell (1):
mmc: core: apply SD quirks earlier during probe
drivers/mmc/core/sd.c | 4 ++++ 1 file changed, 4 insertions(+)
Signature · 1 line
2.43.0
PATCH 1/1 mmc: core: apply SD quirks earlier during probe
From: Jonathan Bell <[email protected]>
Applying MMC_QUIRK_BROKEN_SD_CACHE is broken, as the card's SD quirks are referenced in sd_parse_ext_reg_perf() prior to the quirks being initialized in mmc_blk_probe().
To fix this problem, let's split out an SD-specific list of quirks and apply in mmc_sd_init_card() instead. In this way, sd_read_ext_regs() to has the available information for not assigning the SD_EXT_PERF_CACHE as one of the (un)supported features, which in turn allows mmc_sd_init_card() to properly skip execution of sd_enable_cache().
--- drivers/mmc/core/sd.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/core/sd.c +4 -0
@@ -23,6 +23,7 @@#include "host.h" #include "bus.h" #include "mmc_ops.h" +#include "quirks.h" #include "sd.h" #include "sd_ops.h"
@@ -1468,6 +1469,9 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr, goto free_card; } +/* Apply quirks prior to card setup */ +mmc_fixup_device (card, mmc_sd_fixups); + err =mmc_sd_setup_card (host, card, oldcard !=NULL );if (err) goto free_card;
Signature · 1 line
2.43.0
RE: [PATCH v1 1/1] mmc: core: apply SD quirks earlier during probe
Quoted 23 lines
From: Jonathan Bell <[email protected]>
Applying
MMC_QUIRK_BROKEN_SD_CACHEis broken, as the card's SD quirks are referenced insd_parse_ext_reg_perf()prior to the quirks being initialized inmmc_blk_probe().To fix this problem, let's split out an SD-specific list of quirks and apply in
mmc_sd_init_card()instead. In this way,sd_read_ext_regs()to has the available information for not assigning theSD_EXT_PERF_CACHEas one of the (un)supported features, which in turn allowsmmc_sd_init_card()to properly skip execution ofsd_enable_cache().Fixes 1728e17762b9 ("mmc: core: sd: Apply BROKEN_SD_DISCARD quirkearlier")
Signed-off-by Jonathan Bell <[email protected]>Co-developed-by Keita Aihara <[email protected]>Signed-off-by Keita Aihara <[email protected]>Reviewed-by Dragan Simic <[email protected]>Reviewed-by Avri Altman <[email protected]>Signed-off-by Ulf Hansson <[email protected]>Signed-off-by Emanuele Ghidoli <[email protected]>
Quoted 3 lines
--- drivers/mmc/core/sd.c | 4 ++++ 1 file changed, 4 insertions(+)
Looks like your backport is missing some parts of that patch. Please see in: https://lore.kernel.org/all/[email protected]/
Thanks,
Avri
Quoted 26 lines
drivers/mmc/core/sd.c index renamed from drivers/mmc/core/sd.c +0
-0
592166e53dce..7b375cebc671100644drivers/mmc/core/sd.c +4
-0@@ -23,6 +23,7 @@#include "host.h" #include "bus.h" #include "mmc_ops.h" +#include "quirks.h" #include "sd.h" #include "sd_ops.h" @@ -1468,6 +1469,9 @@ static int mmc_sd_init_card(struct mmc_host *host,u32 ocr, goto free_card; } +/* Apply quirks prior to card setup */ +mmc_fixup_device (card, mmc_sd_fixups); + err =mmc_sd_setup_card (host, card, oldcard !=NULL );if (err)goto free_card;--
2.43.0
Greg Kroah-Hartman
maintainerRe: [PATCH v1 1/1] mmc: core: apply SD quirks earlier during probe
In reply to Emanuele GhidoliQuoted 22 lines · Emanuele Ghidoli
From: Jonathan Bell <[email protected]>
Applying
MMC_QUIRK_BROKEN_SD_CACHEis broken, as the card's SD quirks are referenced insd_parse_ext_reg_perf()prior to the quirks being initialized inmmc_blk_probe().To fix this problem, let's split out an SD-specific list of quirks and apply in
mmc_sd_init_card()instead. In this way,sd_read_ext_regs()to has the available information for not assigning theSD_EXT_PERF_CACHEas one of the (un)supported features, which in turn allowsmmc_sd_init_card()to properly skip execution ofsd_enable_cache().Fixes 1728e17762b9 ("mmc: core: sd: Apply BROKEN_SD_DISCARD quirk earlier")Signed-off-by Jonathan Bell <[email protected]>Co-developed-by Keita Aihara <[email protected]>Signed-off-by Keita Aihara <[email protected]>Reviewed-by Dragan Simic <[email protected]>Reviewed-by Avri Altman <[email protected]>Signed-off-by Ulf Hansson <[email protected]>Signed-off-by Emanuele Ghidoli <[email protected]>
Quoted 3 lines
--- drivers/mmc/core/sd.c | 4 ++++ 1 file changed, 4 insertions(+)
What is the git id of this commit in Linus's tree?
thanks,
greg k-h
RE: [PATCH v1 1/1] mmc: core: apply SD quirks earlier during probe
Quoted 29 lines · Emanuele Ghidoli
Quoted 3 lines
From: Jonathan Bell <[email protected]>
Applying
MMC_QUIRK_BROKEN_SD_CACHEis broken, as the card's SDquirks
Quoted 20 lines
are referenced in
sd_parse_ext_reg_perf()prior to the quirks being initialized inmmc_blk_probe().To fix this problem, let's split out an SD-specific list of quirks and apply in
mmc_sd_init_card()instead. In this way,sd_read_ext_regs()to has the available information for not assigning theSD_EXT_PERF_CACHEas one of the (un)supported features, which in turn allowsmmc_sd_init_card()to properly skip execution ofsd_enable_cache().Fixes 1728e17762b9 ("mmc: core: sd: Apply BROKEN_SD_DISCARD quirkearlier")
Signed-off-by Jonathan Bell <[email protected]>Co-developed-by Keita Aihara <[email protected]>Signed-off-by Keita Aihara <[email protected]>Reviewed-by Dragan Simic <[email protected]>Reviewed-by Avri Altman <[email protected]>Signed-off-by Ulf Hansson <[email protected]>Signed-off-by Emanuele Ghidoli <[email protected]>Quoted 3 lines
--- drivers/mmc/core/sd.c | 4 ++++ 1 file changed, 4 insertions(+)
Quoted 1 line
What is the git id of this commit in Linus's tree?
469e5e471398 mmc: core: apply SD quirks earlier during probe
Thanks,
Avri
Quoted 4 lines
thanks,
greg k-h
Quoted 5 lines
From: Emanuele Ghidoli <[email protected]>
Hello,
Quoted 7 lines
I noticed that commit
1728e17762b9("mmc: core: sd: ApplyBROKEN_SD_DISCARDquirk earlier") introduces a regression because since it depends on the backport of commit5c4f3e1f0a2a("mmc: core: apply SD quirks earlier during probe").
Without this patch the quirk is not applied at all.I backported the latter commit to 5.15 stable kernel to fix the regression.
Thanks for fixing this.
Thanks,
Avri
Quoted 12 lines
Best regards,
Emanuele GhidoliJonathan Bell (1):
mmc: core: apply SD quirks earlier during probedrivers/mmc/core/sd.c | 4 ++++ 1 file changed, 4 insertions(+)--
2.43.0
Greg Kroah-Hartman
maintainerQuoted 8 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
Hello,
I noticed that commit
1728e17762b9("mmc: core: sd: ApplyBROKEN_SD_DISCARDquirk earlier") introduces a regression because since it depends on the backport of
commit5c4f3e1f0a2a("mmc: core: apply SD quirks earlier during probe"). Without this patch the quirk is not applied at all.
That commit id is not a valid one in any tree I can find :(
confused,
greg k-h
Quoted 6 lines · Emanuele Ghidoli
Quoted 4 lines
From: Emanuele Ghidoli <[email protected]>
Hello,
Quoted 7 lines
Quoted 3 lines
I noticed that commit
1728e17762b9("mmc: core: sd: ApplyBROKEN_SD_DISCARDquirk earlier") introduces a regression because since it depends on the backport of commit5c4f3e1f0a2a("mmc: core:apply SD quirks earlier during probe").
Quoted 1 line
Without this patch the quirk is not applied at all.
That commit id is not a valid one in any tree I can find :(
Strangely enough, looks like that commit already exist in stable:469e5e471398 mmc: core: apply SD quirks earlier during probe
So what exactly is the issue?
Thanks,
Avri
Quoted 4 lines
confused,
greg k-h