nfit/ars: Attempt short-ARS even in the no_init_ars case
authorDan Williams <dan.j.williams@intel.com>
Wed, 13 Feb 2019 17:01:13 +0000 (09:01 -0800)
committerDan Williams <dan.j.williams@intel.com>
Wed, 20 Feb 2019 22:18:59 +0000 (14:18 -0800)
The no_init_ars option is meant to prevent long-ARS, but short-ARS
should be allowed to grab any immediate results.

Fixes: bc6ba8085842 ("nfit, address-range-scrub: rework and simplify ARS...")
Cc: <stable@vger.kernel.org>
Reported-by: Erwin Tsaur <erwin.tsaur@oracle.com>
Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit/core.c

index 3d681a92ff7f52fd7ff9b4ea548f7db1a76dd9f7..934be96dc1491dba81b2aee60dee93fa816d0497 100644 (file)
@@ -3004,11 +3004,12 @@ static int ars_register(struct acpi_nfit_desc *acpi_desc,
 {
        int rc;
 
-       if (no_init_ars || test_bit(ARS_FAILED, &nfit_spa->ars_state))
+       if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
                return acpi_nfit_register_region(acpi_desc, nfit_spa);
 
        set_bit(ARS_REQ_SHORT, &nfit_spa->ars_state);
-       set_bit(ARS_REQ_LONG, &nfit_spa->ars_state);
+       if (!no_init_ars)
+               set_bit(ARS_REQ_LONG, &nfit_spa->ars_state);
 
        switch (acpi_nfit_query_poison(acpi_desc)) {
        case 0: