Skip to content

Commit cc3d345

Browse files
committed
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: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
1 parent 1e68722 commit cc3d345

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

drivers/acpi/nfit/core.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2567,7 +2567,12 @@ static void ars_complete(struct acpi_nfit_desc *acpi_desc,
25672567
test_bit(ARS_SHORT, &nfit_spa->ars_state)
25682568
? "short" : "long");
25692569
clear_bit(ARS_SHORT, &nfit_spa->ars_state);
2570-
set_bit(ARS_DONE, &nfit_spa->ars_state);
2570+
if (test_and_clear_bit(ARS_REQ_REDO, &nfit_spa->ars_state)) {
2571+
set_bit(ARS_SHORT, &nfit_spa->ars_state);
2572+
set_bit(ARS_REQ, &nfit_spa->ars_state);
2573+
dev_dbg(dev, "ARS: processing scrub request received while in progress\n");
2574+
} else
2575+
set_bit(ARS_DONE, &nfit_spa->ars_state);
25712576
}
25722577

25732578
static int ars_status_process_records(struct acpi_nfit_desc *acpi_desc)
@@ -3242,9 +3247,10 @@ int acpi_nfit_ars_rescan(struct acpi_nfit_desc *acpi_desc, unsigned long flags)
32423247
if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
32433248
continue;
32443249

3245-
if (test_and_set_bit(ARS_REQ, &nfit_spa->ars_state))
3250+
if (test_and_set_bit(ARS_REQ, &nfit_spa->ars_state)) {
32463251
busy++;
3247-
else {
3252+
set_bit(ARS_REQ_REDO, &nfit_spa->ars_state);
3253+
} else {
32483254
if (test_bit(ARS_SHORT, &flags))
32493255
set_bit(ARS_SHORT, &nfit_spa->ars_state);
32503256
scheduled++;

drivers/acpi/nfit/nfit.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ enum nfit_dimm_notifiers {
119119

120120
enum nfit_ars_state {
121121
ARS_REQ,
122+
ARS_REQ_REDO,
122123
ARS_DONE,
123124
ARS_SHORT,
124125
ARS_FAILED,

0 commit comments

Comments
 (0)