]> 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>
Sat, 29 Jun 2024 10:52:30 +0000 (12:52 +0200)
commitee3b0569cd9fad59609bd87f086018b3d33707dc
treec01d2b3fef4bd62a18c8ab082f0f5dfe3ac15466
parent188dd0c83463f0a0632b33847c0f3e2baeb3541a
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