* [PATCH] acpi/nfit: Always dump _DSM output payload
@ 2019-03-12 21:37 Dan Williams
2019-03-13 0:10 ` Verma, Vishal L
0 siblings, 1 reply; 2+ messages in thread
From: Dan Williams @ 2019-03-12 21:37 UTC (permalink / raw)
To: linux-nvdimm; +Cc: linux-kernel
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: 31eca76ba2fc9 ("...whitelisted dimm command marshaling mechanism")
Reported-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
drivers/acpi/nfit/core.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index a22e2f2bbb75..c9367e78521b 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -546,6 +546,12 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
goto out;
}
+ dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
+ cmd_name, out_obj->buffer.length);
+ print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
+ out_obj->buffer.pointer,
+ min_t(u32, 128, out_obj->buffer.length), true);
+
if (call_pkg) {
call_pkg->nd_fw_size = out_obj->buffer.length;
memcpy(call_pkg->nd_payload + call_pkg->nd_size_in,
@@ -564,12 +570,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
return 0;
}
- dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
- cmd_name, out_obj->buffer.length);
- print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
- out_obj->buffer.pointer,
- min_t(u32, 128, out_obj->buffer.length), true);
-
for (i = 0, offset = 0; i < desc->out_num; i++) {
u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf,
(u32 *) out_obj->buffer.pointer,
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] acpi/nfit: Always dump _DSM output payload
2019-03-12 21:37 [PATCH] acpi/nfit: Always dump _DSM output payload Dan Williams
@ 2019-03-13 0:10 ` Verma, Vishal L
0 siblings, 0 replies; 2+ messages in thread
From: Verma, Vishal L @ 2019-03-13 0:10 UTC (permalink / raw)
To: Williams, Dan J, linux-nvdimm; +Cc: linux-kernel
On Tue, 2019-03-12 at 14:37 -0700, Dan Williams wrote:
> 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: 31eca76ba2fc9 ("...whitelisted dimm command marshaling
> mechanism")
> Reported-by: Vishal Verma <vishal.l.verma@intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> drivers/acpi/nfit/core.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
Looks good to me,
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index a22e2f2bbb75..c9367e78521b 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -546,6 +546,12 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor
> *nd_desc, struct nvdimm *nvdimm,
> goto out;
> }
>
> + dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
> + cmd_name, out_obj->buffer.length);
> + print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
> + out_obj->buffer.pointer,
> + min_t(u32, 128, out_obj->buffer.length), true);
> +
> if (call_pkg) {
> call_pkg->nd_fw_size = out_obj->buffer.length;
> memcpy(call_pkg->nd_payload + call_pkg->nd_size_in,
> @@ -564,12 +570,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor
> *nd_desc, struct nvdimm *nvdimm,
> return 0;
> }
>
> - dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
> - cmd_name, out_obj->buffer.length);
> - print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
> - out_obj->buffer.pointer,
> - min_t(u32, 128, out_obj->buffer.length), true);
> -
> for (i = 0, offset = 0; i < desc->out_num; i++) {
> u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i,
> buf,
> (u32 *) out_obj->buffer.pointer,
>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-13 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 21:37 [PATCH] acpi/nfit: Always dump _DSM output payload Dan Williams
2019-03-13 0:10 ` Verma, Vishal L
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).