AnsweredAssumed Answered

i.MX6: eMMC hangs at mkfs "discard"

Question asked by Holger Schurig on Sep 29, 2014
Latest reply on Jul 8, 2015 by Holger Schurig



I'm on Linux 3.16.3 on a i.MX6 and have an eMMC card that worked quite well. I had partitioned it and was able to boot from it.


However, the eMMC itself was unconfigured and thus in MLC mode. I then used the mmc utility from to enable "enhanced mode" (pseudo-SLC) mode in the user area. So I looked at the output of "mmc extcsd read /dev/mmcblk0" for MAX_ENH_SIZE_MULT and used that value in "mmc enh_area set -y 0 7651323 /dev/mmcblk0".


This seemed to work. After a power cycle did the originally existing partition /dev/mmcblk0p1 vanish, and the new /dev/mmcblk0 is now half in size. So I thought I'd now have reduced wear-layout.The "fdisk" commmand worked also as expected.


But then "mkfs.ext3 -v -j /dev/mmcblk0p1" hangs at "Discarding device blocks: 4096/196608" stage. The funny thing: if I use "-E nodiscard", then partitioniong works like a charm. But isn't the discard feature something that I should use with flash-based memory?


A discussion from Can't access eMMC when using LTIB rootfs with newer (3.11.4) kernel, why? had a similar discussion (about discard handling), but the posted patches are already part in kernel 3.16.3.