All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Andy Lutomirski <luto@MIT.EDU>
Cc: Matthew Wilcox <willy@linux.intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [REVIEW] NVM Express driver
Date: Fri, 4 Mar 2011 13:29:44 -0800	[thread overview]
Message-ID: <20110304212944.GC28680@kroah.com> (raw)
In-Reply-To: <4D704DAB.9080100@mit.edu>

On Thu, Mar 03, 2011 at 09:25:47PM -0500, Andy Lutomirski wrote:
> On 03/03/2011 05:22 PM, Greg KH wrote:
> >On Thu, Mar 03, 2011 at 05:07:35PM -0500, Matthew Wilcox wrote:
> >>On Thu, Mar 03, 2011 at 01:51:55PM -0800, Greg KH wrote:
> >>>Heh, no, well, submit_io should just go through the block layer and not
> >>>be a separate ioctl, right?
> >>
> >>Just like with SG_IO, there are reasons to do I/Os without going through
> >>the block layer.
> >
> >Ok, that makes sense.
> >
> >>>>There's a bit of an impedence mismatch there.  Think of this as
> >>>>being drive firmware instead of controller firmware.  This isn't for
> >>>>request_firmware() kind of uses, it's for some admin tool to come along
> >>>>and tell the drive "Oh, here's some new firmware for you".
> >>>
> >>>That's fine, request_firmware will work wonderfully for that.
> >>
> >>How would the driver know that it should call request_firmware()?
> >>Do it every 60 seconds in case somebody's downloaded some new firmware?
> >
> >Ick, no, just use the function provided that lets you create a firmware
> >request and be notified when it is written to,
> >request_firmware_nowait().  That is what it is there for.
> >
> >>>>If you look at the spec [1], you'll see there are a number of firmware
> >>>>slots in the device, and it's up to the managability utility to decide
> >>>>which one to replace or activate.  I dno't think you want to pull all
> >>>>that gnarly decision making code into the kernel, do you?
> >>>>
> >>>>[1] http://download.intel.com/standards/nvmhci/NVM_Express_1_0_Gold.pdf
> >>>
> >>>No, just export multiple "slots" as firmware devices ready to be filled
> >>>in by userspace whenever it wants/needs to.  The management utility can
> >>>just dump the firmware to those sysfs files when it determines it needs
> >>>to update the firmware, no decision making in the kernel at all.
> >>
> >>OK ... glad we decided to limit the number of slots.  I still don't see
> >>(in Documentation/firmware_class/README) how this works for user-initiated
> >>firmware updates rather than kernel-initiated.
> >
> >I didn't even realize we had a firmware README file...
> >
> >Anyway, just use request_firmware_nowait(), you will be fine.
> >
> 
> Unless I'm misunderstanding the spec, this is for *nonvolatile*
> firmware updates.  So if I have two of these devices and I stick a
> firmware file into /lib/firmware, should it update both devices?
> 
> Shouldn't reflashing the device firmware be something that the users
> asks for by something a little more specific than just creating a
> file?  (In any case, creating /lib/firmware/nvmhci-3 to flash slot 3
> seems rather silly.)

Yes, a userspace tool should handle all of this, much like Dell does
this with BIOS updates through this same interface.  See their in-kernel
code, and userspace tools for details on how to do this sanely.

thanks,

greg k-h

  parent reply	other threads:[~2011-03-04 21:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03 20:47 [REVIEW] NVM Express driver Matthew Wilcox
2011-03-03 21:13 ` Greg KH
2011-03-03 21:41   ` Matthew Wilcox
2011-03-03 21:51     ` Greg KH
2011-03-03 22:07       ` Matthew Wilcox
2011-03-03 22:22         ` Greg KH
2011-03-04  2:25           ` Andy Lutomirski
2011-03-04  9:02             ` el es
2011-03-04 21:29             ` Greg KH [this message]
2011-03-04 12:43           ` Alan Cox
2011-03-04 21:28             ` Greg KH
2011-03-04 21:59               ` Alan Cox
2011-03-04 22:10                 ` Greg KH
2011-03-04 22:33                   ` Alan Cox
2011-03-04 23:10                     ` Greg KH
2011-03-05 10:28                       ` Alan Cox
2011-03-04 12:52     ` Mark Brown
2011-03-03 21:33 ` Randy Dunlap
2011-03-04 13:06 ` Christoph Hellwig
2011-03-04 14:46   ` Matthew Wilcox
2011-03-11 22:29 ` Andi Kleen
2011-03-12  5:51   ` Matthew Wilcox
2011-03-13 17:14     ` Andi Kleen
2011-03-13 17:14       ` Andi Kleen
2011-03-13 18:24 ` Arnd Bergmann

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=20110304212944.GC28680@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@MIT.EDU \
    --cc=willy@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.