<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/mtd/tests/oobtest.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-01-12T09:24:08Z</updated>
<entry>
<title>mtd: mtd_oobtest: Handle bitflips during reads</title>
<updated>2018-01-12T09:24:08Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@free-electrons.com</email>
</author>
<published>2018-01-11T20:39:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=12663b442e5ac5aa3d6097cd3f287c71ba46d26e'/>
<id>urn:sha1:12663b442e5ac5aa3d6097cd3f287c71ba46d26e</id>
<content type='text'>
Reads from NAND devices usually trigger bitflips, this is an expected
behavior. While bitflips are under a given threshold, the MTD core
returns 0. However, when the number of corrected bitflips is above this
same threshold, -EUCLEAN is returned to inform the upper layer that this
block is slightly dying and soon the ECC engine will be overtaken so
actions should be taken to move the data out of it.

This particular condition should not be treated like an error and the
test should continue.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@free-electrons.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>mtd: kill the ecclayout-&gt;oobavail field</title>
<updated>2016-03-08T00:23:09Z</updated>
<author>
<name>Boris BREZILLON</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2016-03-07T09:46:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f5b8aa78ef086248145363bf1ffe5ca4348b6a98'/>
<id>urn:sha1:f5b8aa78ef086248145363bf1ffe5ca4348b6a98</id>
<content type='text'>
ecclayout-&gt;oobavail is just redundant with the mtd-&gt;oobavail field.
Moreover, it prevents static const definition of ecc layouts since the
NAND framework is calculating this value based on the ecclayout-&gt;oobfree
field.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: mtd_oobtest: Fix the address offset with vary_offset case</title>
<updated>2015-08-27T23:30:01Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2015-07-08T11:50:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=718e38b4d96085b4dab08d3d32e5e033aa1ba6e9'/>
<id>urn:sha1:718e38b4d96085b4dab08d3d32e5e033aa1ba6e9</id>
<content type='text'>
When vary_offset is set (e.g. test case 3), the offset is not always
zero so memcmpshow() will show the wrong offset in the print message.
To fix this we introduce a new function memcmpshowoffset() which takes
offset as a parameter and displays the right offset and use it in
the case where offset is non zero.

The old memcmpshow() functionality is preserved by converting it into
a macro with offset preset to 0.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: Make MTD tests cancelable</title>
<updated>2015-04-06T01:12:53Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2015-03-29T19:52:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2a6a28e7922c07c116ba8f2aa3682c03ef8be678'/>
<id>urn:sha1:2a6a28e7922c07c116ba8f2aa3682c03ef8be678</id>
<content type='text'>
I always go nuts when I start an MTD test on a slow device and have to
wait forever until it finishes. From the debug output I already know
what the issue is but I have to wait or reset the board hard. Resetting
is often not an option (remote access, you don't want lose the current
state, etc...).

The solution is easy, check for pending signals at key positions in the
code. Using that one can even stop a test by pressing CTRL-C as
insmod/modprobe have SIGINT pending.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: mtd_oobtest: Fix bitflip_limit usage in test case 3</title>
<updated>2015-04-06T01:10:23Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2014-12-05T15:18:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d2b51c808745ca93c020ba34a3cf256ad52adc63'/>
<id>urn:sha1:d2b51c808745ca93c020ba34a3cf256ad52adc63</id>
<content type='text'>
In test case 3, we set vary_offset to write at different
offsets and lengths in the OOB available area. We need to
do the bitflip_limit check while checking for 0xff outside the
OOB offset + length area that we didn't modify during write.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
[Brian: whitespace fixup]
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: tests: fix more potential integer overflows</title>
<updated>2015-03-11T22:21:47Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-02-28T10:02:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b9da8bae416efda5ad61c7c92edbb30de15ff7ee'/>
<id>urn:sha1:b9da8bae416efda5ad61c7c92edbb30de15ff7ee</id>
<content type='text'>
Caught by Coverity (CID #200625 and others)

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: oobtest: correct printf() format specifier for 'size_t'</title>
<updated>2014-11-20T09:26:51Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2014-11-20T09:26:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=806b6ef5676a1c6ea78592174aae15f59bb0a923'/>
<id>urn:sha1:806b6ef5676a1c6ea78592174aae15f59bb0a923</id>
<content type='text'>
Fixes warning:

   drivers/mtd/tests/oobtest.c: In function 'memcmpshow':
   drivers/mtd/tests/oobtest.c:129: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t'

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Roger Quadros &lt;rogerq@ti.com&gt;
Cc: Sekhar Nori &lt;nsekhar@ti.com&gt;
</content>
</entry>
<entry>
<title>mtd: mtd_oobtest: add bitflip_limit parameter</title>
<updated>2014-11-20T07:25:49Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2014-10-21T13:53:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=afc0ea1b8e1e27b2cb77e7023d917f3aa5971d17'/>
<id>urn:sha1:afc0ea1b8e1e27b2cb77e7023d917f3aa5971d17</id>
<content type='text'>
It is common for NAND devices to have bitflip errors.
Add a bitflip_limit parameter to specify how many bitflips per
page we can tolerate without flagging an error.
By default zero bitflips are tolerated.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: mtd_oobtest: Show the verification error location and data</title>
<updated>2014-11-20T07:25:06Z</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2014-10-21T13:53:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5a66088bffd9a5251e96ca5d0d46456ab9196287'/>
<id>urn:sha1:5a66088bffd9a5251e96ca5d0d46456ab9196287</id>
<content type='text'>
Add a function memcmpshow() that compares the 2 data buffers
and shows the address:offset and data bytes on comparison failure.
This function  does not break at a comparison failure but runs the
check for the whole data buffer.

Use memcmpshow() instead of memcmp() for all the verification paths.

Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: tests: fix integer overflow issues</title>
<updated>2014-08-19T18:53:08Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2014-07-22T02:07:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1001ff7a4f64f3f4264e69d3ed70ff428f627e01'/>
<id>urn:sha1:1001ff7a4f64f3f4264e69d3ed70ff428f627e01</id>
<content type='text'>
These multiplications are done with 32-bit arithmetic, then converted to
64-bit. We should widen the integers first to prevent overflow. This
could be a problem for large (&gt;4GB) MTD's.

Detected by Coverity.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
</content>
</entry>
</feed>
