[PATCH v2 2/2] mtd: cfi_cmdset_0002: fix delayed error detection on HyperFlash

Tokunori Ikegami ikegami.t at gmail.com
Tue Nov 12 08:46:57 PST 2019


Hi,

Looks good.
Reviewed-by: Tokunori Ikegami <ikegami.t at gmail.com>

Regards,
Ikegami

On 2019/11/01 5:39, Sergei Shtylyov wrote:
> The commit 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling
> status register") added checking for the status register error bits into
> chip_good() to only return 1 if these bits are 0s.  Unfortunately, this
> means that polling using chip_good() always reaches a timeout condition
> when erase or program failure bits are set. Let's fully delegate the task
> of determining the error conditions to cfi_check_err_status() and make
> chip_good() only look for the Device Ready/Busy condition.
>
> Fixes: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register")
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov at cogentembedded.com>
>
> ---
> Changes in version 2:
> - added extra check for error bits in cfi_check_err_status();
> - reverted from pr_warn() to pr_err() call in do_write_buffer();
> - reworded the patch description.
>
>   drivers/mtd/chips/cfi_cmdset_0002.c |   58 ++++++++++++++++++++----------------
>   1 file changed, 33 insertions(+), 25 deletions(-)



More information about the linux-mtd mailing list