Skip to contentSkip to conversation

emmc trim issue with Freescale's eSDHC controller

DISCUSSION Jerry Duan 1 participant 1 message Oct 28, 2014 MMC, SD and SDIO

lore
Share & tools
lore

Jerry Duan

author
#0 lore raw

Hi,

After searching a lot for my emmc/trim issue, I ran into this great mailing list, which is exactly what I am looking for.

In my system, when I test the trim feature, I always got the following:
$fstrim /mnt/mymmc/
fstrim: /mnt/mymmc/: FITRIM ioctl failed: Operation not supported $cat /sys/class/block/mmcblk0/queue/discard_max_bytes
0

the mmc_calc_max_discard() prints out:
mmc0: calculated max. discard sectors 0 for timeout 402 ms.

My system information:
1.P5040,eSDHC controller,
2.a Micron eMMC chip , EXT_CSD_TRIM_MULT is 15,
3. SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, host->max_clk is 333333332MHz

the following thread
(https://www.mail-archive.com/linux-mmc%40vger.kernel.org/msg26133.html) has a very similar issue, but I don't know how and where I can get a patch.

Thanks in advance,
Jerry