On Thu, 2013-05-16 at 10:16 +0800, Huang Shijie wrote:what's about add the "_datasheet" for these two fields?ä 2013å05æ15æ 20:11, Artem Bityutskiy åé:I wonder if it makes sense to name things so that it is clear form theOn Wed, 2013-05-15 at 16:40 +0800, Huang Shijie wrote:The two fields are used to store the ecc info from the datasheet.+ * @ecc_strength: [INTERN] ECC correctability from the datasheet.Here and in other places you talk about "datasheet". Do you assume that
+ * Minimum amount of bit errors per @ecc_step guaranteed to
+ * be correctable. If unknown, set to zero.
+ * @ecc_step: [INTERN] ECC step required by the @ecc_strength,
+ * also from the datasheet. It is the recommended ECC step
+ * size, if known; if unknown, set to zero.
the real ECC strength/step used by NAND chips may be different? Or you
assume it must be the same?
The two fields are just for a reference.
[1] The nand controller may do not use these two fields, it's ok;
For example, the datasheet requires "4bits per 512 bytes".
The nand controller can uses 8bits per 512 bytes.
[2] but sometimes the nand controller must use these two fields.
For example, the datasheet requires "40bits per 1024 bytes".
For the hardware limit, the nand controller(BCH) may supports the
40bits ecc in the maximum.
So the nand controller must use these two fields now.
names whether that is the "theoretical" datasheet values or the real
ones. I would prefer to clearly distinguish between them, in names and
comments. Thoughts?