|
@@ -2567,7 +2567,12 @@ static void ars_complete(struct acpi_nfit_desc *acpi_desc,
|
|
|
test_bit(ARS_SHORT, &nfit_spa->ars_state)
|
|
|
? "short" : "long");
|
|
|
clear_bit(ARS_SHORT, &nfit_spa->ars_state);
|
|
|
- set_bit(ARS_DONE, &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);
|
|
|
}
|
|
|
|
|
|
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)
|
|
|
if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
|
|
|
continue;
|
|
|
|
|
|
- if (test_and_set_bit(ARS_REQ, &nfit_spa->ars_state))
|
|
|
+ if (test_and_set_bit(ARS_REQ, &nfit_spa->ars_state)) {
|
|
|
busy++;
|
|
|
- else {
|
|
|
+ set_bit(ARS_REQ_REDO, &nfit_spa->ars_state);
|
|
|
+ } else {
|
|
|
if (test_bit(ARS_SHORT, &flags))
|
|
|
set_bit(ARS_SHORT, &nfit_spa->ars_state);
|
|
|
scheduled++;
|