Hello, I'm re-sending this as I did not get feedback the first time I sent this patch some time ago. I was trying to use ERASE with mvsdio and it did not have the capability. But the Marvell SDIO host controller does support sending ERASE commands. This is similar to the patch that Sascha Silbe sent a few years ago [1], but this one is based on the latest kernel sources. [1]: https://lkml.org/lkml/2011/3/17/297 The patch stays in the spirit of what have been done in other drivers like dw_mmc or sunxi-mmc, setting MMC_CAP_ERASE before calling mmc_of_parse(). This has been tested successfully with blkdiscard and blkdiscard -s on an eMMC card. Regards --- drivers/mmc/host/mvsdio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 210247b3d11a..0367f826a702 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -748,6 +748,11 @@ static int mvsd_probe(struct platform_device *pdev) mmc->max_seg_size = mmc->max_blk_size * mmc->max_blk_count; mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; + /* + * Support MMC_CAP_ERASE, needed to use trim/discard/erase commands. + */ + mmc->caps |= MMC_CAP_ERASE; + host->base_clock = clk_get_rate(host->clk) / 2; ret = mmc_of_parse(mmc); if (ret < 0) -- 2.17.0 ��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥