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: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Richard Weinberger <richard@nod.at>, Ray Jui <rjui@broadcom.com>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	Scott Branden <sbranden@broadcom.com>,
	"Andrew E . Mileski" <andrewm@isoar.ca>
Subject: Re: [PATCH] mtd: nand: fix shutdown/reboot for multi-chip systems
Date: Mon, 16 Nov 2015 10:52:51 -0800	[thread overview]
Message-ID: <20151116185251.GN8456@google.com> (raw)
In-Reply-To: <1447115848-92621-1-git-send-email-computersforpeace@gmail.com>

On Mon, Nov 09, 2015 at 04:37:28PM -0800, Brian Norris wrote:
> If multiple NAND chips are registered to the same controller, then when
> rebooting the system, the first one will grab the controller lock, while
> the second will wait forever for the first one to release it. i.e., a
> classic deadlock.
> 
> This problem was solved for a similar case (suspend/resume) back in
> commit 6b0d9a841249 ("mtd: nand: fix multi-chip suspend problem"), and
> the shutdown state really isn't much different for us, so rather than
> adding a new special case to nand_get_device(), we can just overload the
> FL_PM_SUSPENDED state.
> 
> Now, multiple chips can "get" the same controller lock (preventing
> further I/O), while we still allow other chips to pass through
> nand_shutdown().
> 
> Original report:
> http://thread.gmane.org/gmane.linux.drivers.mtd/59726
> http://lists.infradead.org/pipermail/linux-mtd/2015-July/059992.html
> 
> Fixes: 72ea403669c7 ("mtd: nand: added nand_shutdown")
> Reported-by: Andrew E. Mileski <andrewm@isoar.ca>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Scott Branden <sbranden@broadcom.com>
> Cc: Andrew E. Mileski <andrewm@isoar.ca>

Pushed to linux-mtd.git

      parent reply	other threads:[~2015-11-16 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  0:37 [PATCH] mtd: nand: fix shutdown/reboot for multi-chip systems Brian Norris
2015-11-13 23:49 ` Scott Branden
2015-11-16 10:09 ` Boris Brezillon
2015-11-16 18:52 ` 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=20151116185251.GN8456@google.com \
    --to=computersforpeace@gmail.com \
    --cc=andrewm@isoar.ca \
    --cc=boris.brezillon@free-electrons.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.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).