linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux MM <linux-mm@kvack.org>,
	Haozhong Zhang <haozhong.zhang@intel.com>,
	Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Vishal Verma <vishal.l.verma@intel.com>
Subject: Re: [PATCH] nfit: Continue init even if ARS commands are unimplemented
Date: Fri, 4 Mar 2016 16:48:16 -0800	[thread overview]
Message-ID: <CAPcyv4gjxk3XYd3=kHgAqHGnsE2yWU4K=YWxkHC7_ORpHfKUPw@mail.gmail.com> (raw)
In-Reply-To: <20160305004624.12825.93210.stgit@dwillia2-desk3.jf.intel.com>

Andrew, sorry, ignore this, I fumble fingered a ^R in bash and sent
this.  I'm going to include this in a pull request to Linus.

On Fri, Mar 4, 2016 at 4:46 PM, Dan Williams <dan.j.williams@intel.com> wrote:
> From: Vishal Verma <vishal.l.verma@intel.com>
>
> If firmware doesn't implement any of the ARS commands, take that to
> mean that ARS is unsupported, and continue to initialize regions without
> bad block lists. We cannot make the assumption that ARS commands will be
> unconditionally supported on all NVDIMMs.
>
> Reported-by: Haozhong Zhang <haozhong.zhang@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> Acked-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
> Tested-by: Haozhong Zhang <haozhong.zhang@intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  drivers/acpi/nfit.c |   15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> index fb53db187854..35947ac87644 100644
> --- a/drivers/acpi/nfit.c
> +++ b/drivers/acpi/nfit.c
> @@ -1590,14 +1590,21 @@ static int acpi_nfit_find_poison(struct acpi_nfit_desc *acpi_desc,
>         start = ndr_desc->res->start;
>         len = ndr_desc->res->end - ndr_desc->res->start + 1;
>
> +       /*
> +        * If ARS is unimplemented, unsupported, or if the 'Persistent Memory
> +        * Scrub' flag in extended status is not set, skip this but continue
> +        * initialization
> +        */
>         rc = ars_get_cap(nd_desc, ars_cap, start, len);
> +       if (rc == -ENOTTY) {
> +               dev_dbg(acpi_desc->dev,
> +                       "Address Range Scrub is not implemented, won't create an error list\n");
> +               rc = 0;
> +               goto out;
> +       }
>         if (rc)
>                 goto out;
>
> -       /*
> -        * If ARS is unsupported, or if the 'Persistent Memory Scrub' flag in
> -        * extended status is not set, skip this but continue initialization
> -        */
>         if ((ars_cap->status & 0xffff) ||
>                 !(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) {
>                 dev_warn(acpi_desc->dev,
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2016-03-05  0:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05  0:46 Dan Williams
2016-03-05  0:48 ` Dan Williams [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='CAPcyv4gjxk3XYd3=kHgAqHGnsE2yWU4K=YWxkHC7_ORpHfKUPw@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=haozhong.zhang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vishal.l.verma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox