Hi Ben, On Thu, 2017-03-23 at 14:46 +0000, Ben Gardiner wrote: > Hi guys, > > I've been away from playing with emmc since roughly when that patch was submitted. My recollection was that enabling reliable write feature changed the nand wear leveling parameters of the flash controller in the emmc. Hence why setting the partition bit is required. But this is a foggy recollection at best > > I will defer to anyone who is actually testing the behaviours or these emmc devices. So I have no objections. > > Best Regards, > Ben Gardiner In the meantime Tomas Melin found this in "Embedded Multi-Media Card (e.MMC) Electrical Standard (5.1)" JESD84-B51. > "...This write must happen as part > of the partitioning process and must occur before the > PARTITION_SETTING_COMPLETED bit is set. > The changes made to the WR_REL_SET register will not have an impact until the > partitioning process is > complete (i.e., after the power cycle has occurred and the partitioning has > completed successfully). Data > reliability settings for partitions that do not exist in the device have no > impact on the device." > > So the setting of WR_REL_SET is connected to the partitioning of the device. And > as long as the partitioning is not set, iirc the PARTITION_SETTING_COMPLETED bit > will not be accepted to be set by the device. However, our eMMC device does not seem to behave that way. I am still investigating, though. And I most definitely do not want to submit something that is only based on the particular behaviour of the device we happen to use. However, the one thing where the current implementation does contradict the standard is that it can only set write reliability for one (eMMC-)partition at a time, which the standard explicitly excludes: "The entire register is considered to be write once so the host has one opportunity to write all of the bits in the register. (Separate writes to change individual bits are not permitted)" This is also the observed behaviour on our eMMC. I did manage to successfully complete the partition setting by doing this (and only this): > mmc enh_area set -y 0 0 /dev/mmcblk1 which doesn't do anything useful, since that is the original setting anyway. After a power cycle all my data was gone (as expected), but I could not observe any other change in behaviour. The various flags were indicating success. I am open to suggestions about how to actually test 'reliable write' in action rather than relying on what the device tells me. Any ideas? Regards, Harald -- i.A. Harald Brinkmann BST eltromat International GmbH Werk Leopoldshöhe Herforder Straße 249-251 D-33818 Leopoldshöhe T: +49 (5208) 987-513 E: harald.brinkmann@xxxxxxxxxxxxxxxxxxxxx W: http://www.bst-eltromat.com _______________________________________________________ Amtsgericht Bielefeld, HRB Nr. 30830 Geschäftsführer Kristian Jünke, Dr. Johann-Carsten Kipp, Dr. Gunter Tautorus Sitz der Gesellschaft: Bielefeld Vertrauliche E-Mail von BST eltromat International GmbH ��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥