diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2018-11-01 00:30:22 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-21 09:22:04 +0100 |
| commit | 84d1d9cc1c0c61a8b8d254c23e31a91fbbb40698 (patch) | |
| tree | e9f4bd19a4e369e5274ce1ebd8ee4aae33b2909a | |
| parent | 13bb0de8e25c9f2fa846ee92c1f8a736a54423aa (diff) | |
acpi, nfit: Fix ARS overflow continuation
commit 3fa58dcab50a0aa16817f16a8d38aee869eb3fb9 upstream.
When the platform BIOS is unable to report all the media error records
it requires the OS to restart the scrub at a prescribed location. The
driver detects the overflow condition, but then fails to report it to
the ARS state machine after reaping the records. Propagate -ENOSPC
correctly to continue the ARS operation.
Cc: <stable@vger.kernel.org>
Fixes: 1cf03c00e7c1 ("nfit: scrub and register regions in a workqueue")
Reported-by: Jacek Zloch <jacek.zloch@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/acpi/nfit/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index c0db96e8a81a..8eb123d47d54 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -2835,9 +2835,9 @@ static int acpi_nfit_query_poison(struct acpi_nfit_desc *acpi_desc) return rc; if (ars_status_process_records(acpi_desc)) - return -ENOMEM; + dev_err(acpi_desc->dev, "Failed to process ARS records\n"); - return 0; + return rc; } static int ars_register(struct acpi_nfit_desc *acpi_desc, |
