[05/12,SRU,B,C,D,OEM-B] mmc: rtsx_usb: Enable MMC_CAP_ERASE to allow erase/discard/trim requests

Message ID 20190111083019.32135-6-acelan.kao@canonical.com
State New
Headers show
Series
  • To reduce the Realtek USB cardreader power consumption
Related show

Commit Message

AceLan Kao Jan. 11, 2019, 8:30 a.m.
From: Ulf Hansson <ulf.hansson@linaro.org>

BugLink: https://bugs.launchpad.net/bugs/1811337

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: MichaƂ Pecio <michal.pecio@gmail.com>
(cherry picked from commit 400fdb25c87431dd23194b5f6ec62ffae1b224ce)
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/mmc/host/rtsx_usb_sdmmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 96ddb3d3f80f..86ac77bd3e9e 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -1324,7 +1324,7 @@  static void rtsx_usb_init_host(struct rtsx_usb_sdmmc *host)
 	mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED |
 		MMC_CAP_MMC_HIGHSPEED | MMC_CAP_BUS_WIDTH_TEST |
 		MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 |
-		MMC_CAP_NEEDS_POLL;
+		MMC_CAP_NEEDS_POLL | MMC_CAP_ERASE;
 	mmc->caps2 = MMC_CAP2_NO_PRESCAN_POWERUP | MMC_CAP2_FULL_PWR_CYCLE |
 		MMC_CAP2_NO_SDIO;