Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1547772

Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED Allocation code.

From Scott Bauer <scott.bauer@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED Allocation code.
Date 2016-12-27 23:30 +0100
Message-ID <sT8pP-805-7@gated-at.bofh.it> (permalink)
References <sQc6B-3He-3@gated-at.bofh.it> <sQc6B-3He-17@gated-at.bofh.it> <sSihz-6sR-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 4/5] nvme: Implement resume_from_suspend and SED Allocation code. Scott Bauer <scott.bauer@intel.com> - 2016-12-19 20:50 +0100
  Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Keith Busch <keith.busch@intel.com> - 2016-12-19 23:00 +0100
    Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Scott Bauer <scott.bauer@intel.com> - 2016-12-19 23:40 +0100
      Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Christoph Hellwig <hch@infradead.org> - 2016-12-20 07:20 +0100
        Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Keith Busch <keith.busch@intel.com> - 2016-12-20 16:40 +0100
          Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Christoph Hellwig <hch@infradead.org> - 2016-12-20 16:50 +0100
            Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Scott Bauer <sbauer@eng.utah.edu> - 2016-12-20 17:40 +0100
              Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Christoph Hellwig <hch@infradead.org> - 2016-12-21 10:10 +0100
            Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Scott Bauer <scott.bauer@intel.com> - 2016-12-20 19:10 +0100
              Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Christoph Hellwig <hch@infradead.org> - 2016-12-21 10:40 +0100
  Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. kbuild test robot <lkp@intel.com> - 2016-12-20 05:20 +0100
  Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Christoph Hellwig <hch@infradead.org> - 2016-12-20 07:30 +0100
  Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Christoph Hellwig <hch@infradead.org> - 2016-12-20 07:50 +0100
  Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Jethro Beekman <kernel@jbeekman.nl> - 2016-12-25 15:50 +0100
    Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Scott Bauer <scott.bauer@intel.com> - 2016-12-27 23:30 +0100
      Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED  Allocation code. Christoph Hellwig <hch@infradead.org> - 2016-12-28 09:50 +0100

csiph-web