diff mbox

acpi_nfit_query_poison() broken on non-ARS systems

Message ID CAPcyv4g6431bUPLq3RpmoukHDeR3-n93FE=p85yhrC+gskYdjw@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Williams May 2, 2016, 12:33 a.m. UTC
On Sun, May 1, 2016 at 12:44 PM, Linda Knippers <linda.knippers@hpe.com> wrote:
>
>
> On 5/1/2016 1:42 PM, Linda Knippers wrote:
> <snip>
>>>
>>> Can you add some debug tracing to xlat_status()?  Something is not lining up.
>
> I put a printk at the top of xlat_status() as well as in each case statement.
>>
>> xlat_status() is not called from acpi_nfit_query_poison(), which is called at
>> boot time.  Not sure if we're getting there from acpi_nfit_scrub() or
>> acpi_nfit_async_scrub().
>
> Ok, it actually is being called, but only for the start command.  See attached.
>
> BTW, this is with your rewrite of Jerry's patches but I saw the same
> behavior before I applied them as that's what the previous dmesg output
> was from.
>
> One thing you'll notice in this new dmesg output is that unlike before,
> the acpi_nfit_ctl() function prints the DSM number, not the DSM name,
> when displaying the input. It prints the DSM name when displaying the
> output.
>

Found it.  This is one of those brown-paper-bag bugs that tells me I
need to figure out a way to unit/regression test the interface between
acpi_nfit_ctl() and acpi_evalaute_dsm().  In this case I injected a
__wrap_acpi_evaulate_dsm(), but I can't ship it as a new test in
nfit_test because it relies on an enabled BIOS for all the other
cases.

        ACPI_FREE(out_obj);

Comments

Linda Knippers May 2, 2016, 3:05 p.m. UTC | #1
On 5/1/2016 8:33 PM, Dan Williams wrote:

> Found it.  This is one of those brown-paper-bag bugs that tells me I
> need to figure out a way to unit/regression test the interface between
> acpi_nfit_ctl() and acpi_evalaute_dsm().  In this case I injected a
> __wrap_acpi_evaulate_dsm(), but I can't ship it as a new test in
> nfit_test because it relies on an enabled BIOS for all the other
> cases.

Thanks.  I'll give it a try.

-- ljk
> 
> diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> index d0f35e63640b..24ef312fdba3 100644
> --- a/drivers/acpi/nfit.c
> +++ b/drivers/acpi/nfit.c
> @@ -287,8 +288,11 @@ static int acpi_nfit_ctl(struct
> nvdimm_bus_descriptor *nd_desc,
>                                         offset);
>                         rc = -ENXIO;
>                 }
> -       } else
> +       } else {
>                 rc = 0;
> +               if (cmd_rc)
> +                       *cmd_rc = xlat_status(buf, cmd);
> +       }
> 
>   out:
>         ACPI_FREE(out_obj);
>
diff mbox

Patch

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index d0f35e63640b..24ef312fdba3 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -287,8 +288,11 @@  static int acpi_nfit_ctl(struct
nvdimm_bus_descriptor *nd_desc,
                                        offset);
                        rc = -ENXIO;
                }
-       } else
+       } else {
                rc = 0;
+               if (cmd_rc)
+                       *cmd_rc = xlat_status(buf, cmd);
+       }

  out: