Skip to content

Commit d26f73f

Browse files
committed
nfit_test: Enable DSMs for all test NFITs
In preparation for getting a poison list using ARS DSMs, enable DSMs for all manufactured NFITs supplied by the test framework. Also, supply valid response data for ars_status. Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent fc974ee commit d26f73f

File tree

1 file changed

+11
-0
lines changed
  • tools/testing/nvdimm/test

1 file changed

+11
-0
lines changed

tools/testing/nvdimm/test/nfit.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ static int nfit_test_cmd_ars_status(struct nd_cmd_ars_status *nd_cmd,
248248

249249
nd_cmd->out_length = 256;
250250
nd_cmd->num_records = 0;
251+
nd_cmd->address = 0;
252+
nd_cmd->length = -1ULL;
251253
nd_cmd->status = 0;
252254

253255
return 0;
@@ -1088,6 +1090,8 @@ static void nfit_test1_setup(struct nfit_test *t)
10881090
struct acpi_nfit_memory_map *memdev;
10891091
struct acpi_nfit_control_region *dcr;
10901092
struct acpi_nfit_system_address *spa;
1093+
struct nvdimm_bus_descriptor *nd_desc;
1094+
struct acpi_nfit_desc *acpi_desc;
10911095

10921096
offset = 0;
10931097
/* spa0 (flat range with no bdw aliasing) */
@@ -1135,6 +1139,13 @@ static void nfit_test1_setup(struct nfit_test *t)
11351139
dcr->command_size = 0;
11361140
dcr->status_offset = 0;
11371141
dcr->status_size = 0;
1142+
1143+
acpi_desc = &t->acpi_desc;
1144+
set_bit(ND_CMD_ARS_CAP, &acpi_desc->bus_dsm_force_en);
1145+
set_bit(ND_CMD_ARS_START, &acpi_desc->bus_dsm_force_en);
1146+
set_bit(ND_CMD_ARS_STATUS, &acpi_desc->bus_dsm_force_en);
1147+
nd_desc = &acpi_desc->nd_desc;
1148+
nd_desc->ndctl = nfit_test_ctl;
11381149
}
11391150

11401151
static int nfit_test_blk_do_io(struct nd_blk_region *ndbr, resource_size_t dpa,

0 commit comments

Comments
 (0)