Skip to content

Commit 3f957de

Browse files
Yann-lmsstorulf
authored andcommitted
mmc: mmc_test: use erase_arg for mmc_erase command
Since [1], the erase argument for mmc_erase() function is saved in erase_arg field of card structure. It is preferable to use it instead of hard-coded MMC_SECURE_ERASE_ARG, which from eMMC 4.51 spec is not recommended: "6.6.16 Secure Erase NOTE Secure Erase is included for backwards compatibility. New system level implementations (based on v4.51 devices and beyond) should use Erase combined with Sanitize instead of secure erase." On STM32MP157C-EV1 board, embedding a THGBMDG5D1LBAIL eMMC, using MMC_ERASE command with MMC_SECURE_ERASE_ARG may stuck the STM32 SDMMC IP, if test 37 or test 38 are launched just after a write test, e.g. test 36. Using the default MMC_ERASE argument from framework with erase_arg, which default in our case to MMC_DISCARD_ARG does no more trig the issue. [1] commit 01904ff ("mmc: core: Calculate the discard arg only once") Signed-off-by: Yann Gautier <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 0c1a3e8 commit 3f957de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/core/mmc_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ static int mmc_test_rw_multiple(struct mmc_test_card *test,
21102110
if (mmc_can_erase(test->card) &&
21112111
tdata->prepare & MMC_TEST_PREP_ERASE) {
21122112
ret = mmc_erase(test->card, dev_addr,
2113-
size / 512, MMC_SECURE_ERASE_ARG);
2113+
size / 512, test->card->erase_arg);
21142114
if (ret)
21152115
ret = mmc_erase(test->card, dev_addr,
21162116
size / 512, MMC_ERASE_ARG);

0 commit comments

Comments
 (0)