[PATCH] mtd: cfi_cmdset_0002: Change erase functions to retry for error

IKEGAMI Tokunori ikegami at allied-telesis.co.jp
Tue May 8 07:15:42 PDT 2018


Hi Boris-san,

Thank you so much for your review comments.

> > For the word write functions it is retried for error.
> > But it is not implemented to retry for the erase functions.
> > To make sure for the erase functions change to retry as same.
> 
> Can you give a bit more context, like why this is needed, where did
> you see the problem (which chip/controller), ...

  Okay I will do update the commit message to add more context.

> > -#define MAX_WORD_RETRIES 3
> > +#define MAX_WRITE_RETRIES 3
> 
> Not sure why you rename this macro, but if it's needed can you do that
> in a separate patch?

  The reason is just to share the definition for both the word write and erase functions.
  Okay I will consider to do this in a separate patch.

> > -		pr_debug("Using buffer write method\n" );
> > +		pr_debug("Using buffer write method\n");
> 
> Same for coding style issues, they should be fixed in a separate commit.

  Okay I will do that.

> > +		if (++retry_cnt <= MAX_WRITE_RETRIES)
> > +			goto retry;
> 
> Shouldn't we have a MAX_ERASE_RETRY for that?

  It is okay also and I also thought this at first.
  But the similar definitions are defined so I thought that it is better to be shared as MAX_WRITE_RETRIES.

> Also, what makes you think the following erase operations will work?

  I think that it is possible to be recovered by the retry and it is same for the word write operations.

Regards,
Ikegami




More information about the linux-mtd mailing list