Commit cc3d3458 authored by Dave Jiang's avatar Dave Jiang

acpi/nfit: queue issuing of ars when an uc error notification comes in

When the ACPI UC error notifier gets called and ARS_REQ bit is set
with the passed in flag, we can receive -EBUSY if ARS_REQ bit is already
set for the nfit_spa->ars_state. When that happens, the ARS request is
dropped. That can potentially cause us to miss the unreported errors that
the on going ARS request does not receive. Add an ARS_REQ_REDO state that
will request short ARS upon ARS completion to grab any errors we missed.
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Reviewed-by: default avatarVishal Verma <vishal.l.verma@intel.com>
parent 1e687220
...@@ -2567,6 +2567,11 @@ static void ars_complete(struct acpi_nfit_desc *acpi_desc, ...@@ -2567,6 +2567,11 @@ static void ars_complete(struct acpi_nfit_desc *acpi_desc,
test_bit(ARS_SHORT, &nfit_spa->ars_state) test_bit(ARS_SHORT, &nfit_spa->ars_state)
? "short" : "long"); ? "short" : "long");
clear_bit(ARS_SHORT, &nfit_spa->ars_state); clear_bit(ARS_SHORT, &nfit_spa->ars_state);
if (test_and_clear_bit(ARS_REQ_REDO, &nfit_spa->ars_state)) {
set_bit(ARS_SHORT, &nfit_spa->ars_state);
set_bit(ARS_REQ, &nfit_spa->ars_state);
dev_dbg(dev, "ARS: processing scrub request received while in progress\n");
} else
set_bit(ARS_DONE, &nfit_spa->ars_state); set_bit(ARS_DONE, &nfit_spa->ars_state);
} }
...@@ -3242,9 +3247,10 @@ int acpi_nfit_ars_rescan(struct acpi_nfit_desc *acpi_desc, unsigned long flags) ...@@ -3242,9 +3247,10 @@ int acpi_nfit_ars_rescan(struct acpi_nfit_desc *acpi_desc, unsigned long flags)
if (test_bit(ARS_FAILED, &nfit_spa->ars_state)) if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
continue; continue;
if (test_and_set_bit(ARS_REQ, &nfit_spa->ars_state)) if (test_and_set_bit(ARS_REQ, &nfit_spa->ars_state)) {
busy++; busy++;
else { set_bit(ARS_REQ_REDO, &nfit_spa->ars_state);
} else {
if (test_bit(ARS_SHORT, &flags)) if (test_bit(ARS_SHORT, &flags))
set_bit(ARS_SHORT, &nfit_spa->ars_state); set_bit(ARS_SHORT, &nfit_spa->ars_state);
scheduled++; scheduled++;
......
...@@ -119,6 +119,7 @@ enum nfit_dimm_notifiers { ...@@ -119,6 +119,7 @@ enum nfit_dimm_notifiers {
enum nfit_ars_state { enum nfit_ars_state {
ARS_REQ, ARS_REQ,
ARS_REQ_REDO,
ARS_DONE, ARS_DONE,
ARS_SHORT, ARS_SHORT,
ARS_FAILED, ARS_FAILED,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment