All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH] nfit: Fix extended status translations for ACPI DSMs
Date: Mon, 5 Dec 2016 21:43:05 +0000	[thread overview]
Message-ID: <1480974124.2586.0.camel@intel.com> (raw)
In-Reply-To: <CAPcyv4hMB3GnphdfRqmoda6ZuxtPvPZM65ksM6tHc-WVBkwDSw@mail.gmail.com>

On Mon, 2016-12-05 at 13:37 -0800, Dan Williams wrote:
> On Mon, Dec 5, 2016 at 1:27 PM, Vishal Verma <vishal.l.verma@intel.com
> > wrote:
> > 
> > ACPI DSMs can have an 'extended' status which can be non-zero to
> > convey
> > additional information about the command. In the xlat_status
> > routine,
> > where we translate the command statuses, we were returning an error
> > for
> > a non-zero extended status, even if the primary status indicated
> > success.
> > 
> > Cc: Dan Williams <dan.j.williams@intel.com>
> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> > ---
> >  drivers/acpi/nfit/core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> > index 71a7d07..d14f09b 100644
> > --- a/drivers/acpi/nfit/core.c
> > +++ b/drivers/acpi/nfit/core.c
> > @@ -169,7 +169,7 @@ static int xlat_status(void *buf, unsigned int
> > cmd, u32 status)
> >         }
> > 
> >         /* all other non-zero status results in an error */
> > -       if (status)
> > +       if (status & 0xffff)
> >                 return -EIO;
> 
> I don't think this is right, because we have no idea at this point
> whether extended status is fatal or not.
> 
> Each 'case' statement in that 'switch' should be returning 0 if it
> does not see any errors. Because that's the only part of the function
> with per-command knowledge of extended being benign / informational vs
> fatal.

Good point - I was wondering just that.. I'll resend.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2016-12-05 21:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 21:27 [PATCH] nfit: Fix extended status translations for ACPI DSMs Vishal Verma
2016-12-05 21:37 ` Dan Williams
2016-12-05 21:43   ` Verma, Vishal L [this message]
2016-12-05 21:54     ` Linda Knippers
2016-12-05 22:16       ` Dan Williams
2016-12-05 22:26         ` Linda Knippers

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=1480974124.2586.0.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=dan.j.williams@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.