MMC core:
 - Fix hanging on I/O during system suspend for removable cards
 - Set read only for SD cards with permanent write protect bit
 - Power cycle the SD/SDIO card if CMD11 fails for UHS voltage
 - Issue a cache flush for eMMC only when it's enabled
 - Adopt to updated cache ctrl settings for eMMC from MMC ioctls
 - Use use device property API when parsing voltages
 - Don't retry eMMC sanitize cmds
 - Use the timeout from the MMC ioctl for eMMC santize cmds

MMC host:
 - mmc_spi: Make of_mmc_spi.c resource provider agnostic
 - mmc_spi: Use polling for card detect even without voltage-ranges
 - sdhci: Check for reset prior to DMA address unmap
 - sdhci-acpi: Add support for the AMDI0041 eMMC controller variant
 - sdhci-esdhc-imx: Depending on OF Kconfig and cleanup code
 - sdhci-pci: Add PCI IDs for Intel LKF
 - sdhci-pci: Fix initialization of some SD cards for Intel BYT
 - sdhci-pci-gli: Various improvements for GL97xx variants
 - sdhci-of-dwcmshc: Enable support for MMC_CAP_WAIT_WHILE_BUSY
 - sdhci-of-dwcmshc: Add ACPI support for BlueField-3 SoC
 - sdhci-of-dwcmshc: Add Rockchip platform support
 - tmio/renesas_sdhi: Extend support for reset and use a reset controller
 - tmio/renesas_sdhi: Enable support for MMC_CAP_WAIT_WHILE_BUSY
 - tmio/renesas_sdhi: Various improvements

MEMSTICK:
 - Minor improvements/cleanups.
mmc: block: Issue a cache flush only when it's enabled

In command queueing mode, the cache isn't flushed via the mmc_flush_cache()
function, but instead by issuing a CMDQ_TASK_MGMT (CMD48) with a
FLUSH_CACHE opcode. In this path, we need to check if cache has been
enabled, before deciding to flush the cache, along the lines of what's
being done in mmc_flush_cache().

To fix this problem, let's add a new bus ops callback ->cache_enabled() and
implement it for the mmc bus type. In this way, the mmc block device driver
can call it to know whether cache flushing should be done.

Fixes: 1e8e55b67030 (mmc: block: Add CQE support)
Cc: stable@vger.kernel.org
Reported-by: Brendan Peter <bpeter@lytx.com>
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Tested-by: Brendan Peter <bpeter@lytx.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20210425060207.2591-2-avri.altman@wdc.com
Link: https://lore.kernel.org/r/20210425060207.2591-3-avri.altman@wdc.com
[Ulf: Squashed the two patches and made some minor updates]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
4 files changed