]> 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>
Tue, 1 Oct 2024 16:18:22 +0000 (18:18 +0200)
commited4c3d3746adfbfd5a66b903b21280cd5d463967
treeca584665f4249ec8b1b9dd973ff6028d590c5dc3
parent303b65f5b6d197b4299cbff8e6ccf90f41c02a5a
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