linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Bauer <scott.bauer@intel.com>
To: Jethro Beekman <kernel@jbeekman.nl>
Cc: linux-nvme@lists.infradead.org, Rafael.Antognolli@intel.com,
	axboe@fb.com, keith.busch@intel.com, jonathan.derrick@intel.com,
	viro@zeniv.linux.org.uk, hch@infradead.org,
	linux-kernel@vger.kernel.org, sagi@grimberg.me
Subject: Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED Allocation code.
Date: Tue, 27 Dec 2016 15:12:22 -0700	[thread overview]
Message-ID: <20161227221221.GA2902@sbauer-Z170X-UD5> (raw)
In-Reply-To: <3d8b8516-aac6-c11c-dbbb-47fc01308f8c@jbeekman.nl>

On Sun, Dec 25, 2016 at 03:15:52PM +0100, Jethro Beekman wrote:
> On 19-12-16 20:35, Scott Bauer wrote:
> > @@ -1796,6 +1797,13 @@ static void nvme_reset_work(struct work_struct *work)
> >  	if (result)
> >  		goto out;
> >  
> > +	result = nvme_opal_initialize(&dev->ctrl);
> > +	if (result)
> > +		goto out;
> 
> It seems you always try to intialize OPAL even if the drive doesn't support it.
> I think you should check if the device supports security commands and then see
> if it supports OPAL before calling this. See e.g.
> https://lkml.org/lkml/2016/6/19/139 . Ideally, this code would check all
> supported protocols and initialize the appropriate security device based on that.

The nvme_opal_initalize should probably be changed to nvme_opal_allocate or something.
It's not really initalizing anything other than allocting the necessary structures
for OPAL. In order to determine if the controller supports opal we need to allocate
the previously mentioned structures anyway. I want to stay away from making payloads
(specifically discovery0 ) payload in the nvme driver and allow the opal core to do a
all the grunt work. In the future we'll probably have to refactor the core a bit to do
just packet generation. It looks like at least for NVMe we're going to have to do a discovery
to figure out whether we've got mutiple locking ranges per NS or just one global lr during
initialization.

  reply	other threads:[~2016-12-27 22:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 19:35 [PATCH v3 0/5] SED OPAL Library Scott Bauer
2016-12-19 19:35 ` [PATCH v3 1/5] include: Add definitions for sed Scott Bauer
2016-12-20  6:46   ` Christoph Hellwig
2016-12-25 14:15   ` Jethro Beekman
2016-12-27 22:14     ` Scott Bauer
2016-12-19 19:35 ` [PATCH v3 2/5] lib: Add Sed-opal library Scott Bauer
2016-12-19 21:34   ` Keith Busch
2016-12-20  6:07     ` Christoph Hellwig
2016-12-20  3:21   ` kbuild test robot
2016-12-20  3:48   ` kbuild test robot
2016-12-20  6:50   ` Al Viro
2016-12-20  7:28   ` Christoph Hellwig
2016-12-20 21:55     ` Scott Bauer
2016-12-21  9:42       ` Christoph Hellwig
2016-12-20 22:07     ` Jon Derrick
2016-12-21  9:47       ` Christoph Hellwig
2016-12-19 19:35 ` [PATCH v3 3/5] fs: Wire up SED/Opal to ioctl Scott Bauer
2016-12-20  6:21   ` Christoph Hellwig
2016-12-19 19:35 ` [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED Allocation code Scott Bauer
2016-12-19 21:59   ` Keith Busch
2016-12-19 22:23     ` Scott Bauer
2016-12-20  6:17       ` Christoph Hellwig
2016-12-20 15:49         ` Keith Busch
2016-12-20 15:46           ` Christoph Hellwig
2016-12-20 16:05             ` Scott Bauer
2016-12-21  9:01               ` Christoph Hellwig
2016-12-20 17:52             ` Scott Bauer
2016-12-21  9:37               ` Christoph Hellwig
2016-12-20  4:11   ` kbuild test robot
2016-12-20  6:21   ` Christoph Hellwig
2016-12-20  6:49   ` Christoph Hellwig
2016-12-25 14:15   ` Jethro Beekman
2016-12-27 22:12     ` Scott Bauer [this message]
2016-12-28  8:39       ` Christoph Hellwig
2016-12-19 19:35 ` [PATCH v3 5/5] Maintainers: Add Information for SED Opal library Scott Bauer

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=20161227221221.GA2902@sbauer-Z170X-UD5 \
    --to=scott.bauer@intel.com \
    --cc=Rafael.Antognolli@intel.com \
    --cc=axboe@fb.com \
    --cc=hch@infradead.org \
    --cc=jonathan.derrick@intel.com \
    --cc=keith.busch@intel.com \
    --cc=kernel@jbeekman.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=viro@zeniv.linux.org.uk \
    /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).