On Wed, Sep 18, 2019 at 02:50:48AM +0900, Tokunori Ikegami wrote: > As reported by the OpenWRT team, write requests sometimes fail on some > platforms. > Currently to check the state chip_ready() is used correctly as described by > the flash memory S29GL256P11TFI01 datasheet. > Also chip_good() is used to check if the write is succeeded and it was > implemented by the commit fb4a90bfcd6d8 ("[MTD] CFI-0002 - Improve error > checking"). > But actually the write failure is caused on some platforms and also it can > be fixed by using chip_good() to check the state and retry instead. > Also it seems that it is caused after repeated about 1,000 times to retry > the write one word with the reset command. > By using chip_good() to check the state to be done it can be reduced the > retry with reset. > It is depended on the actual flash chip behavior so the root cause is > unknown. > > Cc: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx> > Cc: Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx> > Cc: linux-mtd@xxxxxxxxxxxxxxxxxxx > Cc: stable@xxxxxxxxxxxxxxx > Reported-by: Fabio Bettoni <fbettoni@xxxxxxxxx> > Signed-off-by: Felix Fietkau <nbd@xxxxxxxx> > Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> > Signed-off-by: Tokunori Ikegami <ikegami.t@xxxxxxxxx> > [vigneshr@xxxxxx: Fix a checkpatch warning] > Signed-off-by: Vignesh Raghavendra <vigneshr@xxxxxx> > --- > drivers/mtd/chips/cfi_cmdset_0002.c | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > mode change 100644 => 100755 drivers/mtd/chips/cfi_cmdset_0002.c You changed the file to be executable??? That's not ok :( Also, what is the git commit id of this patch in Linus's tree? I can't seem to find it there. thanks, greg k-h ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/