All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tokunori Ikegami <ikegami.t@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: Sasha Levin <sashal@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	stable@vger.kernel.org,
	Joakim Tjernlund <Joakim.Tjernlund@infinera.com>,
	Chris Packham <chris.packham@alliedtelesis.co.nz>,
	linux-mtd@lists.infradead.org, Felix Fietkau <nbd@nbd.name>
Subject: Re: [PATCH for 5.2.y] mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()
Date: Wed, 18 Sep 2019 07:32:39 +0900	[thread overview]
Message-ID: <7c0113e0-d455-e3e6-86fc-45429be196fb@gmail.com> (raw)
In-Reply-To: <20190917181127.GD1570310@kroah.com>


On 2019/09/18 3:11, Greg KH wrote:
> 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@alliedtelesis.co.nz>
>> Cc: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
>> Cc: linux-mtd@lists.infradead.org
>> Cc: stable@vger.kernel.org
>> Reported-by: Fabio Bettoni <fbettoni@gmail.com>
>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>> Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
>> [vigneshr@ti.com: Fix a checkpatch warning]
>> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
>> ---
>>   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 :(

Very sorry for this.
I missed it to fix to not be executable since it was changed to be 
executable on my local environment.
Anyway I will do fix it.

>
> Also, what is the git commit id of this patch in Linus's tree?  I can't
> seem to find it there.

Actually it has not been pulled in Linus's tree.
But it has been merged into 
git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next for 
v5.4-rc1 as the git commit id 37c673ade35c.
So I thought as that it is okay to send the patches for the stable trees.
But should I wait to be pulled the patch in Linus's tree at first?

>
> thanks,
>
> greg k-h

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Tokunori Ikegami <ikegami.t@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: Sasha Levin <sashal@kernel.org>,
	Chris Packham <chris.packham@alliedtelesis.co.nz>,
	Joakim Tjernlund <Joakim.Tjernlund@infinera.com>,
	linux-mtd@lists.infradead.org, stable@vger.kernel.org,
	Felix Fietkau <nbd@nbd.name>, Hauke Mehrtens <hauke@hauke-m.de>,
	Vignesh Raghavendra <vigneshr@ti.com>
Subject: Re: [PATCH for 5.2.y] mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()
Date: Wed, 18 Sep 2019 07:32:39 +0900	[thread overview]
Message-ID: <7c0113e0-d455-e3e6-86fc-45429be196fb@gmail.com> (raw)
In-Reply-To: <20190917181127.GD1570310@kroah.com>


On 2019/09/18 3:11, Greg KH wrote:
> 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@alliedtelesis.co.nz>
>> Cc: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
>> Cc: linux-mtd@lists.infradead.org
>> Cc: stable@vger.kernel.org
>> Reported-by: Fabio Bettoni <fbettoni@gmail.com>
>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>> Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
>> [vigneshr@ti.com: Fix a checkpatch warning]
>> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
>> ---
>>   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 :(

Very sorry for this.
I missed it to fix to not be executable since it was changed to be 
executable on my local environment.
Anyway I will do fix it.

>
> Also, what is the git commit id of this patch in Linus's tree?  I can't
> seem to find it there.

Actually it has not been pulled in Linus's tree.
But it has been merged into 
git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next for 
v5.4-rc1 as the git commit id 37c673ade35c.
So I thought as that it is okay to send the patches for the stable trees.
But should I wait to be pulled the patch in Linus's tree at first?

>
> thanks,
>
> greg k-h

  reply	other threads:[~2019-09-17 22:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 17:50 [PATCH for 5.2.y] mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword() Tokunori Ikegami
2019-09-17 17:50 ` Tokunori Ikegami
2019-09-17 18:11 ` Greg KH
2019-09-17 18:11   ` Greg KH
2019-09-17 22:32   ` Tokunori Ikegami [this message]
2019-09-17 22:32     ` Tokunori Ikegami
2019-09-18  5:52     ` Greg KH
2019-09-18  5:52       ` Greg KH
2019-09-18 13:59       ` Tokunori Ikegami
2019-09-18 13:59         ` Tokunori Ikegami
  -- strict thread matches above, loose matches on Subject: below --
2019-09-23  2:32 Tokunori Ikegami
2019-09-23  2:32 ` Tokunori Ikegami
2019-09-23  7:13 ` Greg KH
2019-09-23  7:13   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c0113e0-d455-e3e6-86fc-45429be196fb@gmail.com \
    --to=ikegami.t@gmail.com \
    --cc=Joakim.Tjernlund@infinera.com \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=greg@kroah.com \
    --cc=hauke@hauke-m.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nbd@nbd.name \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.