linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Giorgio <giorgio.nicole@arcor.de>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Subject: Re: [PATCH] mtd: spi-nor: fix wrong "fully unlocked" test
Date: Sat, 9 Jul 2016 19:30:33 -0700	[thread overview]
Message-ID: <20160710023033.GA9684@localhost> (raw)
In-Reply-To: <1466789894-17535-1-git-send-email-computersforpeace@gmail.com>

On Fri, Jun 24, 2016 at 10:38:14AM -0700, Brian Norris wrote:
> In stm_unlock(), the test to determine whether we've fully unlocked the
> flash checks for the lock length to be equal to the flash size. That is
> a typo/think-o -- the condition actually means the flash is completely
> *locked.* We should be using the inverse condition -- that the lock
> length is 0 (i.e., no protection).
> 
> The result of this bug is that we never actually turn off the Status
> Register Write Disable bit, even if the flash is completely unlocked.
> Now we can.
> 
> Fixes: 47b8edbf0d43 ("mtd: spi-nor: disallow further writes to SR if WP# is low")
> Reported-by: Giorgio <giorgio.nicole@arcor.de>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

Applied to l2-mtd.git

      reply	other threads:[~2016-07-10  2:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-24 17:38 [PATCH] mtd: spi-nor: fix wrong "fully unlocked" test Brian Norris
2016-07-10  2:30 ` Brian Norris [this message]

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=20160710023033.GA9684@localhost \
    --to=computersforpeace@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=giorgio.nicole@arcor.de \
    --cc=linux-mtd@lists.infradead.org \
    /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).