]> git.dujemihanovic.xyz Git - linux.git/commit
DONOTMERGE: mmc: core: force-disable cache
authorKarel Balej <balejk@matfyz.cz>
Sun, 28 Jan 2024 18:24:03 +0000 (19:24 +0100)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Wed, 17 Apr 2024 18:28:42 +0000 (20:28 +0200)
commitf41dd45eb3e0bee2b3120f76d734a80014eac39a
tree41e955d56e335746c73063808853ab2155a15d4f
parentfa721eb88c232f1c8635ef4bd4ac73ef5b9d0028
DONOTMERGE: mmc: core: force-disable cache

This is a workaround for the card initialization error:

mmc0: SDHCI controller on d4281000.mmc [d4281000.mmc] using ADMA
mmc0: Card stuck being busy! __mmc_poll_for_busy
mmc0: error -110 whilst initialising MMC card
mmc0: Tuning failed, falling back to fixed sampling clock
mmc0: Card stuck being busy! __mmc_poll_for_busy
mmc0: error -110 whilst initialising MMC card
mmc0: Card stuck being busy! __mmc_poll_for_busy
mmc0: error -110 whilst initialising MMC card
mmc0: Card stuck being busy! __mmc_poll_for_busy
mmc0: error -110 whilst initialising MMC card
mmc0: Failed to initialize a non-removable card

This error does not occur when the card is forced to DDR_1_8V but if
caching is not disabled, the following errors occur:

[    0.210673] mmc0: SDHCI controller on d4281000.mmc [d4281000.mmc] using ADMA
[    0.301489] mmc0: new DDR MMC card at address 0001
[    0.302156] mmcblk0: mmc0:0001 QNW00A 7.28 GiB
[    0.308976] mmcblk0boot0: mmc0:0001 QNW00A 4.00 MiB
[    0.310318] mmcblk0boot1: mmc0:0001 QNW00A 4.00 MiB
[    0.311571] mmcblk0rpmb: mmc0:0001 QNW00A 512 KiB, chardev (248:0)
[  171.353426] mmc0: Card stuck being busy! __mmc_poll_for_busy
[  171.353443] mmc0: cache flush error -110
[  201.399007] mmc0: Card stuck being busy! __mmc_poll_for_busy
[  201.399023] mmc0: cache flush error -110
[  231.415093] mmc0: Card stuck being busy! __mmc_poll_for_busy
[  231.415109] mmc0: cache flush error -110
[  261.464688] mmc0: Card stuck being busy! __mmc_poll_for_busy
[  261.464703] mmc0: cache flush error -110

A workaround was initially devised by blacksilver to counter the first
error by forcing the card to DDR_1_8V and the second error by always
returning false from _mmc_cache_enabled() (which the current workaround
causes to happen too).

The current workaround allows the card to be used in HS200 mode which
however has the side effect of spamming dmesg with tuning failure
messages.
drivers/mmc/core/mmc.c