Re: [PATCH] mtd: rawnand: gpmi: Set WAIT_FOR_READY timeout based on program/erase times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2022-07-01 at 13:03 +0200, Sascha Hauer wrote:
> 06781a5026350 Fixes the calculation of the DEVICE_BUSY_TIMEOUT register
> value from busy_timeout_cycles. busy_timeout_cycles is calculated wrong
> though: It is calculated based on the maximum page read time, but the
> timeout is also used for page write and block erase operations which
> require orders of magnitude bigger timeouts.
> 
> Fix this by calculating busy_timeout_cycles from the maximum of
> tBERS_max and tPROG_max.

06781a5026350 was merged in v5.19-rc4 and then was picked up by several
stable kernels, including v5.15.51. After we have upgraded to v5.15.51
we have observed the issue that Sascha mentioned in his email [1].

As the v5.19-rc6 was released yesterday and this fix is still not
applied, the v5.19-rc6 (and all stable kernels that picked up the
backport) causes NAND flash data loss on imx targets.

I have backported this patch to our internal v5.15.51 based kernel on
4th July 2022 and I can confirm that it does indeed solve the NAND data
loss on imx targets.

Is it possible for this patch to make it to the v5.19-rc7?

> Fixes: 06781a5026350 ("mtd: rawnand: gpmi: Fix setting busy timeout setting")
> Fixes: b1206122069aa ("mtd: rawniand: gpmi: use core timings instead of an empirical derivation")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

Tested-by: Tomasz Moń <tomasz.mon@xxxxxxxxxxxxxxx>

[1] https://lore.kernel.org/linux-mtd/20220701091909.GE2387@xxxxxxxxxxxxxx/





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux