Skip to content

Commit 351f339

Browse files
committed
acpi/nfit: Always dump _DSM output payload
The dynamic-debug statements for command payload output only get emitted when the command is not ND_CMD_CALL. Move the output payload dumping ahead of the early return path for ND_CMD_CALL. Fixes: 31eca76 ("...whitelisted dimm command marshaling mechanism") Reported-by: Vishal Verma <[email protected]> Signed-off-by: Dan Williams <[email protected]>
1 parent 9e98c67 commit 351f339

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/acpi/nfit/core.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,12 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
567567
goto out;
568568
}
569569

570+
dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
571+
cmd_name, out_obj->buffer.length);
572+
print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
573+
out_obj->buffer.pointer,
574+
min_t(u32, 128, out_obj->buffer.length), true);
575+
570576
if (call_pkg) {
571577
call_pkg->nd_fw_size = out_obj->buffer.length;
572578
memcpy(call_pkg->nd_payload + call_pkg->nd_size_in,
@@ -585,12 +591,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
585591
return 0;
586592
}
587593

588-
dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
589-
cmd_name, out_obj->buffer.length);
590-
print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
591-
out_obj->buffer.pointer,
592-
min_t(u32, 128, out_obj->buffer.length), true);
593-
594594
for (i = 0, offset = 0; i < desc->out_num; i++) {
595595
u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf,
596596
(u32 *) out_obj->buffer.pointer,

0 commit comments

Comments
 (0)