Skip to content

Commit

Permalink
nfit_test: Enable DSMs for all test NFITs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Williams committed Jan 9, 2016
1 parent fc974ee commit d26f73f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/testing/nvdimm/test/nfit.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ static int nfit_test_cmd_ars_status(struct nd_cmd_ars_status *nd_cmd,

nd_cmd->out_length = 256;
nd_cmd->num_records = 0;
nd_cmd->address = 0;
nd_cmd->length = -1ULL;
nd_cmd->status = 0;

return 0;
Expand Down Expand Up @@ -1088,6 +1090,8 @@ static void nfit_test1_setup(struct nfit_test *t)
struct acpi_nfit_memory_map *memdev;
struct acpi_nfit_control_region *dcr;
struct acpi_nfit_system_address *spa;
struct nvdimm_bus_descriptor *nd_desc;
struct acpi_nfit_desc *acpi_desc;

offset = 0;
/* spa0 (flat range with no bdw aliasing) */
Expand Down Expand Up @@ -1135,6 +1139,13 @@ static void nfit_test1_setup(struct nfit_test *t)
dcr->command_size = 0;
dcr->status_offset = 0;
dcr->status_size = 0;

acpi_desc = &t->acpi_desc;
set_bit(ND_CMD_ARS_CAP, &acpi_desc->bus_dsm_force_en);
set_bit(ND_CMD_ARS_START, &acpi_desc->bus_dsm_force_en);
set_bit(ND_CMD_ARS_STATUS, &acpi_desc->bus_dsm_force_en);
nd_desc = &acpi_desc->nd_desc;
nd_desc->ndctl = nfit_test_ctl;
}

static int nfit_test_blk_do_io(struct nd_blk_region *ndbr, resource_size_t dpa,
Expand Down

0 comments on commit d26f73f

Please sign in to comment.