]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: sd: SDUC Support Recognition
authorAvri Altman <avri.altman@wdc.com>
Sun, 6 Oct 2024 05:11:39 +0000 (08:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:11 +0000 (20:03 +0100)
commitc00372e41bf658deab01be55aa83285a599569c0
treeec7e61a9a8eec0a0529607dc89b1016504c0b870
parentf42e0656d483d7495243e58e7d98c04cbbea9c11
mmc: sd: SDUC Support Recognition

[ Upstream commit fce2ce78af1e14dc1316aaddb5b3308be05cf452 ]

Ultra Capacity SD cards (SDUC) was already introduced in SD7.0.  Those
cards support capacity larger than 2TB and up to including 128TB.

ACMD41 was extended to support the host-card handshake during
initialization.  The card expects that the HCS & HO2T bits to be set in
the command argument, and sets the applicable bits in the R3 returned
response.  On the contrary, if a SDUC card is inserted to a
non-supporting host, it will never respond to this ACMD41 until
eventually, the host will timed out and give up.

Also, add SD CSD version 3.0 - designated for SDUC, and properly parse
the csd register as the c_size field got expanded to 28 bits.

Do not enable SDUC for now - leave it to the last patch in the series.

Tested-by: Ricky WU <ricky_wu@realtek.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20241006051148.160278-2-avri.altman@wdc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Stable-dep-of: 869d37475788 ("mmc: core: Use GFP_NOIO in ACMD22")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/core/bus.c
drivers/mmc/core/card.h
drivers/mmc/core/sd.c
drivers/mmc/core/sd.h
drivers/mmc/core/sdio.c
include/linux/mmc/card.h
include/linux/mmc/sd.h