]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
nfit/ars: Attempt a short-ARS whenever the ARS state is idle at boot
authorDan Williams <dan.j.williams@intel.com>
Wed, 13 Feb 2019 16:58:40 +0000 (08:58 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 25 Mar 2019 15:44:48 +0000 (10:44 -0500)
BugLink: https://bugs.launchpad.net/bugs/1821607
commit c6c5df293bf1b488cf8459aac658aecfdccb13a9 upstream.

If query-ARS reports that ARS has stopped and requires continuation
attempt to retrieve short-ARS results before continuing the long
operation.

Fixes: bc6ba8085842 ("nfit, address-range-scrub: rework and simplify ARS...")
Cc: <stable@vger.kernel.org>
Reported-by: Krzysztof Rusocki <krzysztof.rusocki@intel.com>
Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/acpi/nfit/core.c

index 53f9a7f11032d2e5923883b5ed5a555859586819..31fef86fb568024e3cb39b6cef7403b2eeac7853 100644 (file)
@@ -3021,6 +3021,7 @@ static int ars_register(struct acpi_nfit_desc *acpi_desc,
 
        switch (acpi_nfit_query_poison(acpi_desc)) {
        case 0:
+       case -ENOSPC:
        case -EAGAIN:
                rc = ars_start(acpi_desc, nfit_spa, ARS_REQ_SHORT);
                /* shouldn't happen, try again later */
@@ -3045,7 +3046,6 @@ static int ars_register(struct acpi_nfit_desc *acpi_desc,
                break;
        case -EBUSY:
        case -ENOMEM:
-       case -ENOSPC:
                /*
                 * BIOS was using ARS, wait for it to complete (or
                 * resources to become available) and then perform our