Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2b3d284 authored by Robert Jarzmik's avatar Robert Jarzmik Committed by David Woodhouse
Browse files

mtd: docg3 increase write/erase timeout



After several tries with ubifs, it appears empirically that constructor
provided figures for erase/write timeouts are underestimated. A timeout
of 100ms seems to work with a 5 years worn chip, and no timeouts occur
anymore.

Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent a7baef12
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1116,10 +1116,10 @@ static int doc_get_op_status(struct docg3 *docg3)
 */
 */
static int doc_write_erase_wait_status(struct docg3 *docg3)
static int doc_write_erase_wait_status(struct docg3 *docg3)
{
{
	int status, ret = 0;
	int i, status, ret = 0;


	if (!doc_is_ready(docg3))
	for (i = 0; !doc_is_ready(docg3) && i < 5; i++)
		usleep_range(3000, 3000);
		msleep(20);
	if (!doc_is_ready(docg3)) {
	if (!doc_is_ready(docg3)) {
		doc_dbg("Timeout reached and the chip is still not ready\n");
		doc_dbg("Timeout reached and the chip is still not ready\n");
		ret = -EAGAIN;
		ret = -EAGAIN;