Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2470884imc; Tue, 12 Mar 2019 14:51:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqykaN3D8SwCdrO+FeP+kSkoJjkje5GcrW23obzRWkRBU2HTs0wppyx4TEIL+7Q1s8Y8jUB7 X-Received: by 2002:a17:902:a50a:: with SMTP id s10mr41287075plq.223.1552427469281; Tue, 12 Mar 2019 14:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552427469; cv=none; d=google.com; s=arc-20160816; b=UMCOYKYht++FSFzfDFIhGVpV1J7IiThNTZbJWShvH326a8ypGIA/ul0fo5qcdfQyM9 8RpJFqaUqE/1C1DJYosdanoREP++eCuNorEoNnGzzzym9JPn9o6gKkfJC3cACrt2emS8 ETNKO8fFDqFkpGbi4RNEOzs/zxfnxc6NuWiwRb46mja70WzIZ4JGn3bgkSF/ToH8gt2A d/ZT2Cqr5yCIa5fSCMip9ai7Sl77cQWyRQyzojHalKEXFUIHosvf5NTxsnCMKCHc261q LRz9pG+xf6hfdLLEIZWIHjJHjGgHSS8W17CcEkgWdo0KBvIsVCDCpp+fpasurQoezqY5 TP1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject; bh=npqR7Sb+oyVt0au4pvbV8K4/HfmHYfQFfp/Kt+drbTA=; b=YPwvXWL0plQ/UeXsejPGb9OzDOUH8zLkDmi/bH66CFdUf2juJ+nekr2EemzTvERDpV DuObB/is2ZWlJu6uqQPg1o5XExMmZPqMuxTd28X79LtVq4y6nRJMiypbv/ff9jTKi6FD VSEZ0mrCwmMLMp2u65A00O8lwWbqbtuaCtduovhc2WDUJytCTiQA18q5/Ttqzb8/uO0A J9x4DV+1SsKuIZWArunj55LsoZCywhWdbtDV3fXwIc0G0XNw5dzkNh0lorxpqR4WFHnw APPo5s+H63m8W1H8Wp12L/DDWbQYJ+N7V6FUO53kNgj+0J4xbnWPl7mJqSK+AwZtY700 kStg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c20si8379021pgl.595.2019.03.12.14.50.53; Tue, 12 Mar 2019 14:51:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726866AbfCLVu3 (ORCPT + 99 others); Tue, 12 Mar 2019 17:50:29 -0400 Received: from mga01.intel.com ([192.55.52.88]:14251 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbfCLVu2 (ORCPT ); Tue, 12 Mar 2019 17:50:28 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2019 14:50:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,471,1544515200"; d="scan'208";a="133785247" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by fmsmga007.fm.intel.com with ESMTP; 12 Mar 2019 14:50:28 -0700 Subject: [PATCH] acpi/nfit: Always dump _DSM output payload From: Dan Williams To: linux-nvdimm@lists.01.org Cc: Vishal Verma , linux-kernel@vger.kernel.org Date: Tue, 12 Mar 2019 14:37:49 -0700 Message-ID: <155242666957.581839.11006696811038518218.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Dan Williams --- 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,