All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: linux-nvdimm@lists.01.org
Subject: Re: [PATCH v2 2/4] ndctl: add "all" dimm-id option for update-firmware
Date: Thu, 22 Feb 2018 22:15:53 -0800	[thread overview]
Message-ID: <CAPcyv4hzoC-ndvmaksz8+B6nZZOBSHFNBkBtQxASqhnPuubq5A@mail.gmail.com> (raw)
In-Reply-To: <151933257703.36856.16473005119268194390.stgit@djiang5-desk3.ch.intel.com>

On Thu, Feb 22, 2018 at 12:49 PM, Dave Jiang <dave.jiang@intel.com> wrote:
> Modifying the code so that when "all" option is passed in, we will process
> all the DIMMs on the platform.
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
>  ndctl/update.c |   16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/ndctl/update.c b/ndctl/update.c
> index fc26acf..4fb572d 100644
> --- a/ndctl/update.c
> +++ b/ndctl/update.c
> @@ -471,16 +471,22 @@ static int get_ndctl_dimm(struct update_context *uctx, void *ctx)
>  {
>         struct ndctl_dimm *dimm;
>         struct ndctl_bus *bus;
> +       int rc = -ENODEV;
>
>         ndctl_bus_foreach(ctx, bus)
>                 ndctl_dimm_foreach(bus, dimm) {
>                         if (!util_dimm_filter(dimm, uctx->dimm_id))
>                                 continue;
>                         uctx->dimm = dimm;
> -                       return 0;
> +                       rc = update_firmware(uctx);
> +                       if (rc < 0) {
> +                               error("Update firmware for dimm %s failed\n",
> +                                               ndctl_dimm_get_devname(dimm));
> +                               continue;
> +                       }

This really wants the -b option to available as well, and we would get
that basically for free by moving all of this functionality into
ndctl/dimm.c along with all the other DIMM specific commands. So we
can apply this for now, but update.c really does not deserve to be
standalone command infrastructure away from the existing dimm-specific
utility infrastructure.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2018-02-23  6:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 20:49 [PATCH v2 1/4] ndctl: add more error outs to update firmware and enable verbose debug Dave Jiang
2018-02-22 20:49 ` [PATCH v2 2/4] ndctl: add "all" dimm-id option for update-firmware Dave Jiang
2018-02-23  6:15   ` Dan Williams [this message]
2018-02-22 20:49 ` [PATCH v2 3/4] ndctl: add check for update firmware supported Dave Jiang
2018-02-23  6:28   ` Dan Williams
2018-02-22 20:49 ` [PATCH v2 4/4] ndctl: accept DIMM name without -d option Dave Jiang
2018-02-23  6:41   ` Dan Williams
2018-02-23  6:51 ` [PATCH v2 1/4] ndctl: add more error outs to update firmware and enable verbose debug Dan Williams

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=CAPcyv4hzoC-ndvmaksz8+B6nZZOBSHFNBkBtQxASqhnPuubq5A@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-nvdimm@lists.01.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 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.