]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.31/nfit-ars-attempt-a-short-ars-whenever-the-ars-state-is-idle-at-boot.patch
Linux 4.19.31
[thirdparty/kernel/stable-queue.git] / releases / 4.19.31 / nfit-ars-attempt-a-short-ars-whenever-the-ars-state-is-idle-at-boot.patch
CommitLineData
489cd451
GKH
1From c6c5df293bf1b488cf8459aac658aecfdccb13a9 Mon Sep 17 00:00:00 2001
2From: Dan Williams <dan.j.williams@intel.com>
3Date: Wed, 13 Feb 2019 08:58:40 -0800
4Subject: nfit/ars: Attempt a short-ARS whenever the ARS state is idle at boot
5
6From: Dan Williams <dan.j.williams@intel.com>
7
8commit c6c5df293bf1b488cf8459aac658aecfdccb13a9 upstream.
9
10If query-ARS reports that ARS has stopped and requires continuation
11attempt to retrieve short-ARS results before continuing the long
12operation.
13
14Fixes: bc6ba8085842 ("nfit, address-range-scrub: rework and simplify ARS...")
15Cc: <stable@vger.kernel.org>
16Reported-by: Krzysztof Rusocki <krzysztof.rusocki@intel.com>
17Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
18Signed-off-by: Dan Williams <dan.j.williams@intel.com>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21---
22 drivers/acpi/nfit/core.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25--- a/drivers/acpi/nfit/core.c
26+++ b/drivers/acpi/nfit/core.c
27@@ -2900,6 +2900,7 @@ static int ars_register(struct acpi_nfit
28
29 switch (acpi_nfit_query_poison(acpi_desc)) {
30 case 0:
31+ case -ENOSPC:
32 case -EAGAIN:
33 rc = ars_start(acpi_desc, nfit_spa, ARS_REQ_SHORT);
34 /* shouldn't happen, try again later */
35@@ -2924,7 +2925,6 @@ static int ars_register(struct acpi_nfit
36 break;
37 case -EBUSY:
38 case -ENOMEM:
39- case -ENOSPC:
40 /*
41 * BIOS was using ARS, wait for it to complete (or
42 * resources to become available) and then perform our