linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <linux-mtd@lists.infradead.org>
Cc: js07.lee@samsung.com, john.garry@huawei.com, vigneshr@ti.com,
	chenxiang66@hisilicon.com
Subject: Re: [RESEND PATCH 1/2] mtd: spi-nor: Clear WEL bit when erase or program errors occur
Date: Mon, 23 Mar 2020 17:58:08 +0000	[thread overview]
Message-ID: <6870304.rLyiOig2ma@192.168.0.120> (raw)
In-Reply-To: <3499f977-e176-52b0-63d1-23e1b4d67b7b@huawei.com>

On Monday, March 9, 2020 5:04:53 PM EET John Garry wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> On 09/03/2020 10:15, Tudor.Ambarus@microchip.com wrote:
> > From: Tudor Ambarus <tudor.ambarus@microchip.com>
> > 
> > When an Erase or Program error occurs on a spansion/cypress or a
> > micron flash, the WEL bit remains set to one and should be cleared
> > with a WRDI command in order to protect against inadvertent writes
> > that can possible corrupt the contents of the memory.
> > 
> > Winbond, macronix, gd, etc., do not support the E_ERR and P_ERR bits in
> > the
> > Status Register and always clear the WEL bit regardless of the outcome
> > of the erase or page program operation (ex w25q40bw, MX25L25635E).
> > 
> > Issue a WRDI command when erase or page program errors occur.
> > 
> > Reported-by: John Garry <john.garry@huawei.com>
> 
> Previously I would get this unlock complaint:
> 
> root@ubuntu:/home/john# flash_lock -l /dev/mtd0
> root@ubuntu:/home/john# sudo mtd_debug erase /dev/mtd0 0xf80000 4096
> [  167.458647] spi-nor spi-PRP0001:00: Erase operation failed.
> [  167.464248] spi-nor spi-PRP0001:00: Attempted to modify a protected
> sector.
> MEMERASE: Input/output error
> root@ubuntu:/home/john# flash_lock -u /dev/mtd0
> flash_lock: error!: could not unlock device: /dev/mtd0
> 
>              error 5 (Input/output error)
> 
> Now, no such issue. Thanks
> 
> Tested-by: John Garry <john.garry@huawei.com>
> 
> > Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> > ---
> > 
> >   drivers/mtd/spi-nor/spi-nor.c | 22 ++++++++++++++++++++++
> >   1 file changed, 22 insertions(+)

Rebased and applied on top of spi-nor/next. Thanks.
ta


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

  reply	other threads:[~2020-03-23 17:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 17:28 flash_lock issue for n25q 128mb spi nor part John Garry
2019-12-03  9:45 ` Tudor.Ambarus
2019-12-03 10:31   ` John Garry
2019-12-03 11:07     ` Tudor.Ambarus
2019-12-03 11:44       ` John Garry
2019-12-03 12:05         ` Tudor.Ambarus
2019-12-03 12:27           ` Tudor.Ambarus
2019-12-03 12:35             ` John Garry
2019-12-03 13:57               ` John Garry
2019-12-03 14:44                 ` Tudor.Ambarus
2019-12-03 15:29                   ` John Garry
2019-12-04 11:10                     ` John Garry
2019-12-16 18:09                       ` Tudor.Ambarus
2019-12-17  8:57                         ` Vignesh Raghavendra
2019-12-17 10:09                           ` John Garry
2020-01-09 10:36                           ` John Garry
2020-01-10 11:51                             ` Tudor.Ambarus
2020-01-10 11:56                               ` John Garry
2020-01-15  9:28                                 ` John Garry
2020-03-09 10:15                               ` [RESEND PATCH 1/2] mtd: spi-nor: Clear WEL bit when erase or program errors occur Tudor.Ambarus
2020-03-09 10:15                                 ` [RESEND PATCH 2/2] mtd: spi-nor: Fix description of the sr_ready() return value Tudor.Ambarus
2020-03-09 15:04                                 ` [RESEND PATCH 1/2] mtd: spi-nor: Clear WEL bit when erase or program errors occur John Garry
2020-03-23 17:58                                   ` Tudor.Ambarus [this message]
2019-12-03 14:16               ` [PATCH] mtd: spi-nor: Fix the write Status Register on micron flashes Tudor.Ambarus
2019-12-03 14:50                 ` [PATCH v2] mtd: spi-nor: Fix the writing of the " Tudor.Ambarus
2019-12-04 10:18                   ` John Garry
2020-01-09 19:14                   ` Miquel Raynal

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=6870304.rLyiOig2ma@192.168.0.120 \
    --to=tudor.ambarus@microchip.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=john.garry@huawei.com \
    --cc=js07.lee@samsung.com \
    --cc=linux-mtd@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).