nfit/ars: Introduce scrub_flags

In preparation for introducing new flags to gate whether ARS results are
stale, or poll the completion state, convert the existing flags to an
unsigned long with enumerated values. This conversion allows the flags
to be atomically updated outside of ->init_mutex.

Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Dan Williams
2019-02-13 09:57:22 -08:00
والد 317a992ab9
کامیت e34b8252a3
2فایلهای تغییر یافته به همراه23 افزوده شده و 15 حذف شده

مشاهده پرونده

@@ -210,6 +210,11 @@ struct nfit_mem {
int family;
};
enum scrub_flags {
ARS_BUSY,
ARS_CANCEL,
};
struct acpi_nfit_desc {
struct nvdimm_bus_descriptor nd_desc;
struct acpi_table_header acpi_header;
@@ -231,8 +236,7 @@ struct acpi_nfit_desc {
unsigned int max_ars;
unsigned int scrub_count;
unsigned int scrub_mode;
unsigned int scrub_busy:1;
unsigned int cancel:1;
unsigned long scrub_flags;
unsigned long dimm_cmd_force_en;
unsigned long bus_cmd_force_en;
unsigned long bus_nfit_cmd_force_en;