acrn-kernel/drivers/mmc/core
Andreas Koop 3a6ffb3c8c mmc: mmc_spi: Enable stable writes
While using the mmc_spi driver occasionally errors like this popped up:

mmcblk0: error -84 transferring data end_request: I/O error, dev mmcblk0, sector 581756

I looked on the Internet for occurrences of the same problem and came
across a helpful post [1]. It includes source code to reproduce the bug.
There is also an analysis about the cause. During transmission data in the
supplied buffer is being modified. Thus the previously calculated checksum
is not correct anymore.

After some digging I found out that device drivers are supposed to report
they need stable writes. To fix this I set the appropriate flag at queue
initialization if CRC checksumming is enabled for that SPI host.

[1]
https://groups.google.com/forum/#!msg/sim1/gLlzWeXGFr8/KevXinUXfc8J

Signed-off-by: Andreas Koop <andreas.koop@zf.com>
[shihpo: Rebase on top of v5.3-rc1]
Signed-off-by: ShihPo Hung <shihpo.hung@sifive.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
CC: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2019-07-22 15:31:00 +02:00
..
Kconfig
Makefile
block.c
block.h
bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
bus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
card.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
core.c SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
debugfs.c MMC core: 2019-07-11 18:11:21 -07:00
host.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
host.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mmc.c SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
mmc_ops.c
mmc_ops.h
mmc_test.c mmc: core: no need to check return value of debugfs_create functions 2019-06-17 13:30:49 +02:00
pwrseq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pwrseq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pwrseq_emmc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pwrseq_sd8787.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
pwrseq_simple.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
queue.c mmc: mmc_spi: Enable stable writes 2019-07-22 15:31:00 +02:00
queue.h
quirks.h
regulator.c
sd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sd.h
sd_ops.c
sd_ops.h
sdio.c mmc: sdio: Drop unused in-parameter from mmc_sdio_init_card() 2019-07-10 13:20:17 +02:00
sdio_bus.c
sdio_bus.h
sdio_cis.c
sdio_cis.h
sdio_io.c mmc: core: Add sdio_retune_hold_now() and sdio_retune_release() 2019-06-18 13:30:32 +02:00
sdio_irq.c mmc: sdio: Turn sdio_run_irqs() into static 2019-06-20 15:36:36 +02:00
sdio_ops.c
sdio_ops.h
sdio_uart.c
slot-gpio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
slot-gpio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00